Home | History | Annotate | Line # | Download | only in pxeboot
Makefile revision 1.26
      1 #	$NetBSD: Makefile,v 1.26 2019/09/13 02:19:46 manu 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 
     17 SRCS+=exec.c exec_multiboot1.c exec_multiboot2.c pxe.c pxe_call.S
     18 # use our own nfs implementation
     19 .PATH: ${.CURDIR}/../libsa
     20 SRCS+= nfs.c
     21 
     22 .include <bsd.init.mk>
     23 
     24 .if ${MACHINE_ARCH} == "x86_64"
     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 # modules and boot.cfg need special DHCP server setup, disable
     63 # per default for compatibility with existing setups
     64 CPPFLAGS+= -DBOOTPARAM_DEFFLAGS=0x0c
     65 
     66 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
     67 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
     68 
     69 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000
     70 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes	# Read compressed kernels
     71 
     72 CPPFLAGS+= -DPASS_BIOSGEOM
     73 # if you don't use -DPASS_BIOSGEOM, then set I386_INCLUDE_DISK=no
     74 #I386MISCMAKEFLAGS= I386_INCLUDE_DISK=no
     75 
     76 .if (${BASE} == "pxeboot_ia32")
     77 VERSIONFILE= ${.CURDIR}/version
     78 .else
     79 VERSIONFILE= ${.CURDIR}/../pxeboot/version
     80 .endif
     81 
     82 .include "../Makefile.booters"
     83 
     84 release: check_RELEASEDIR
     85 	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
     86 		${RELEASEDIR}/${MACHINE}/installation/misc
     87