fix build on mips64.

no bump, because !mips64 packages didn't change, and mips64 didn't package.

ok mbalmer@ (some time ago)
This commit is contained in:
jasper 2008-02-10 18:23:24 +00:00
parent 0dc9544cbe
commit 1067ad1896
2 changed files with 19 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.13 2007/06/11 21:02:40 jasper Exp $
# $OpenBSD: Makefile,v 1.14 2008/02/10 18:23:24 jasper Exp $
COMMENT= record and analyze your meals for nutrient composition
@ -24,4 +24,11 @@ ALL_TARGET= nut
USE_GMAKE= Yes
# gcc 3.3.5 internal compiler error
.if ${MACHINE_ARCH} == "mips64"
EXTRA_CFLAGS= -O0
.endif
MAKE_FLAGS+= EXTRA_CFLAGS=${EXTRA_CFLAGS}
.include <bsd.port.mk>

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-Makefile,v 1.3 2006/11/30 17:38:27 jasper Exp $
--- Makefile.orig Fri Sep 1 01:45:53 2006
+++ Makefile Sun Nov 26 19:54:27 2006
@@ -1,9 +1,9 @@
$OpenBSD: patch-Makefile,v 1.4 2008/02/10 18:23:24 jasper Exp $
--- Makefile.orig Mon Jan 29 06:06:37 2007
+++ Makefile Wed Jan 30 07:14:50 2008
@@ -1,14 +1,24 @@
objects := $(patsubst %.c,%.o,$(wildcard *.c))
-CFLAGS= -Os -s -Wall -DNUTDIR=\".nutdb\" -DFOODDIR=\"/usr/local/lib/nut\" -ansi -pedantic
@ -11,9 +11,15 @@ $OpenBSD: patch-Makefile,v 1.3 2006/11/30 17:38:27 jasper Exp $
- gcc ${CFLAGS} -lm -o nut $(objects)
+ ${CC} ${CFLAGS} -lm -o nut $(objects)
+anameal.o: anameal.c
+ ${CC} ${CFLAGS} $(EXTRA_CFLAGS) -c $< -o $@
+
+food.o: food.c
+ ${CC} ${CFLAGS} $(EXTRA_CFLAGS) -c $< -o $@
+
deps:
makedepend *.c
@@ -11,4 +11,8 @@ deps:
clean:
rm -f *.o nut preprocess/*.o preprocess/dbjw