1 # $NetBSD: Makefile,v 1.24.10.2 2019/10/04 11:34:18 martin 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 18 SRCS+=exec.c exec_multiboot1.c exec_multiboot2.c pxe.c pxe_call.S 19 # use our own nfs implementation 20 .PATH: ${.CURDIR}/../libsa 21 SRCS+= nfs.c 22 23 PIE_CFLAGS= 24 PIE_AFLAGS= 25 PIE_LDFLAGS= 26 27 .include <bsd.own.mk> 28 29 .if ${MACHINE_ARCH} == "x86_64" 30 LDFLAGS+= -Wl,-m,elf_i386 31 AFLAGS+= -m32 32 LIBKERN_ARCH= i386 33 KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" 34 .endif 35 36 CPPFLAGS+= -DSLOW # for libz 37 38 .if (${BASE} == "pxeboot_ia32") 39 # Take config values from patchable header 40 CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev 41 CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed 42 CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr 43 CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap 44 CPPFLAGS+= -DDIRECT_SERIAL 45 # Various serial line configurations 46 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL 47 # or 48 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD 49 # or 50 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 51 # and maybe 52 #CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600 53 .endif 54 55 .if (${BASE} == "pxeboot_ia32_com0") 56 CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL 57 .endif 58 59 CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP 60 CPPFLAGS+= -DSUPPORT_TFTP 61 CPPFLAGS+= -DSUPPORT_NFS 62 #CPPFLAGS+= -DNFS_NOSYMLINK 63 64 CPPFLAGS+= -DPASS_MEMMAP 65 CPPFLAGS+= -DEPIA_HACK 66 67 # modules and boot.cfg need special DHCP server setup, disable 68 # per default for compatibility with existing setups 69 CPPFLAGS+= -DBOOTPARAM_DEFFLAGS=0x0c 70 71 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop 72 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main 73 74 SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x40000 75 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes # Read compressed kernels 76 77 CPPFLAGS+= -DPASS_BIOSGEOM 78 # if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no 79 #I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no 80 81 .if (${BASE} == "pxeboot_ia32") 82 VERSIONFILE= ${.CURDIR}/version 83 .else 84 VERSIONFILE= ${.CURDIR}/../pxeboot/version 85 .endif 86 87 .include "../Makefile.booters" 88 89 release: check_RELEASEDIR 90 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 91 ${RELEASEDIR}/${MACHINE}/installation/misc 92