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