Makefile revision 1.17
1#	$NetBSD: Makefile,v 1.17 2009/03/30 09:22:53 tsutsui Exp $
2
3S=	${.CURDIR}/../../../..
4
5BASE?= pxeboot_ia32
6PROG= ${BASE}.bin
7NOMAN=	# defined
8NEWVERSWHAT=	"PXE Boot"
9STARTFILE=	${PXESTART}
10RELOC=		0x0
11
12.if (${BASE} != "pxeboot_ia32")
13.PATH.c: ${.CURDIR}/../pxeboot
14.PATH.S: ${.CURDIR}/../pxeboot
15.endif
16
17SRCS= 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
20SRCS+= nfs.c
21
22PIE_CFLAGS=
23PIE_AFLAGS=
24PIE_LDFLAGS=
25
26.include <bsd.own.mk>
27
28.if ${MACHINE_ARCH} == "x86_64"
29LDFLAGS+=	-Wl,-m,elf_i386
30AFLAGS+=	-m32
31LIBKERN_ARCH=	i386
32KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
33.endif
34
35CPPFLAGS+= -DSLOW	# for libz
36
37.if (${BASE} == "pxeboot_ia32")
38# Take config values from patchable header
39CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
40CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
41CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
42CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
43CPPFLAGS+= -DDIRECT_SERIAL
44# Various serial line configurations
45#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
46#	or
47#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
48#	or
49#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO 
50#	and maybe 
51#CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
52.endif
53
54.if (${BASE} == "pxeboot_ia32_com0")
55CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
56.endif
57
58CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
59CPPFLAGS+= -DSUPPORT_TFTP
60CPPFLAGS+= -DSUPPORT_NFS
61#CPPFLAGS+= -DNFS_NOSYMLINK
62
63CPPFLAGS+= -DPASS_MEMMAP
64CPPFLAGS+= -DEPIA_HACK
65
66#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
67CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
68
69SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000
70SAMISCMAKEFLAGS+= SA_USE_CREAD=yes	# Read compressed kernels
71
72CPPFLAGS+= -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")
77VERSIONFILE= ${.CURDIR}/version
78.else
79VERSIONFILE= ${.CURDIR}/../pxeboot/version
80.endif
81
82.include "../Makefile.booters"
83
84release: check_RELEASEDIR
85	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
86		${RELEASEDIR}/${MACHINE}/installation/misc
87