1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
--- Makefile.org 2012-04-24 19:13:25.000000000 +0200
+++ Makefile 2012-04-25 20:45:25.721953488 +0200
@@ -8,15 +8,6 @@
EXECUTABLE := nut
LIBS := -lm
-FLTK_CONFIG := $(shell fltk-config --version 2>/dev/null)
-ifeq ($(FLTK_CONFIG),)
-HAVE_FLTK = 0
-FLTK_NUT =
-else
-HAVE_FLTK = 1
-FLTK_NUT = fltk/Nut
-endif
-
OS := $(shell uname -s)
ifeq ($(OS),HP-UX)
CC = cc
@@ -25,7 +16,7 @@
OPT = -O1
endif
-CFLAGS := $(OPT) -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
+CFLAGS += -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
ifeq ($(CC),gcc)
CFLAGS += $(OPT) -Wall -fno-inline -ansi
endif
@@ -38,7 +29,7 @@
all: nut $(FLTK_NUT)
nut: $(OBJS)
- $(CC) $(OPT) -o $(EXECUTABLE) $(OBJS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXECUTABLE) $(OBJS) $(LIBS)
ifeq ($(HAVE_FLTK),1)
$(FLTK_NUT):
--- fltk/Makefile.org 2012-04-24 19:13:01.000000000 +0200
+++ fltk/Makefile 2012-04-25 20:48:45.668679700 +0200
@@ -5,7 +5,7 @@
NUTDIR := \".nutdb\"
FOODDIR := \"$(libdir)\"
EXECUTABLE := Nut
-LIBS := `fltk-config --ldflags`
+LIBS := $(shell fltk-config --ldflags)
OS := $(shell uname -s)
ifeq ($(OS),HP-UX)
@@ -16,11 +16,7 @@
OPT = -Os
endif
-CFLAGS := -I.. `fltk-config --optim --cflags` $(OPT) -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
-
-ifeq ($(CXX),g++)
-CFLAGS := -I.. `fltk-config --optim --cflags` -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR) -Wall -fno-inline -ansi
-endif
+CFLAGS := -I.. $(shell fltk-config --optim --cflags) $(OPT) -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR) -Wall -fno-inline -ansi
CXXFLAGS := $(CFLAGS)
@@ -28,7 +24,7 @@
OBJS := ../anameal.o ../db.o ../food.o ../meal.o ../options.o ../prtmenu.o ../recmeal.o ../util.o $(patsubst %.cc,%.o,$(SOURCE))
nut: $(OBJS)
- $(CXX) $(OPT) -o $(EXECUTABLE) $(OBJS) $(LIBS)
+ $(CXX) $(CFLAGS) $(LDFLAGS) -o $(EXECUTABLE) $(OBJS) $(LIBS)
deps:
makedepend -Y.. ../anameal.c ../db.c ../food.c ../meal.c ../options.c ../prtmenu.c ../recmeal.c ../util.c *.cc >/dev/null 2>&1
|