summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-09 01:33:41 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-09 01:33:41 +0000
commit81fdb1c9d870ea7675764665befe8112a17eaa0a (patch)
tree4176753b70939297e9c4b7a50332f4d943bf6085
parent6e59b9fd41c9f93eca7367bfbec065c8eddf8444 (diff)
Rudimentary support for compilation in a cross environment
Host tools will be compiled with HOSTCC instead of CC. Note, these are not complete in *any* way\!
-rw-r--r--games/adventure/Makefile3
-rw-r--r--games/fortune/strfile/Makefile10
-rw-r--r--games/hack/Makefile4
-rw-r--r--games/monop/Makefile3
-rw-r--r--games/phantasia/Makefile13
-rw-r--r--share/mk/sys.mk4
-rw-r--r--usr.bin/tn3270/tools/Makefile2
-rw-r--r--usr.bin/tn3270/tools/Makefile.inc4
-rw-r--r--usr.bin/tn3270/tools/mkastods/Makefile2
-rw-r--r--usr.bin/tn3270/tools/mkastosc/Makefile2
-rw-r--r--usr.bin/tn3270/tools/mkdctype/Makefile2
-rw-r--r--usr.bin/tn3270/tools/mkdstoas/Makefile2
-rw-r--r--usr.bin/tn3270/tools/mkhits/Makefile2
13 files changed, 38 insertions, 15 deletions
diff --git a/games/adventure/Makefile b/games/adventure/Makefile
index 8c2df60cc20..db789789b10 100644
--- a/games/adventure/Makefile
+++ b/games/adventure/Makefile
@@ -1,3 +1,4 @@
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:25 niklas Exp $
# $NetBSD: Makefile,v 1.3 1995/03/21 12:04:53 cgd Exp $
# @(#)Makefile 8.1 (Berkeley) 6/12/93
@@ -12,6 +13,6 @@ data.c: glorkz setup
./setup ${.CURDIR}/glorkz > data.c
setup: setup.c hdr.h
- ${CC} -o setup ${.CURDIR}/setup.c
+ ${HOSTCC} -o setup ${.CURDIR}/setup.c
.include <bsd.prog.mk>
diff --git a/games/fortune/strfile/Makefile b/games/fortune/strfile/Makefile
index a8847445274..f1e40ad15ad 100644
--- a/games/fortune/strfile/Makefile
+++ b/games/fortune/strfile/Makefile
@@ -1,7 +1,15 @@
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:26 niklas Exp $
# $NetBSD: Makefile,v 1.5 1995/03/23 08:28:44 cgd Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
-PROG= strfile
+PROG=
MAN= strfile.8
+CLEANFILES+= strfile
+
+all: strfile
+
+strfile: ${.CURDIR}/strfile.c
+ ${HOSTCC} ${CFLAGS} ${.CURDIR}/strfile.c -o $@
+
.include <bsd.prog.mk>
diff --git a/games/hack/Makefile b/games/hack/Makefile
index 4fa0fc045d0..aeeaae420b3 100644
--- a/games/hack/Makefile
+++ b/games/hack/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 1995/03/23 08:29:07 cgd Exp $
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:28 niklas Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= hack
@@ -27,7 +27,7 @@ hack.onames.h: makedefs def.objects.h
${.OBJDIR}/makedefs ${.CURDIR}/def.objects.h > hack.onames.h
makedefs: makedefs.c
- ${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${.CURDIR}/${.PREFIX}.c ${LDADD}
+ ${HOSTCC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${.CURDIR}/${.PREFIX}.c ${LDADD}
beforeinstall:
install -c -o games -g games -m 600 /dev/null \
diff --git a/games/monop/Makefile b/games/monop/Makefile
index 0b692e3d6c4..711fe8884dd 100644
--- a/games/monop/Makefile
+++ b/games/monop/Makefile
@@ -1,3 +1,4 @@
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:29 niklas Exp $
# $NetBSD: Makefile,v 1.12 1995/03/23 08:34:32 cgd Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
@@ -16,7 +17,7 @@ cards.pck: initdeck
${.OBJDIR}/initdeck ${.CURDIR}/cards.inp
initdeck: initdeck.c
- ${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${.CURDIR}/initdeck.c ${LDADD}
+ ${HOSTCC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${.CURDIR}/initdeck.c ${LDADD}
beforeinstall:
install -c -o ${BINOWN} -g ${BINGRP} -m 444 cards.pck \
diff --git a/games/phantasia/Makefile b/games/phantasia/Makefile
index aa068e8bd64..4b82358160b 100644
--- a/games/phantasia/Makefile
+++ b/games/phantasia/Makefile
@@ -1,3 +1,4 @@
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:30 niklas Exp $
# $NetBSD: Makefile,v 1.4 1995/03/24 03:58:22 cgd Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
@@ -11,8 +12,14 @@ CLEANFILES+=map setup setup.o
all: setup phantasia
-setup: phantglobs.o setup.o monsters.asc ${LIBM}
- ${CC} phantglobs.o setup.o -o ${.TARGET} -lm
+setup.o: setup.c
+ ${HOSTCC} -c setup.c -o ${.TARGET}
+
+phantglobs.o.bld: phantglobs.c
+ ${HOSTCC} -c phantglobs.c -o ${.TARGET}
+
+setup: phantglobs.o.bld setup.o monsters.asc ${LIBM}
+ ${HOSTCC} phantglobs.o.bld setup.o -o ${.TARGET} -lm
beforeinstall:
./setup -m ${.CURDIR}/monsters.asc
@@ -22,7 +29,7 @@ beforeinstall:
# PLOTDEVICE is used for plotting the map. Change as appropriate.
map: map.c
- ${CC} -O ${.CURDIR}/map.c -lplot -o ${.TARGET}
+ ${HOSTCC} -O ${.CURDIR}/map.c -lplot -o ${.TARGET}
./map | plot > /dev/tty
# XXX this rule shouldn't be here.
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index ec11555db73..b0617abee4f 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: sys.mk,v 1.4 1996/03/05 11:13:06 mickey Exp $
+# $OpenBSD: sys.mk,v 1.5 1996/03/09 01:33:31 niklas Exp $
# $NetBSD: sys.mk,v 1.22 1995/09/24 23:49:09 christos Exp $
# @(#)sys.mk 5.11 (Berkeley) 3/13/91
@@ -24,6 +24,8 @@ CFLAGS?= -O
COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
+HOSTCC?= cc
+
CXX?= g++
CXXFLAGS?= ${CFLAGS}
COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
diff --git a/usr.bin/tn3270/tools/Makefile b/usr.bin/tn3270/tools/Makefile
index 9cb42d1e8e4..1233e3be51b 100644
--- a/usr.bin/tn3270/tools/Makefile
+++ b/usr.bin/tn3270/tools/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1995/10/18 08:46:23 deraadt Exp $
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:33 niklas Exp $
SUBDIR = mkhits mkastosc mkastods mkdstoas mkdctype
diff --git a/usr.bin/tn3270/tools/Makefile.inc b/usr.bin/tn3270/tools/Makefile.inc
new file mode 100644
index 00000000000..944d3ec4e01
--- /dev/null
+++ b/usr.bin/tn3270/tools/Makefile.inc
@@ -0,0 +1,4 @@
+# $OpenBSD: Makefile.inc,v 1.1 1996/03/09 01:33:34 niklas Exp $
+
+CC=${HOSTCC}
+DESTDIR=/
diff --git a/usr.bin/tn3270/tools/mkastods/Makefile b/usr.bin/tn3270/tools/mkastods/Makefile
index 3a78845d9a2..0b08a73c0e0 100644
--- a/usr.bin/tn3270/tools/mkastods/Makefile
+++ b/usr.bin/tn3270/tools/mkastods/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1995/10/18 08:46:23 deraadt Exp $
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:35 niklas Exp $
CFLAGS += -I${.CURDIR}/.. -I.
diff --git a/usr.bin/tn3270/tools/mkastosc/Makefile b/usr.bin/tn3270/tools/mkastosc/Makefile
index 7e38f3415fa..bbcebf63cd7 100644
--- a/usr.bin/tn3270/tools/mkastosc/Makefile
+++ b/usr.bin/tn3270/tools/mkastosc/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1995/10/18 08:46:24 deraadt Exp $
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:36 niklas Exp $
CFLAGS += -I${.CURDIR}/../mkhits -I${.CURDIR}/.. -I.
diff --git a/usr.bin/tn3270/tools/mkdctype/Makefile b/usr.bin/tn3270/tools/mkdctype/Makefile
index a7e927c5c65..420aba6a74d 100644
--- a/usr.bin/tn3270/tools/mkdctype/Makefile
+++ b/usr.bin/tn3270/tools/mkdctype/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1995/10/18 08:46:24 deraadt Exp $
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:37 niklas Exp $
CFLAGS += -I${.CURDIR}/.. -I.
diff --git a/usr.bin/tn3270/tools/mkdstoas/Makefile b/usr.bin/tn3270/tools/mkdstoas/Makefile
index 1f924fc7fad..89bc021b2ac 100644
--- a/usr.bin/tn3270/tools/mkdstoas/Makefile
+++ b/usr.bin/tn3270/tools/mkdstoas/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1995/10/18 08:46:24 deraadt Exp $
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:39 niklas Exp $
CFLAGS += -I${.CURDIR}/.. -I.
diff --git a/usr.bin/tn3270/tools/mkhits/Makefile b/usr.bin/tn3270/tools/mkhits/Makefile
index bbfe2b1196a..54febaeb332 100644
--- a/usr.bin/tn3270/tools/mkhits/Makefile
+++ b/usr.bin/tn3270/tools/mkhits/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1995/10/18 08:46:25 deraadt Exp $
+# $OpenBSD: Makefile,v 1.2 1996/03/09 01:33:40 niklas Exp $
CFLAGS += -I${.CURDIR}/.. -I.