Makefile revision 1.26
11.26Smanu#	$NetBSD: Makefile,v 1.26 2019/09/13 02:19:46 manu Exp $
21.1Sthorpej
31.17StsutsuiS=	${.CURDIR}/../../../..
41.1Sthorpej
51.3SthorpejBASE?= pxeboot_ia32
61.2SthorpejPROG= ${BASE}.bin
71.1SthorpejNEWVERSWHAT=	"PXE Boot"
81.2SthorpejSTARTFILE=	${PXESTART}
91.2SthorpejRELOC=		0x0
101.1Sthorpej
111.3Sthorpej.if (${BASE} != "pxeboot_ia32")
121.3Sthorpej.PATH.c: ${.CURDIR}/../pxeboot
131.3Sthorpej.PATH.S: ${.CURDIR}/../pxeboot
141.3Sthorpej.endif
151.1Sthorpej
161.26SmanuSRCS= main.c dev_net.c devopen.c conf.c 
171.26SmanuSRCS+=exec.c exec_multiboot1.c exec_multiboot2.c pxe.c pxe_call.S
181.5Sdrochner# use our own nfs implementation
191.5Sdrochner.PATH: ${.CURDIR}/../libsa
201.5SdrochnerSRCS+= nfs.c
211.6Smycroft
221.25Schristos.include <bsd.init.mk>
231.10Smrg
241.16Sabs.if ${MACHINE_ARCH} == "x86_64"
251.11SlukemLDFLAGS+=	-Wl,-m,elf_i386
261.11SlukemAFLAGS+=	-m32
271.11SlukemLIBKERN_ARCH=	i386
281.8SchsKERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
291.8Schs.endif
301.8Schs
311.6SmycroftCPPFLAGS+= -DSLOW	# for libz
321.1Sthorpej
331.3Sthorpej.if (${BASE} == "pxeboot_ia32")
341.9Sdsl# Take config values from patchable header
351.9SdslCPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
361.9SdslCPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
371.9SdslCPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
381.9SdslCPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
391.24SchristosCPPFLAGS+= -DDIRECT_SERIAL
401.1Sthorpej# Various serial line configurations
411.9Sdsl#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
421.1Sthorpej#	or
431.1Sthorpej#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
441.1Sthorpej#	or
451.1Sthorpej#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 
461.1Sthorpej#	and maybe 
471.1Sthorpej#CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
481.3Sthorpej.endif
491.3Sthorpej
501.3Sthorpej.if (${BASE} == "pxeboot_ia32_com0")
511.3SthorpejCPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
521.3Sthorpej.endif
531.1Sthorpej
541.1SthorpejCPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
551.1SthorpejCPPFLAGS+= -DSUPPORT_TFTP
561.1SthorpejCPPFLAGS+= -DSUPPORT_NFS
571.5Sdrochner#CPPFLAGS+= -DNFS_NOSYMLINK
581.1Sthorpej
591.1SthorpejCPPFLAGS+= -DPASS_MEMMAP
601.13SsaloCPPFLAGS+= -DEPIA_HACK
611.1Sthorpej
621.18Sdrochner# modules and boot.cfg need special DHCP server setup, disable
631.18Sdrochner# per default for compatibility with existing setups
641.20SdrochnerCPPFLAGS+= -DBOOTPARAM_DEFFLAGS=0x0c
651.18Sdrochner
661.1Sthorpej#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
671.1SthorpejCFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
681.1Sthorpej
691.1SthorpejSAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000
701.2SthorpejSAMISCMAKEFLAGS+= SA_USE_CREAD=yes	# Read compressed kernels
711.1Sthorpej
721.7SdbjCPPFLAGS+= -DPASS_BIOSGEOM
731.7Sdbj# if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no
741.7Sdbj#I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no
751.1Sthorpej
761.3Sthorpej.if (${BASE} == "pxeboot_ia32")
771.1SthorpejVERSIONFILE= ${.CURDIR}/version
781.3Sthorpej.else
791.3SthorpejVERSIONFILE= ${.CURDIR}/../pxeboot/version
801.3Sthorpej.endif
811.1Sthorpej
821.1Sthorpej.include "../Makefile.booters"
831.14She
841.14Sherelease: check_RELEASEDIR
851.14She	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
861.14She		${RELEASEDIR}/${MACHINE}/installation/misc
87