1 # $NetBSD: Makefile,v 1.17 2009/03/30 09:22:53 tsutsui 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 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop 67 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main 68 69 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000 70 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes # Read compressed kernels 71 72 CPPFLAGS+= -DPASS_BIOSGEOM 73 # if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no 74 #I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no 75 76 .if (${BASE} == "pxeboot_ia32") 77 VERSIONFILE= ${.CURDIR}/version 78 .else 79 VERSIONFILE= ${.CURDIR}/../pxeboot/version 80 .endif 81 82 .include "../Makefile.booters" 83 84 release: check_RELEASEDIR 85 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 86 ${RELEASEDIR}/${MACHINE}/installation/misc 87