diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2013-01-17 12:37:45 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2013-01-17 12:37:45 +0000 |
commit | 008b97cc9d0a87fcb11f634eff8e82cb5e4da666 (patch) | |
tree | 337fd0da5e63ce49dce464676816df2a8744f566 /sys/arch/amd64/stand | |
parent | fe6266fbe52c726e1378d5573d252e068683681f (diff) |
Generate assym.h where we need it, instead of reaching around into other
object directories.
Discussed with deraadt@
Diffstat (limited to 'sys/arch/amd64/stand')
-rw-r--r-- | sys/arch/amd64/stand/Makefile | 6 | ||||
-rw-r--r-- | sys/arch/amd64/stand/Makefile.inc | 24 | ||||
-rw-r--r-- | sys/arch/amd64/stand/biosboot/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/amd64/stand/boot/Makefile | 5 | ||||
-rw-r--r-- | sys/arch/amd64/stand/cdboot/Makefile | 5 | ||||
-rw-r--r-- | sys/arch/amd64/stand/mbr/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/amd64/stand/pxeboot/Makefile | 6 |
7 files changed, 28 insertions, 26 deletions
diff --git a/sys/arch/amd64/stand/Makefile b/sys/arch/amd64/stand/Makefile index e40db439909..2a4a37e56cc 100644 --- a/sys/arch/amd64/stand/Makefile +++ b/sys/arch/amd64/stand/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.4 2012/10/12 14:00:02 jsing Exp $ +# $OpenBSD: Makefile,v 1.5 2013/01/17 12:37:44 jsing Exp $ .if ${MACHINE} == "amd64" -SUBDIR= etc mbr cdbr +SUBDIR= mbr cdbr .endif -SUBDIR+= biosboot boot cdboot fdboot installboot pxeboot +SUBDIR+=biosboot boot cdboot fdboot installboot pxeboot .include <bsd.subdir.mk> diff --git a/sys/arch/amd64/stand/Makefile.inc b/sys/arch/amd64/stand/Makefile.inc index a5b46c79408..bea81fb3d83 100644 --- a/sys/arch/amd64/stand/Makefile.inc +++ b/sys/arch/amd64/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.8 2012/09/12 09:19:54 haesbaert Exp $ +# $OpenBSD: Makefile.inc,v 1.9 2013/01/17 12:37:44 jsing Exp $ CFLAGS=${DEBUG} ${COPTS} -Os -Wall -Werror CFLAGS+= -fno-stack-protector @@ -22,7 +22,7 @@ HEAP_LIMIT=0x90000 BOOTREL=0x60000 BOOTMAGIC=0xc001d00d #ROM_SIZE=32768 -CLEANFILES+= machine +CLEANFILES+= assym.h machine .if empty(DEBUGFLAGS:M-D_TEST) SACFLAGS+=-nostdinc -fno-builtin -fpack-struct @@ -31,23 +31,11 @@ SACFLAGS+=-nostdinc -fno-builtin -fpack-struct .if !make(libdep) && !make(sadep) && !make(salibdir) && !make(obj) .BEGIN: @([ X$(S) = X -o -h machine ] || ln -s $(S)/arch/amd64/include machine) -.endif - -.if exists(${SADIR}/etc/assym.h) -CPPFLAGS+=-I${SADIR}/etc -.else -CPPFLAGS+=-I${SADIR}/etc/${__objdir} -.endif -.if exists(${SADIR}/libsa/libsa.a) -LIBSA=${SADIR}/libsa/libsa.a -.else -LIBSA=${SADIR}/libsa/${__objdir}/libsa.a -.endif -.if exists(${SADIR}/libz/libz.a) -LIBZ=${SADIR}/libz/libz.a -.else -LIBZ=${SADIR}/libz/${__objdir}/libz.a +assym.h: ${S}/kern/genassym.sh ${SADIR}/etc/genassym.cf + sh ${S}/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \ + ${PARAM} < ${SADIR}/etc/genassym.cf > assym.h.tmp && \ + mv -f assym.h.tmp assym.h .endif # NO_NET=no_net diff --git a/sys/arch/amd64/stand/biosboot/Makefile b/sys/arch/amd64/stand/biosboot/Makefile index 069526e3e7d..7e3debc47af 100644 --- a/sys/arch/amd64/stand/biosboot/Makefile +++ b/sys/arch/amd64/stand/biosboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2013/01/17 12:25:11 jsing Exp $ +# $OpenBSD: Makefile,v 1.8 2013/01/17 12:37:44 jsing Exp $ MAN= biosboot.8 @@ -13,6 +13,8 @@ LDFLAGS=-nostdlib -Ttext 0 -N -x -Bstatic -nopie LDFLAGS+=-melf_i386 -L/usr/libdata INSTALL_STRIP= +${.CURDIR}/biosboot.S: assym.h + ${PROG}: $(OBJS) @rm -f $(PROG) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) diff --git a/sys/arch/amd64/stand/boot/Makefile b/sys/arch/amd64/stand/boot/Makefile index 557fd32a67b..4e6bd6755f6 100644 --- a/sys/arch/amd64/stand/boot/Makefile +++ b/sys/arch/amd64/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.18 2013/01/17 12:25:11 jsing Exp $ +# $OpenBSD: Makefile,v 1.19 2013/01/17 12:37:44 jsing Exp $ MAN?= boot.8 MLINKS?=boot.8 boot.conf.5 @@ -54,6 +54,9 @@ boot.bin: boot CLEANFILES+= ${PROG}.new +${.CURDIR}/srt0.S: assym.h +${SADIR}/libsa/gidt.S: assym.h + ${PROG}: $(OBJS) $(LD) $(LDFLAGS) -o ${PROG}.new $(OBJS) @perl ${SADIR}/boot/check-boot.pl ${PROG}.new diff --git a/sys/arch/amd64/stand/cdboot/Makefile b/sys/arch/amd64/stand/cdboot/Makefile index a203aad1581..354adaa6a2c 100644 --- a/sys/arch/amd64/stand/cdboot/Makefile +++ b/sys/arch/amd64/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2013/01/17 12:25:11 jsing Exp $ +# $OpenBSD: Makefile,v 1.18 2013/01/17 12:37:44 jsing Exp $ MAN= cdboot.8 @@ -39,6 +39,9 @@ SRCS+= divdi3.c moddi3.c qdivrem.c .PATH: ${S}/lib/libz SRCS+= adler32.c crc32.c inflate.c inftrees.c +${.CURDIR}/srt0.S: assym.h +${SADIR}/libsa/gidt.S: assym.h + ${PROG}: $(OBJS) $(LD) $(LDFLAGS) -o ${PROG} $(OBJS) @$(SIZE) $(PROG) diff --git a/sys/arch/amd64/stand/mbr/Makefile b/sys/arch/amd64/stand/mbr/Makefile index d1bf020173e..fb353ccaa2a 100644 --- a/sys/arch/amd64/stand/mbr/Makefile +++ b/sys/arch/amd64/stand/mbr/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2013/01/17 12:25:11 jsing Exp $ +# $OpenBSD: Makefile,v 1.8 2013/01/17 12:37:44 jsing Exp $ # S= ${.CURDIR}/../../../.. @@ -21,6 +21,8 @@ INSTALL_STRIP= # Uncomment this to make mbr talk to a serial port. #CPPFLAGS+=-DSERIAL=0 +${.CURDIR}/mbr.S: assym.h + ${PROG}: $(OBJS) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) @size $(PROG) diff --git a/sys/arch/amd64/stand/pxeboot/Makefile b/sys/arch/amd64/stand/pxeboot/Makefile index d6ba0b7524f..6f54f2fb6b6 100644 --- a/sys/arch/amd64/stand/pxeboot/Makefile +++ b/sys/arch/amd64/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 2013/01/17 12:25:11 jsing Exp $ +# $OpenBSD: Makefile,v 1.15 2013/01/17 12:37:44 jsing Exp $ MAN= pxeboot.8 @@ -44,6 +44,10 @@ SRCS+= divdi3.c moddi3.c qdivrem.c .PATH: ${S}/lib/libz SRCS+= adler32.c crc32.c inflate.c inftrees.c +${.CURDIR}/srt0.S: assym.h +${SADIR}/libsa/gidt.S: assym.h +${SADIR}/libsa/pxe_call.S: assym.h + ${PROG}: $(OBJS) $(LD) $(LDFLAGS) -o ${PROG} $(OBJS) @$(SIZE) $(PROG) |