Makefile revision 1.14
1#	$NetBSD: Makefile,v 1.14 2007/02/27 18:17:28 he Exp $
2
3S=	${.CURDIR}/../../../../
4
5BASE?= pxeboot_ia32
6PROG= ${BASE}.bin
7NOMAN=	# defined
8NEWVERSWHAT=	"PXE Boot"
9STARTFILE=	${PXESTART}
10RELOC=		0x0
11
12.if (${BASE} != "pxeboot_ia32")
13.PATH.c: ${.CURDIR}/../pxeboot
14.PATH.S: ${.CURDIR}/../pxeboot
15.endif
16
17SRCS= main.c dev_net.c devopen.c conf.c exec.c pxe.c pxe_call.S
18# use our own nfs implementation
19.PATH: ${.CURDIR}/../libsa
20SRCS+= nfs.c
21
22.include <bsd.own.mk>
23
24.if ${MACHINE} == "amd64"
25LDFLAGS+=	-Wl,-m,elf_i386
26AFLAGS+=	-m32
27LIBKERN_ARCH=	i386
28KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
29.endif
30
31CPPFLAGS+= -DSLOW	# for libz
32
33.if (${BASE} == "pxeboot_ia32")
34# Take config values from patchable header
35CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
36CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
37CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
38CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
39CPPFLAGS+= -DDIRECT_SERIAL
40# Various serial line configurations
41#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
42#	or
43#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
44#	or
45#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 
46#	and maybe 
47#CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
48.endif
49
50.if (${BASE} == "pxeboot_ia32_com0")
51CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
52.endif
53
54CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
55CPPFLAGS+= -DSUPPORT_TFTP
56CPPFLAGS+= -DSUPPORT_NFS
57#CPPFLAGS+= -DNFS_NOSYMLINK
58
59CPPFLAGS+= -DPASS_MEMMAP
60CPPFLAGS+= -DEPIA_HACK
61
62#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
63CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
64
65SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000
66SAMISCMAKEFLAGS+= SA_USE_CREAD=yes	# Read compressed kernels
67
68CPPFLAGS+= -DPASS_BIOSGEOM
69# if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no
70#I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no
71
72.if (${BASE} == "pxeboot_ia32")
73VERSIONFILE= ${.CURDIR}/version
74.else
75VERSIONFILE= ${.CURDIR}/../pxeboot/version
76.endif
77
78.include "../Makefile.booters"
79
80release: check_RELEASEDIR
81	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
82		${RELEASEDIR}/${MACHINE}/installation/misc
83