Makefile revision 1.16
11.16Sabs#	$NetBSD: Makefile,v 1.16 2009/02/14 13:52:51 abs Exp $
21.1Sthorpej
31.1SthorpejS=	${.CURDIR}/../../../../
41.1Sthorpej
51.3SthorpejBASE?= pxeboot_ia32
61.2SthorpejPROG= ${BASE}.bin
71.4SlukemNOMAN=	# defined
81.1SthorpejNEWVERSWHAT=	"PXE Boot"
91.2SthorpejSTARTFILE=	${PXESTART}
101.2SthorpejRELOC=		0x0
111.1Sthorpej
121.3Sthorpej.if (${BASE} != "pxeboot_ia32")
131.3Sthorpej.PATH.c: ${.CURDIR}/../pxeboot
141.3Sthorpej.PATH.S: ${.CURDIR}/../pxeboot
151.3Sthorpej.endif
161.1Sthorpej
171.1SthorpejSRCS= main.c dev_net.c devopen.c conf.c exec.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.15SchristosPIE_CFLAGS=
231.15SchristosPIE_AFLAGS=
241.15SchristosPIE_LDFLAGS=
251.15Schristos
261.10Smrg.include <bsd.own.mk>
271.10Smrg
281.16Sabs.if ${MACHINE_ARCH} == "x86_64"
291.11SlukemLDFLAGS+=	-Wl,-m,elf_i386
301.11SlukemAFLAGS+=	-m32
311.11SlukemLIBKERN_ARCH=	i386
321.8SchsKERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
331.8Schs.endif
341.8Schs
351.6SmycroftCPPFLAGS+= -DSLOW	# for libz
361.1Sthorpej
371.3Sthorpej.if (${BASE} == "pxeboot_ia32")
381.9Sdsl# Take config values from patchable header
391.9SdslCPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
401.9SdslCPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
411.9SdslCPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
421.9SdslCPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
431.9SdslCPPFLAGS+= -DDIRECT_SERIAL
441.1Sthorpej# Various serial line configurations
451.9Sdsl#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
461.1Sthorpej#	or
471.1Sthorpej#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
481.1Sthorpej#	or
491.1Sthorpej#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 
501.1Sthorpej#	and maybe 
511.1Sthorpej#CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
521.3Sthorpej.endif
531.3Sthorpej
541.3Sthorpej.if (${BASE} == "pxeboot_ia32_com0")
551.3SthorpejCPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
561.3Sthorpej.endif
571.1Sthorpej
581.1SthorpejCPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
591.1SthorpejCPPFLAGS+= -DSUPPORT_TFTP
601.1SthorpejCPPFLAGS+= -DSUPPORT_NFS
611.5Sdrochner#CPPFLAGS+= -DNFS_NOSYMLINK
621.1Sthorpej
631.1SthorpejCPPFLAGS+= -DPASS_MEMMAP
641.13SsaloCPPFLAGS+= -DEPIA_HACK
651.1Sthorpej
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