Makefile revision 1.9
11.9Sdsl#	$NetBSD: Makefile,v 1.9 2005/11/11 21:42:13 dsl 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.8Schs.if ${MACHINE} == "amd64"
231.8SchsLD+=  -m elf_i386
241.8SchsAFLAGS+=   -m32
251.8SchsCPUFLAGS=  -m32
261.8SchsLIBKERN_ARCH=i386
271.8SchsKERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
281.8SchsCPPFLAGS+= -DBOOT_ELF64
291.8Schs.else
301.8SchsCPUFLAGS=  -mcpu=i386
311.8Schs.endif
321.8Schs
331.6SmycroftCPPFLAGS+= -DSLOW	# for libz
341.1Sthorpej
351.3Sthorpej.if (${BASE} == "pxeboot_ia32")
361.9Sdsl# Take config values from patchable header
371.9SdslCPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
381.9SdslCPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
391.9SdslCPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
401.9SdslCPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
411.9SdslCPPFLAGS+= -DDIRECT_SERIAL
421.1Sthorpej# Various serial line configurations
431.9Sdsl#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
441.1Sthorpej#	or
451.1Sthorpej#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
461.1Sthorpej#	or
471.1Sthorpej#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 
481.1Sthorpej#	and maybe 
491.1Sthorpej#CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
501.3Sthorpej.endif
511.3Sthorpej
521.3Sthorpej.if (${BASE} == "pxeboot_ia32_com0")
531.3SthorpejCPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
541.3Sthorpej.endif
551.1Sthorpej
561.1SthorpejCPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
571.1SthorpejCPPFLAGS+= -DSUPPORT_TFTP
581.1SthorpejCPPFLAGS+= -DSUPPORT_NFS
591.5Sdrochner#CPPFLAGS+= -DNFS_NOSYMLINK
601.1Sthorpej
611.1SthorpejCPPFLAGS+= -DPASS_MEMMAP
621.1Sthorpej
631.1Sthorpej#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
641.1SthorpejCFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
651.1Sthorpej
661.1SthorpejSAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000
671.2SthorpejSAMISCMAKEFLAGS+= SA_USE_CREAD=yes	# Read compressed kernels
681.1Sthorpej
691.7SdbjCPPFLAGS+= -DPASS_BIOSGEOM
701.7Sdbj# if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no
711.7Sdbj#I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no
721.1Sthorpej
731.3Sthorpej.if (${BASE} == "pxeboot_ia32")
741.1SthorpejVERSIONFILE= ${.CURDIR}/version
751.3Sthorpej.else
761.3SthorpejVERSIONFILE= ${.CURDIR}/../pxeboot/version
771.3Sthorpej.endif
781.1Sthorpej
791.1Sthorpej.include "../Makefile.booters"
80