summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1998-05-28 20:52:43 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1998-05-28 20:52:43 +0000
commite14f3bc839d97d42ba70c1db48ca0ba5d21d21cc (patch)
tree19a06cd41aafd7f329c594cd3ecc7f85f9e20b28 /sys/arch
parentf7c2e9309bb92905bc0ef3ccc8ccb8ad200da65d (diff)
cleanup the Makefiles a bit.
make machine link in a smart way, remove unused bits.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/stand/Makefile.inc13
-rw-r--r--sys/arch/i386/stand/biosboot/Makefile14
-rw-r--r--sys/arch/i386/stand/boot/Makefile10
-rw-r--r--sys/arch/i386/stand/etc/Makefile14
-rw-r--r--sys/arch/i386/stand/libsa/Makefile10
-rw-r--r--sys/arch/i386/stand/libsa/bioscons.c4
-rw-r--r--sys/arch/i386/stand/libz/Makefile10
-rw-r--r--sys/arch/i386/stand/mbr/Makefile11
8 files changed, 24 insertions, 62 deletions
diff --git a/sys/arch/i386/stand/Makefile.inc b/sys/arch/i386/stand/Makefile.inc
index d221c833441..06dde794652 100644
--- a/sys/arch/i386/stand/Makefile.inc
+++ b/sys/arch/i386/stand/Makefile.inc
@@ -1,11 +1,11 @@
-# $OpenBSD: Makefile.inc,v 1.22 1998/05/25 19:20:45 mickey Exp $
+# $OpenBSD: Makefile.inc,v 1.23 1998/05/28 20:52:33 mickey Exp $
CFLAGS=${DEBUG} -O2 -Wall -Werror
CPPFLAGS+=-I${S} -I${SADIR}/libsa -I. -I${.CURDIR}
SACFLAGS=-D_STANDALONE
# CPPFLAGS+=-DSAVE_MEMORY
-# DEBUGFLAGS=-DDEBUG
-# DEBUGFLAGS+=-DGIDT_DEBUG
+DEBUGFLAGS=-DDEBUG
+DEBUGFLAGS+=-DGIDT_DEBUG
# DEBUGFLAGS+=-DBIOS_DEBUG
# DEBUGFLAGS+=-DEXEC_DEBUG
# DEBUGFLAGS+=-DALLOC_TRACE
@@ -19,11 +19,18 @@ HEAP_LIMIT=0x60000
BOOTREL=0x60000
BOOTMAGIC=0xdeadbeef
#ROM_SIZE=32768
+CLEANFILES+= machine
.if defined(DEBUGFLAGS) && empty(DEBUGFLAGS:M-D_TEST)
SACFLAGS+=-nostdinc -fno-builtin -fpack-struct
.endif
+.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj)
+.BEGIN:
+ @([ -h machine ] || ln -s $(S)/arch/i386/include machine)
+.endif
+
+
.if exists(${SADIR}/etc/assym.h)
CPPFLAGS+=-I${SADIR}/etc
.else
diff --git a/sys/arch/i386/stand/biosboot/Makefile b/sys/arch/i386/stand/biosboot/Makefile
index 6f692e23128..a7c41f98fe2 100644
--- a/sys/arch/i386/stand/biosboot/Makefile
+++ b/sys/arch/i386/stand/biosboot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.16 1998/05/25 19:04:50 mickey Exp $
+# $OpenBSD: Makefile,v 1.17 1998/05/28 20:52:34 mickey Exp $
PROG= biosboot
SRCS= biosboot.S
@@ -7,14 +7,6 @@ LDFLAGS=-nostdlib -Ttext 0 -N -x -Bstatic
INSTALL_STRIP=
MAN= biosboot.8
SADIR= ${.CURDIR}/..
-CLEANFILES= i386 machine
-
-all: machine-links
-
-machine-links:
- @rm -f i386 machine
- @ln -fs ${.CURDIR}/../.. i386
- @ln -fs ${.CURDIR}/../../include machine
${PROG}: $(OBJS) $(DPADD)
@rm -f $(PROG)
@@ -23,6 +15,6 @@ ${PROG}: $(OBJS) $(DPADD)
.include <bsd.prog.mk>
-CPPFLAGS+=-DLOADADDR=$(LOADADDR) -DBOOTMAGIC=$(BOOTMAGIC) -DBOOTREL=$(BOOTREL)
-CPPFLAGS+=${DEBUGFLAGS} -DBEMBR
+CPPFLAGS+=-DLOADADDR=$(LOADADDR) -DBOOTMAGIC=$(BOOTMAGIC)
+CPPFLAGS+=${DEBUGFLAGS}
#AFLAGS+=-Wa,-a
diff --git a/sys/arch/i386/stand/boot/Makefile b/sys/arch/i386/stand/boot/Makefile
index 00a1734c66a..194378e3ac2 100644
--- a/sys/arch/i386/stand/boot/Makefile
+++ b/sys/arch/i386/stand/boot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.20 1998/05/27 13:33:36 mickey Exp $
+# $OpenBSD: Makefile,v 1.21 1998/05/28 20:52:36 mickey Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -6,7 +6,6 @@ PROG= boot
LD?= ld
SIZE?= size
LDFLAGS+=-nostdlib -Bstatic
-CLEANFILES+= i386 machine
.if defined(DEBUGFLAGS) && !empty(DEBUGFLAGS:M-D_TEST)
CLEANFILES+= srt0.o
@@ -28,13 +27,6 @@ DPADD= ${LIBSA} ${LIBZ}
.PATH: ${S}/stand/boot
-all: machine-links
-
-machine-links:
- @rm -f machine i386
- @ln -fs ${.CURDIR}/../.. i386
- @ln -fs ${.CURDIR}/../../include machine
-
${PROG}: $(OBJS) $(DPADD)
$(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDADD)
@$(SIZE) $(PROG)
diff --git a/sys/arch/i386/stand/etc/Makefile b/sys/arch/i386/stand/etc/Makefile
index 21aa02e9fbe..3f4a565455d 100644
--- a/sys/arch/i386/stand/etc/Makefile
+++ b/sys/arch/i386/stand/etc/Makefile
@@ -1,17 +1,9 @@
-# $OpenBSD: Makefile,v 1.8 1998/05/25 19:04:54 mickey Exp $
+# $OpenBSD: Makefile,v 1.9 1998/05/28 20:52:37 mickey Exp $
S= ${.CURDIR}/../../../..
I386= ${.CURDIR}/../..
-CLEANFILES= i386 machine
-all: machine-links assym.h
-
-machine-links:
- @rm -f machine i386
- @ln -fs ${.CURDIR}/../.. i386
- @ln -fs ${.CURDIR}/../../include machine
-
-depend:: machine-links assym.h
+all depend:: assym.h
assym.h: $S/kern/genassym.sh ${.CURDIR}/genassym.cf
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
@@ -21,7 +13,7 @@ assym.h: $S/kern/genassym.sh ${.CURDIR}/genassym.cf
cleandir: clean
clean:
- @rm -f isa.h apm.h assym.h
+ @rm -f isa.h apm.h assym.h machine
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
diff --git a/sys/arch/i386/stand/libsa/Makefile b/sys/arch/i386/stand/libsa/Makefile
index a12565b7cef..c6b2ef46150 100644
--- a/sys/arch/i386/stand/libsa/Makefile
+++ b/sys/arch/i386/stand/libsa/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.31 1998/05/25 19:20:50 mickey Exp $
+# $OpenBSD: Makefile,v 1.32 1998/05/28 20:52:38 mickey Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -8,7 +8,6 @@ S=${.CURDIR}/../../../..
SADIR=${.CURDIR}/..
DIR_SA= $S/lib/libsa
DIR_KERN=$S/lib/libkern
-CLEANFILES=i386 machine
# i386 stuff (so, it will possibly load in the same 64k)
SRCS+= machdep.c dev_i386.c exec_i386.c cmd_i386.c
@@ -56,12 +55,7 @@ NOPIC=nopic
.PATH: ${DIR_SA} ${DIR_KERN}
-all: machine-links ${SALIB}
-
-machine-links:
- @rm -f machine i386
- @ln -s ${.CURDIR}/../.. i386
- @ln -s ${.CURDIR}/../../include machine
+all: ${SALIB}
install:
diff --git a/sys/arch/i386/stand/libsa/bioscons.c b/sys/arch/i386/stand/libsa/bioscons.c
index 98b852b1d78..8bb6cea7698 100644
--- a/sys/arch/i386/stand/libsa/bioscons.c
+++ b/sys/arch/i386/stand/libsa/bioscons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bioscons.c,v 1.15 1998/05/16 07:32:17 deraadt Exp $ */
+/* $OpenBSD: bioscons.c,v 1.16 1998/05/28 20:52:39 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -39,7 +39,7 @@
#include <dev/ic/mc146818reg.h>
#include <dev/ic/comreg.h>
#include <dev/ic/ns16450reg.h>
-#include <i386/isa/nvram.h>
+/* #include <i386/isa/nvram.h> */
#include <dev/cons.h>
#include <lib/libsa/stand.h>
#include "debug.h"
diff --git a/sys/arch/i386/stand/libz/Makefile b/sys/arch/i386/stand/libz/Makefile
index acd871f54df..b5f83b6e49b 100644
--- a/sys/arch/i386/stand/libz/Makefile
+++ b/sys/arch/i386/stand/libz/Makefile
@@ -1,19 +1,11 @@
-# $OpenBSD: Makefile,v 1.8 1998/05/25 19:04:56 mickey Exp $
+# $OpenBSD: Makefile,v 1.9 1998/05/28 20:52:41 mickey Exp $
# $NetBSD: Makefile,v 1.2 1997/01/22 01:36:30 cgd Exp $
S=${.CURDIR}/../../../..
ZDST=${.OBJDIR}
SADIR=${.CURDIR}/..
-CLEANFILES= i386 machine
.PATH: ${S}/lib/libz
-all: machine-links
-
-machine-links:
- @rm -f machine i386
- @ln -fs ${.CURDIR}/../.. i386
- @ln -fs ${.CURDIR}/../../include machine
-
.include "${S}/lib/libz/Makefile"
CFLAGS+=${SACFLAGS} -I${S}/lib/libsa -DDYNAMIC_CRC_TABLE
diff --git a/sys/arch/i386/stand/mbr/Makefile b/sys/arch/i386/stand/mbr/Makefile
index 74e84d4a41f..b9e08f9bac1 100644
--- a/sys/arch/i386/stand/mbr/Makefile
+++ b/sys/arch/i386/stand/mbr/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 1998/05/25 19:06:41 mickey Exp $
+# $OpenBSD: Makefile,v 1.8 1998/05/28 20:52:42 mickey Exp $
#
PROG= mbr
@@ -9,18 +9,11 @@ LDFLAGS=-nostdlib -Ttext 0 -x -N -s -Bstatic
MAN+= mbr.8
INSTALL_STRIP=
SADIR=${.CURDIR}/..
-CLEANFILES= i386 machine
+S= ${.CURDIR}/../../../..
# Uncomment this to make mbr talk to a serial port.
#CPPFLAGS+=-DSERIAL=0
-all: machine-links
-
-machine-links:
- @rm -f machine i386
- @ln -fs ${.CURDIR}/../.. i386
- @ln -fs ${.CURDIR}/../../include machine
-
${PROG}: $(OBJS) $(DPADD)
$(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDADD)
@size $(PROG)