1# $NetBSD: Makefile,v 1.28 2019/09/27 08:57:10 gson Exp $ 2 3S= ${.CURDIR}/../../../.. 4 5BASE?= pxeboot_ia32 6PROG= ${BASE}.bin 7NEWVERSWHAT= "PXE Boot" 8STARTFILE= ${PXESTART} 9RELOC= 0x0 10 11.if (${BASE} != "pxeboot_ia32") 12.PATH.c: ${.CURDIR}/../pxeboot 13.PATH.S: ${.CURDIR}/../pxeboot 14.endif 15 16SRCS= main.c dev_net.c devopen.c conf.c 17SRCS+=exec.c exec_multiboot1.c exec_multiboot2.c pxe.c pxe_call.S 18# use our own nfs implementation 19.PATH: ${.CURDIR}/../libsa 20SRCS+= nfs.c 21 22.include <bsd.init.mk> 23 24.if ${MACHINE_ARCH} == "x86_64" 25LDFLAGS+= -Wl,-m,elf_i386 26AFLAGS+= -m32 27LIBKERN_ARCH= i386 28KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" 29.endif 30 31CPPFLAGS+= -DSLOW # for libz 32 33.if (${BASE} == "pxeboot_ia32") 34# Take config values from patchable header 35CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev 36CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed 37CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr 38CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap 39CPPFLAGS+= -DDIRECT_SERIAL 40# Various serial line configurations 41#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL 42# or 43#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD 44# or 45#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 46# and maybe 47#CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600 48.endif 49 50.if (${BASE} == "pxeboot_ia32_com0") 51CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL 52.endif 53 54CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP 55CPPFLAGS+= -DSUPPORT_TFTP 56CPPFLAGS+= -DSUPPORT_NFS 57#CPPFLAGS+= -DNFS_NOSYMLINK 58 59CPPFLAGS+= -DPASS_MEMMAP 60CPPFLAGS+= -DEPIA_HACK 61 62# modules and boot.cfg need special DHCP server setup, disable 63# per default for compatibility with existing setups 64CPPFLAGS+= -DBOOTPARAM_DEFFLAGS=0x0c 65 66#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop 67CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main 68 69SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x40000 70SAMISCMAKEFLAGS+= SA_USE_CREAD=yes # Read compressed kernels 71 72CPPFLAGS+= -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") 77VERSIONFILE= ${.CURDIR}/version 78.else 79VERSIONFILE= ${.CURDIR}/../pxeboot/version 80.endif 81 82.include "../Makefile.booters" 83 84release: check_RELEASEDIR 85 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 86 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc 87