Home | History | Annotate | Line # | Download | only in pxeboot
Makefile revision 1.20.4.1
      1 #	$NetBSD: Makefile,v 1.20.4.1 2011/05/31 03:04:06 rmind 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 AFLAGS.pxe_call.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
     13 AFLAGS.start_pxe.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
     14 
     15 .if (${BASE} != "pxeboot_ia32")
     16 .PATH.c: ${.CURDIR}/../pxeboot
     17 .PATH.S: ${.CURDIR}/../pxeboot
     18 .endif
     19 
     20 SRCS= main.c dev_net.c devopen.c conf.c exec.c pxe.c pxe_call.S
     21 # use our own nfs implementation
     22 .PATH: ${.CURDIR}/../libsa
     23 SRCS+= nfs.c
     24 
     25 PIE_CFLAGS=
     26 PIE_AFLAGS=
     27 PIE_LDFLAGS=
     28 
     29 .include <bsd.own.mk>
     30 
     31 .if ${MACHINE_ARCH} == "x86_64"
     32 LDFLAGS+=	-Wl,-m,elf_i386
     33 AFLAGS+=	-m32
     34 LIBKERN_ARCH=	i386
     35 KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
     36 .endif
     37 
     38 CPPFLAGS+= -DSLOW	# for libz
     39 
     40 .if (${BASE} == "pxeboot_ia32")
     41 # Take config values from patchable header
     42 CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
     43 CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
     44 CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
     45 CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
     46 CPPFLAGS+= -DDIRECT_SERIAL
     47 # Various serial line configurations
     48 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
     49 #	or
     50 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
     51 #	or
     52 #CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 
     53 #	and maybe 
     54 #CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
     55 .endif
     56 
     57 .if (${BASE} == "pxeboot_ia32_com0")
     58 CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
     59 .endif
     60 
     61 CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
     62 CPPFLAGS+= -DSUPPORT_TFTP
     63 CPPFLAGS+= -DSUPPORT_NFS
     64 #CPPFLAGS+= -DNFS_NOSYMLINK
     65 
     66 CPPFLAGS+= -DPASS_MEMMAP
     67 CPPFLAGS+= -DEPIA_HACK
     68 
     69 # modules and boot.cfg need special DHCP server setup, disable
     70 # per default for compatibility with existing setups
     71 CPPFLAGS+= -DBOOTPARAM_DEFFLAGS=0x0c
     72 
     73 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
     74 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
     75 
     76 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000
     77 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes	# Read compressed kernels
     78 
     79 CPPFLAGS+= -DPASS_BIOSGEOM
     80 # if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no
     81 #I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no
     82 
     83 .if (${BASE} == "pxeboot_ia32")
     84 VERSIONFILE= ${.CURDIR}/version
     85 .else
     86 VERSIONFILE= ${.CURDIR}/../pxeboot/version
     87 .endif
     88 
     89 .include "../Makefile.booters"
     90 
     91 release: check_RELEASEDIR
     92 	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
     93 		${RELEASEDIR}/${MACHINE}/installation/misc
     94