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