1 # $NetBSD: Makefile,v 1.8 2005/08/21 23:04:30 chs 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 .if ${MACHINE} == "amd64" 23 LD+= -m elf_i386 24 AFLAGS+= -m32 25 CPUFLAGS= -m32 26 LIBKERN_ARCH=i386 27 KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" 28 CPPFLAGS+= -DBOOT_ELF64 29 .else 30 CPUFLAGS= -mcpu=i386 31 .endif 32 33 CPPFLAGS+= -DSLOW # for libz 34 35 .if (${BASE} == "pxeboot_ia32") 36 # Various serial line configurations 37 CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL 38 # or 39 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD 40 # or 41 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 42 # and maybe 43 #CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600 44 .endif 45 46 .if (${BASE} == "pxeboot_ia32_com0") 47 CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL 48 .endif 49 50 CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP 51 CPPFLAGS+= -DSUPPORT_TFTP 52 CPPFLAGS+= -DSUPPORT_NFS 53 #CPPFLAGS+= -DNFS_NOSYMLINK 54 55 CPPFLAGS+= -DPASS_MEMMAP 56 57 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop 58 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main 59 60 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000 61 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes # Read compressed kernels 62 63 CPPFLAGS+= -DPASS_BIOSGEOM 64 # if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no 65 #I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no 66 67 .if (${BASE} == "pxeboot_ia32") 68 VERSIONFILE= ${.CURDIR}/version 69 .else 70 VERSIONFILE= ${.CURDIR}/../pxeboot/version 71 .endif 72 73 .include "../Makefile.booters" 74