Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / i386 / stand / pxeboot / Makefile
blob5d7c83eee20c9808c7666cd34186c1f066f81399
1 # $NetBSD: Makefile,v 1.16 2009/02/14 13:52:51 abs Exp $
3 S= ${.CURDIR}/../../../..
5 BASE?= pxeboot_ia32
6 PROG= ${BASE}.bin
7 NOMAN= # defined
8 NEWVERSWHAT= "PXE Boot"
9 STARTFILE= ${PXESTART}
10 RELOC= 0x0
12 .if (${BASE} != "pxeboot_ia32")
13 .PATH.c: ${.CURDIR}/../pxeboot
14 .PATH.S: ${.CURDIR}/../pxeboot
15 .endif
17 SRCS= 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
20 SRCS+= nfs.c
22 PIE_CFLAGS=
23 PIE_AFLAGS=
24 PIE_LDFLAGS=
26 .include <bsd.own.mk>
28 .if ${MACHINE_ARCH} == "x86_64"
29 LDFLAGS+= -Wl,-m,elf_i386
30 AFLAGS+= -m32
31 LIBKERN_ARCH= i386
32 KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
33 .endif
35 CPPFLAGS+= -DSLOW # for libz
37 .if (${BASE} == "pxeboot_ia32")
38 # Take config values from patchable header
39 CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
40 CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
41 CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
42 CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
43 CPPFLAGS+= -DDIRECT_SERIAL
44 # Various serial line configurations
45 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
46 # or
47 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
48 # or
49 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO
50 # and maybe
51 #CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
52 .endif
54 .if (${BASE} == "pxeboot_ia32_com0")
55 CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
56 .endif
58 CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
59 CPPFLAGS+= -DSUPPORT_TFTP
60 CPPFLAGS+= -DSUPPORT_NFS
61 #CPPFLAGS+= -DNFS_NOSYMLINK
63 CPPFLAGS+= -DPASS_MEMMAP
64 CPPFLAGS+= -DEPIA_HACK
66 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
67 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
69 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000
70 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes # Read compressed kernels
72 CPPFLAGS+= -DPASS_BIOSGEOM
73 # if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no
74 #I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no
76 .if (${BASE} == "pxeboot_ia32")
77 VERSIONFILE= ${.CURDIR}/version
78 .else
79 VERSIONFILE= ${.CURDIR}/../pxeboot/version
80 .endif
82 .include "../Makefile.booters"
84 release: check_RELEASEDIR
85 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
86 ${RELEASEDIR}/${MACHINE}/installation/misc