Home | History | Annotate | Line # | Download | only in pxeboot
Makefile revision 1.13
      1 #	$NetBSD: Makefile,v 1.13 2006/10/04 22:27:21 salo Exp $
      2 
      3 S=	${.CURDIR}/../../../../
      4 
      5 BASE?= pxeboot_ia32
      6 PROG= ${BASE}.bin
      7 NOMAN=	# defined
      8 NEWVERSWHAT=	"PXE Boot"
      9 STARTFILE=	${PXESTART}
     10 RELOC=		0x0
     11 
     12 .if (${BASE} != "pxeboot_ia32")
     13 .PATH.c: ${.CURDIR}/../pxeboot
     14 .PATH.S: ${.CURDIR}/../pxeboot
     15 .endif
     16 
     17 SRCS= main.c dev_net.c devopen.c conf.c exec.c pxe.c pxe_call.S
     18 # use our own nfs implementation
     19 .PATH: ${.CURDIR}/../libsa
     20 SRCS+= nfs.c
     21 
     22 .include <bsd.own.mk>
     23 
     24 .if ${MACHINE} == "amd64"
     25 LDFLAGS+=	-Wl,-m,elf_i386
     26 AFLAGS+=	-m32
     27 LIBKERN_ARCH=	i386
     28 KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
     29 .endif
     30 
     31 CPPFLAGS+= -DSLOW	# for libz
     32 
     33 .if (${BASE} == "pxeboot_ia32")
     34 # Take config values from patchable header
     35 CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
     36 CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
     37 CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
     38 CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
     39 CPPFLAGS+= -DDIRECT_SERIAL
     40 # Various serial line configurations
     41 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
     42 #	or
     43 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
     44 #	or
     45 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 
     46 #	and maybe 
     47 #CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
     48 .endif
     49 
     50 .if (${BASE} == "pxeboot_ia32_com0")
     51 CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
     52 .endif
     53 
     54 CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
     55 CPPFLAGS+= -DSUPPORT_TFTP
     56 CPPFLAGS+= -DSUPPORT_NFS
     57 #CPPFLAGS+= -DNFS_NOSYMLINK
     58 
     59 CPPFLAGS+= -DPASS_MEMMAP
     60 CPPFLAGS+= -DEPIA_HACK
     61 
     62 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
     63 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
     64 
     65 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000
     66 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes	# Read compressed kernels
     67 
     68 CPPFLAGS+= -DPASS_BIOSGEOM
     69 # if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no
     70 #I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no
     71 
     72 .if (${BASE} == "pxeboot_ia32")
     73 VERSIONFILE= ${.CURDIR}/version
     74 .else
     75 VERSIONFILE= ${.CURDIR}/../pxeboot/version
     76 .endif
     77 
     78 .include "../Makefile.booters"
     79