blob: f41cb437009761f206b78e933d8a7b1b0f3497c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# $OpenBSD: Makefile,v 1.1 2004/03/21 21:37:41 tom Exp $
.include "${.CURDIR}/../Makefile.inc"
MAN= pxeboot.8
.if ${MACHINE} == "amd64"
S =${.CURDIR}/../../../..
SADIR= ${.CURDIR}/..
PROG= pxeboot
SRCS= srt0.S conf.c devopen.c net.c open.c
LD?= ld
SIZE?= size
LDFLAGS+=-melf_i386 -nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -noinhibit-exec
INSTALL_STRIP=
.PATH: ${SADIR}/libsa
# i386 stuff (so, it will possibly load in the same 64k)
SRCS+= machdep.c exec_i386.c cmd_i386.c
SRCS+= gidt.S alloca.S biosdev.c bioscons.c gateA20.c \
memprobe.c diskprobe.c time.c biosprobe.c
SRCS+= pxe.c pxe_call.S pxe_net.c
.PATH: ${S}/stand/boot
SRCS+= boot.c cmd.c vars.c bootarg.c
.PATH: ${S}/lib/libsa
.PATH: ${S}/lib/libkern # for strl*
# stand routines
SRCS+= alloc.c exit.c getfile.c gets.c globals.c strcmp.c strlen.c \
strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \
strerror.c strncpy.c strtol.c ctime.c strlcpy.c strlcat.c
# io routines
SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c ioctl.c lseek.c \
read.c stat.c write.c cread.c readdir.c cons.c loadfile.c
# network routines
SRCS+= ether.c netif.c rpc.c
# network info services
SRCS+= bootp.c bootparam.c
# boot filesystems
SRCS+= ufs.c nfs.c tftp.c
.PATH: ${S}/lib/libz
SRCS+= adler32.c crc32.c inflate.c inftrees.c
${PROG}: $(OBJS)
$(LD) $(LDFLAGS) -o ${PROG} $(OBJS)
@if [ -x ${.OBJDIR}/${PROG} ]; then \
objcopy -O binary ${PROG} ${.OBJDIR}/.tmp;\
mv -f ${.OBJDIR}/.tmp ${.OBJDIR}/${PROG}; \
ls -l ${.OBJDIR}/${PROG}; \
fi
.else
NOPROG=
.endif
.include <bsd.prog.mk>
CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} -DLINKADDR=${LINKADDR}
CPPFLAGS+=-DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE
CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} -I${S}/stand/boot #-DCOMPAT_UFS
CFLAGS+=-m32 $(SACFLAGS) -D__INTERNAL_LIBSA_CREAD
AFLAGS+=-m32 # -Wa,-R
# AFLAGS+=-Wa,-a
|