Makefile revision 1.25
11.25Schristos#	$NetBSD: Makefile,v 1.25 2018/06/02 14:30:07 christos 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.1SthorpejSRCS= main.c dev_net.c devopen.c conf.c exec.c pxe.c pxe_call.S
171.5Sdrochner# use our own nfs implementation
181.5Sdrochner.PATH: ${.CURDIR}/../libsa
191.5SdrochnerSRCS+= nfs.c
201.6Smycroft
211.25Schristos.include <bsd.init.mk>
221.10Smrg
231.16Sabs.if ${MACHINE_ARCH} == "x86_64"
241.11SlukemLDFLAGS+=	-Wl,-m,elf_i386
251.11SlukemAFLAGS+=	-m32
261.11SlukemLIBKERN_ARCH=	i386
271.8SchsKERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
281.8Schs.endif
291.8Schs
301.6SmycroftCPPFLAGS+= -DSLOW	# for libz
311.1Sthorpej
321.3Sthorpej.if (${BASE} == "pxeboot_ia32")
331.9Sdsl# Take config values from patchable header
341.9SdslCPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
351.9SdslCPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
361.9SdslCPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
371.9SdslCPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
381.24SchristosCPPFLAGS+= -DDIRECT_SERIAL
391.1Sthorpej# Various serial line configurations
401.9Sdsl#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
411.1Sthorpej#	or
421.1Sthorpej#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
431.1Sthorpej#	or
441.1Sthorpej#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 
451.1Sthorpej#	and maybe 
461.1Sthorpej#CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
471.3Sthorpej.endif
481.3Sthorpej
491.3Sthorpej.if (${BASE} == "pxeboot_ia32_com0")
501.3SthorpejCPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
511.3Sthorpej.endif
521.1Sthorpej
531.1SthorpejCPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
541.1SthorpejCPPFLAGS+= -DSUPPORT_TFTP
551.1SthorpejCPPFLAGS+= -DSUPPORT_NFS
561.5Sdrochner#CPPFLAGS+= -DNFS_NOSYMLINK
571.1Sthorpej
581.1SthorpejCPPFLAGS+= -DPASS_MEMMAP
591.13SsaloCPPFLAGS+= -DEPIA_HACK
601.1Sthorpej
611.18Sdrochner# modules and boot.cfg need special DHCP server setup, disable
621.18Sdrochner# per default for compatibility with existing setups
631.20SdrochnerCPPFLAGS+= -DBOOTPARAM_DEFFLAGS=0x0c
641.18Sdrochner
651.1Sthorpej#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
661.1SthorpejCFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
671.1Sthorpej
681.1SthorpejSAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000
691.2SthorpejSAMISCMAKEFLAGS+= SA_USE_CREAD=yes	# Read compressed kernels
701.1Sthorpej
711.7SdbjCPPFLAGS+= -DPASS_BIOSGEOM
721.7Sdbj# if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no
731.7Sdbj#I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no
741.1Sthorpej
751.3Sthorpej.if (${BASE} == "pxeboot_ia32")
761.1SthorpejVERSIONFILE= ${.CURDIR}/version
771.3Sthorpej.else
781.3SthorpejVERSIONFILE= ${.CURDIR}/../pxeboot/version
791.3Sthorpej.endif
801.1Sthorpej
811.1Sthorpej.include "../Makefile.booters"
821.14She
831.14Sherelease: check_RELEASEDIR
841.14She	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
851.14She		${RELEASEDIR}/${MACHINE}/installation/misc
86