summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1998-03-07 10:48:15 +0000
committereivind <eivind@FreeBSD.org>1998-03-07 10:48:15 +0000
commit0938d522924733da29ce0529b263b78422b8ccc7 (patch)
tree31831ceea4f6f699ed70f4413b1fec0347829d60 /sys
parentd3607b7ed922720a17174f18b989376a78a77a91 (diff)
downloadFreeBSD-src-0938d522924733da29ce0529b263b78422b8ccc7.zip
FreeBSD-src-0938d522924733da29ce0529b263b78422b8ccc7.tar.gz
Make this handle -j<large>, and avoid .depend pointing at /usr/include.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/boot/Makefile.inc20
-rw-r--r--sys/i386/boot/biosboot/Makefile15
-rw-r--r--sys/i386/boot/kzipboot/Makefile18
-rw-r--r--sys/i386/boot/netboot/Makefile21
-rw-r--r--sys/i386/boot/rawboot/Makefile17
5 files changed, 33 insertions, 58 deletions
diff --git a/sys/i386/boot/Makefile.inc b/sys/i386/boot/Makefile.inc
new file mode 100644
index 0000000..ce48279
--- /dev/null
+++ b/sys/i386/boot/Makefile.inc
@@ -0,0 +1,20 @@
+.if exists(${.CURDIR}/../../../../include)
+CFLAGS+= -nostdinc -I${.CURDIR}/../../../../include
+MKDEP+= -nostdinc -I${.CURDIR}/../../../../include
+.endif
+CFLAGS+= -I${.CURDIR}/../../.. -I${.OBJDIR}
+MKDEP+= -I${.CURDIR}/../../.. -I${.OBJDIR}
+CLEANFILES+= machine
+
+.if defined(SRCS)
+${SRCS:M*.[sS]:R:S/$/.o/g} ${SRCS:M*.c:R:S/$/.o/g}: machine
+${SRCS:M*.cc:R:S/$/.o/g} ${SRCS:M*.C:R:S/$/.o/g}: machine
+${SRCS:M*.cxx:R:S/$/.o/g} ${SRCS:N*.h:R:S/$/.o/g}: machine
+.endif
+.if defined(OBJS)
+${OBJS}: machine
+.endif
+
+beforedepend: machine
+machine:
+ ln -s ${.CURDIR}/../../include ${.OBJDIR}/machine
diff --git a/sys/i386/boot/biosboot/Makefile b/sys/i386/boot/biosboot/Makefile
index 4bd7705..c0e291b 100644
--- a/sys/i386/boot/biosboot/Makefile
+++ b/sys/i386/boot/biosboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.61 1998/01/27 16:56:43 msmith Exp $
+# $Id: Makefile,v 1.62 1998/02/15 21:38:17 eivind Exp $
#
PROG= boot
@@ -14,10 +14,6 @@ CFLAGS= -O2 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
CFLAGS+= -DDO_BAD144
CFLAGS+= -DVESA_SUPPORT
-.if exists(${.CURDIR}/../../../../include)
-CFLAGS+= -nostdinc -I${.CURDIR}/../../../../include
-.endif
-CFLAGS+= -I${.CURDIR}/../../.. -I${.OBJDIR}
CFLAGS+= ${CWARNFLAGS}
# By default, if a serial port is going to be used as console, use COM1
@@ -46,7 +42,7 @@ CFLAGS+= -DCONSPEED=${BOOT_COMCONSOLE_SPEED}
# SCSI and have BIOS drive number (sd_unit_number + BOOT_HD_BIAS). E.g.,
# BOOT_HD_BIAS=1 makes sd(0,a) correspond to 1:sd(0,a) instead of 0:sd(0,a).
-CLEANFILES+= boot.nohdr boot.strip boot1 boot2 machine sizetest
+CLEANFILES+= boot.nohdr boot.strip boot1 boot2 sizetest
LDFLAGS+= -N -T 0 -nostdlib
#LINKS= ${BINDIR}/sdboot ${BINDIR}/wdboot\
# ${BINDIR}/sdboot ${BINDIR}/fdboot\
@@ -88,12 +84,7 @@ boot2: boot.nohdr
exit 2 ; \
fi
-pre-compile:
-.if !exists(${.OBJDIR}/machine)
- ln -s ${.CURDIR}/../../include ${.OBJDIR}/machine
-.endif
-
-all: pre-compile boot1 boot2
+all: boot1 boot2
install:
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}\
diff --git a/sys/i386/boot/kzipboot/Makefile b/sys/i386/boot/kzipboot/Makefile
index 939591d..bd309a7 100644
--- a/sys/i386/boot/kzipboot/Makefile
+++ b/sys/i386/boot/kzipboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.6 1997/02/22 09:31:22 peter Exp $
+# $Id: Makefile,v 1.7 1998/02/15 21:38:17 eivind Exp $
PROG= kztail.o kzhead.o
BINMODE = 444 # target is a relocatable object
@@ -17,29 +17,13 @@ CSEG = 0x8
STRIP= # very important!! don't let kz*.o be stripped
-.if exists(${.CURDIR}/../../../../include)
-CFLAGS+= -nostdinc
-CFLAGS+= -I${.OBJDIR} -I${.CURDIR}/../../../
-CFLAGS+= -I${.CURDIR}/../../../../include
-.endif
-
CFLAGS+= -DKADDR=$(KADDR) -DCSEG=$(CSEG)
CFLAGS+= -DKZIP -DCOMCONSOLE=0x3F8
-CLEANFILES=machine
-
kztail.o: ${OBJS_KZTAIL}
$(LD) -r -x -o kztail.o $(OBJS_KZTAIL)
kzhead.o: ${OBJS_KZHEAD}
$(LD) -r -x -o kzhead.o $(OBJS_KZHEAD)
-pre-compile:
-.if !exists(${.OBJDIR}/machine)
- ln -s ${.CURDIR}/../../include ${.OBJDIR}/machine
-.endif
-
-all: pre-compile ${PROG}
-
-
.include <bsd.prog.mk>
diff --git a/sys/i386/boot/netboot/Makefile b/sys/i386/boot/netboot/Makefile
index 44725f0..1b18f4c 100644
--- a/sys/i386/boot/netboot/Makefile
+++ b/sys/i386/boot/netboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.14 1997/10/07 06:40:16 bde Exp $
+# $Id: Makefile,v 1.15 1998/02/15 21:38:18 eivind Exp $
#
# Makefile for NETBOOT
#
@@ -31,7 +31,6 @@ SRCS= start2.S main.c misc.c bootmenu.c rpc.c
BINDIR= /usr/mdec
BINMODE= 555
-
#CFLAGS= -O2 -DNFS -DROMSIZE=${ROMSIZE} -DRELOC=${RELOCADDR} -DASK_BOOT
CFLAGS= -O2 -DNFS -DROMSIZE=${ROMSIZE} -DRELOC=${RELOCADDR} # -DASK_BOOT
CFLAGS += -DPCI -DPCI_VENDOR=${PCI_VENDOR} -DPCI_DEVICE=${PCI_DEVICE}
@@ -39,19 +38,13 @@ CFLAGS += -DPCI_CLASS=${PCI_CLASS} -DASK_BOOT
#NS8390= -DINCLUDE_WD -DWD_DEFAULT_MEM=0xD0000
NS8390= -DINCLUDE_NE
#NS8390+= -DINCLUDE_3COM -D_3COM_BASE=0x300
-CLEANFILES+= machine netboot.com
+CLEANFILES+= netboot.com
CLEANFILES+= makerom start2.ro 3c509.o ns8390.o
LDFLAGS+= -N -T ${RELOCADDR} -e _start -nostdlib
NOSHARED= YES
MAN8= netboot.8
STRIP=
-.if exists(${.CURDIR}/../../../../include)
-CFLAGS+= -nostdinc
-CFLAGS+= -I${.OBJDIR} -I${.CURDIR}/../../../
-CFLAGS+= -I${.CURDIR}/../../../../include
-.endif
-
ROMSIZE=16384
RELOCADDR=0x90000
@@ -92,11 +85,9 @@ nb3c509.com: start2.o ${SRCS:N*.h:R:S/$/.o/g} 3c509.o
dd ibs=32 skip=1 if=${.TARGET}.tmp of=${.TARGET}
rm -f ${.TARGET}.tmp
-pre-compile:
-.if !exists(${.OBJDIR}/machine)
- ln -s ${.CURDIR}/../../include ${.OBJDIR}/machine
-.endif
-
-all: pre-compile ${PROG}
+# This force the creation of the "machine" symlink. These objects are
+# specially handled in this file, and thus can't be taken care of in
+# ../Makefile.inc
+3c509.o makerom ns8390.o start2.ro: beforedepend
.include <bsd.prog.mk>
diff --git a/sys/i386/boot/rawboot/Makefile b/sys/i386/boot/rawboot/Makefile
index bb17969..5eebcf1 100644
--- a/sys/i386/boot/rawboot/Makefile
+++ b/sys/i386/boot/rawboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.8 1998/01/31 01:20:56 yokota Exp $
+# $Id: Makefile,v 1.9 1998/02/15 21:38:19 eivind Exp $
#
PROG= boot
@@ -19,12 +19,6 @@ CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
CFLAGS+= -I${.CURDIR}/../../..
CFLAGS+= ${CWARNFLAGS}
-.if exists(${.CURDIR}/../../../../include)
-CFLAGS+= -nostdinc
-CFLAGS+= -I${.OBJDIR} -I${.CURDIR}/../../../
-CFLAGS+= -I${.CURDIR}/../../../../include
-.endif
-
# By default, if a serial port is going to be used as console, use COM1
# (aka /dev/ttyd0).
BOOT_COMCONSOLE_PORT?=0x3F8
@@ -51,7 +45,7 @@ CFLAGS+= -DCONSPEED=${BOOT_COMCONSOLE_SPEED}
# SCSI and have BIOS drive number (sd_unit_number + BOOT_HD_BIAS). E.g.,
# BOOT_HD_BIAS=1 makes sd(0,a) correspond to 1:sd(0,a) instead of 0:sd(0,a).
-CLEANFILES+= boot.nohdr boot.strip machine rawboot sizetest
+CLEANFILES+= boot.nohdr boot.strip rawboot sizetest
LDFLAGS+= -N -T 0 -nostdlib
NOSHARED= YES
NOMAN=
@@ -80,12 +74,7 @@ boot.nohdr: boot.strip
rawboot: boot.nohdr
dd if=boot.nohdr of=rawboot bs=8k count=1 conv=sync
-pre-compile:
-.if !exists(${.OBJDIR}/machine)
- ln -s ${.CURDIR}/../../include ${.OBJDIR}/machine
-.endif
-
-all: pre-compile rawboot
+all: rawboot
install:
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}\
OpenPOWER on IntegriCloud