1 # $NetBSD: Makefile,v 1.18 2010/01/14 17:49:31 drochner Exp $ 2 3 S= ${.CURDIR}/../../../.. 4 5 BASE?= pxeboot_ia32 6 PROG= ${BASE}.bin 7 NOMAN= # defined 8 NEWVERSWHAT= "PXE Boot" 9 STARTFILE= ${PXESTART} 10 RELOC= 0x0 11 12 .if (${BASE} != "pxeboot_ia32") 13 .PATH.c: ${.CURDIR}/../pxeboot 14 .PATH.S: ${.CURDIR}/../pxeboot 15 .endif 16 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 21 22 PIE_CFLAGS= 23 PIE_AFLAGS= 24 PIE_LDFLAGS= 25 26 .include <bsd.own.mk> 27 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 34 35 CPPFLAGS+= -DSLOW # for libz 36 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 53 54 .if (${BASE} == "pxeboot_ia32_com0") 55 CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL 56 .endif 57 58 CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP 59 CPPFLAGS+= -DSUPPORT_TFTP 60 CPPFLAGS+= -DSUPPORT_NFS 61 #CPPFLAGS+= -DNFS_NOSYMLINK 62 63 CPPFLAGS+= -DPASS_MEMMAP 64 CPPFLAGS+= -DEPIA_HACK 65 66 # modules and boot.cfg need special DHCP server setup, disable 67 # per default for compatibility with existing setups 68 CPPFLAGS+= -DBOOTPARAM_DEFFLAGS=0 69 70 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop 71 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main 72 73 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000 74 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes # Read compressed kernels 75 76 CPPFLAGS+= -DPASS_BIOSGEOM 77 # if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no 78 #I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no 79 80 .if (${BASE} == "pxeboot_ia32") 81 VERSIONFILE= ${.CURDIR}/version 82 .else 83 VERSIONFILE= ${.CURDIR}/../pxeboot/version 84 .endif 85 86 .include "../Makefile.booters" 87 88 release: check_RELEASEDIR 89 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 90 ${RELEASEDIR}/${MACHINE}/installation/misc 91