summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2007-03-18 15:37:07 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2007-03-18 15:37:07 +0000
commit4e690646a79464178bbb3367c068ce4230d0303d (patch)
treea44bd1222184dd4f856f4b4270cf9819f157d102 /usr.bin
parent8b8ddeb427826bd368aaf021c710bfd7a3408f46 (diff)
allow this to build w/ cross-tools thru providing proper hostcflags; found by rainor's work
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/awk/Makefile5
-rw-r--r--usr.bin/make/Makefile18
2 files changed, 14 insertions, 9 deletions
diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile
index 92220707a06..89982e96190 100644
--- a/usr.bin/awk/Makefile
+++ b/usr.bin/awk/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2004/12/30 01:52:48 millert Exp $
+# $OpenBSD: Makefile,v 1.8 2007/03/18 15:37:06 mickey Exp $
PROG= awk
LINKS= ${BINDIR}/awk ${BINDIR}/nawk
@@ -7,6 +7,7 @@ LDADD= -lm
DPADD= ${LIBM}
CLEANFILES+=proctab.c maketab ytab.c ytab.h
CFLAGS+=-I. -I${.CURDIR} -DHAS_ISBLANK -DNDEBUG
+HOSTCFLAGS+=-I. -I${.CURDIR} -DHAS_ISBLANK -DNDEBUG
MLINKS= awk.1 nawk.1
# This just gets installed verbatim
@@ -23,6 +24,6 @@ proctab.c: maketab
./maketab >proctab.c
maketab: ytab.h maketab.c
- ${HOSTCC} ${CFLAGS} ${.CURDIR}/maketab.c -o $@
+ ${HOSTCC} ${HOSTCFLAGS} ${.CURDIR}/maketab.c -o $@
.include <bsd.prog.mk>
diff --git a/usr.bin/make/Makefile b/usr.bin/make/Makefile
index eb84dd5b781..6fd4594126f 100644
--- a/usr.bin/make/Makefile
+++ b/usr.bin/make/Makefile
@@ -1,15 +1,19 @@
-# $OpenBSD: Makefile,v 1.39 2006/04/25 11:47:43 espie Exp $
+# $OpenBSD: Makefile,v 1.40 2007/03/18 15:37:06 mickey Exp $
PROG= make
CFLAGS+= -I${.OBJDIR} -I${.CURDIR}
+HOSTCFLAGS+= -I${.OBJDIR} -I${.CURDIR}
CDIAGFLAGS=-Wall -W -Wno-char-subscripts -Wstrict-prototypes -pedantic \
-Wmissing-prototypes
-CFLAGS+=-DUSE_TIMESPEC
-CFLAGS+=-DHAS_BOOL_H
-CFLAGS+=-DHAS_PATHS_H
-CFLAGS+=-DHAS_EXTENDED_GETCWD
-#CFLAGS+=-DHAS_STATS
+CDEFS+=-DUSE_TIMESPEC
+CDEFS+=-DHAS_BOOL_H
+CDEFS+=-DHAS_PATHS_H
+CDEFS+=-DHAS_EXTENDED_GETCWD
+#CDEFS+=-DHAS_STATS
+
+CFLAGS+=${CDEFS}
+HOSTCFLAGS+=${CDEFS}
SRCS= arch.c buf.c cmd_exec.c compat.c cond.c dir.c error.c for.c \
init.c job.c lowparse.c main.c make.c memory.c parse.c \
@@ -38,7 +42,7 @@ condhashconsts.h: generate
${.OBJDIR}/generate 2 ${MAGICCONDSLOTS} >${.TARGET}
generate: generate.c stats.c memory.c
- ${HOSTCC} ${LDSTATIC} -o ${.TARGET} ${CFLAGS} ${.ALLSRC} ${LDADD}
+ ${HOSTCC} ${LDSTATIC} -o ${.TARGET} ${HOSTCFLAGS} ${.ALLSRC} ${LDADD}
check: regress.o str.o memory.o buf.o
${CC} -o ${.TARGET} ${CFLAGS} ${.ALLSRC} ${LDADD}