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