1 # $NetBSD: Makefile,v 1.9 2005/11/11 21:42:13 dsl 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 # Take config values from patchable header 37 CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev 38 CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed 39 CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr 40 CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap 41 CPPFLAGS+= -DDIRECT_SERIAL 42 # Various serial line configurations 43 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL 44 # or 45 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD 46 # or 47 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 48 # and maybe 49 #CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600 50 .endif 51 52 .if (${BASE} == "pxeboot_ia32_com0") 53 CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL 54 .endif 55 56 CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP 57 CPPFLAGS+= -DSUPPORT_TFTP 58 CPPFLAGS+= -DSUPPORT_NFS 59 #CPPFLAGS+= -DNFS_NOSYMLINK 60 61 CPPFLAGS+= -DPASS_MEMMAP 62 63 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop 64 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main 65 66 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000 67 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes # Read compressed kernels 68 69 CPPFLAGS+= -DPASS_BIOSGEOM 70 # if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no 71 #I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no 72 73 .if (${BASE} == "pxeboot_ia32") 74 VERSIONFILE= ${.CURDIR}/version 75 .else 76 VERSIONFILE= ${.CURDIR}/../pxeboot/version 77 .endif 78 79 .include "../Makefile.booters" 80