diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2011-11-06 13:39:44 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2011-11-06 13:39:44 +0000 |
commit | 13597041e09656a27245faf51e01358734fad333 (patch) | |
tree | 38c6269336622603b999da8306d431be595c8d43 /sys/arch | |
parent | 239bab7542814654b206b5d1aebe186553f36294 (diff) |
Build boot(8) for i386 in the same manner that we build boot(8) for amd64 -
specify a list of source files to compile, instead of building and linking
against libraries.
ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/stand/boot/Makefile | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/sys/arch/i386/stand/boot/Makefile b/sys/arch/i386/stand/boot/Makefile index be54d15c262..277b0eb7e17 100644 --- a/sys/arch/i386/stand/boot/Makefile +++ b/sys/arch/i386/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.35 2010/07/10 16:11:43 deraadt Exp $ +# $OpenBSD: Makefile,v 1.36 2011/11/06 13:39:43 jsing Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -6,6 +6,9 @@ MAN= boot.8 MLINKS= boot.8 boot.conf.5 .if ${MACHINE} == "i386" +S =${.CURDIR}/../../../.. +SADIR= ${.CURDIR}/.. + PROG= boot LD?= ld SIZE?= size @@ -20,23 +23,38 @@ CLEANFILES+= crt0.o SRCS= srt0.S .endif +.PATH: ${S}/stand/boot SRCS+= boot.c cmd.c vars.c bootarg.c conf.c -S =${.CURDIR}/../../../.. -SADIR= ${.CURDIR}/.. -LDADD= ${LIBSA} ${LIBZ} -DPADD= ${LIBSA} ${LIBZ} +.PATH: ${SADIR}/libsa +SRCS+= alloca.S debug_i386.S gidt.S +SRCS+= apmprobe.c bioscons.c biosdev.c cmd_i386.c debug.c dev_i386.c \ + diskprobe.c exec_i386.c gateA20.c machdep.c memprobe.c pciprobe.c \ + ps2probe.c time.c -.PATH: ${S}/stand/boot +.PATH: ${S}/lib/libsa +SRCS+= alloc.c cread.c ctime.c exit.c memcmp.c memcpy.c memset.c printf.c \ + snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c \ + strtoll.c +SRCS+= close.c closeall.c cons.c dev.c disklabel.c dkcksum.c fstat.c lseek.c \ + open.c read.c readdir.c stat.c +SRCS+= elf32.c elf64.c loadfile.c +SRCS+= ufs.c + +.PATH: ${S}/lib/libkern +SRCS+= strlcpy.c -.PATH: ${S}/lib/libkern/arch/i386 ${S}/lib/libkern -SRCS+= strlcpy.c moddi3.c divdi3.c qdivrem.c +.PATH: ${S}/lib/libkern/arch/i386 +SRCS+= moddi3.c divdi3.c qdivrem.c + +.PATH: ${S}/lib/libz +SRCS+= adler32.c crc32.c inflate.c inftrees.c boot.bin: boot objcopy -v -O binary ${PROG} boot.bin -${PROG}: $(OBJS) $(DPADD) - $(LD) $(LDFLAGS) -o ${PROG} $(OBJS) $(LDADD) +${PROG}: $(OBJS) + $(LD) $(LDFLAGS) -o ${PROG} $(OBJS) @$(SIZE) ${PROG} .else @@ -45,9 +63,9 @@ NOPROG= .include <bsd.prog.mk> -CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} -CPPFLAGS+=-DLINKADDR=${LINKADDR} -CFLAGS+=$(SACFLAGS) -#AFLAGS+=-Wa,-R +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 - |