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
70
71
|
--- nut-16.12.orig//fltk/Makefile
+++ nut-16.12/fltk/Makefile
@@ -16,7 +16,7 @@
CXX = g++
endif
-CFLAGS := -I.. `fltk-config --optim --cflags` -O -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
+CFLAGS += -I.. `fltk-config --optim --cflags` -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
ifeq ($(CXX),g++)
CFLAGS += -Wall -fno-inline -ansi
@@ -28,7 +28,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) -O -o $(EXECUTABLE) $(OBJS) $(LIBS)
+ $(CXX) $(LDFLAGS) -o $(EXECUTABLE) $(OBJS) $(LIBS)
deps:
makedepend -Y. *.h *.cc >/dev/null 2>&1
--- nut-16.12.orig//Makefile
+++ nut-16.12/Makefile
@@ -1,4 +1,4 @@
-prefix = /usr/local
+prefix = /usr
libdir = $(prefix)/lib/nut
bindir = $(prefix)/bin
mandir = $(prefix)/man/man1
@@ -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
@@ -24,7 +15,7 @@
CC = gcc
endif
-CFLAGS := -O -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
+CFLAGS += -DNUTDIR=$(NUTDIR) -DFOODDIR=$(FOODDIR)
ifeq ($(CC),gcc)
CFLAGS += -Wall -fno-inline -ansi
endif
@@ -34,15 +25,10 @@
SOURCE := $(wildcard *.c)
OBJS := $(patsubst %.c,%.o,$(SOURCE))
-all: nut $(FLTK_NUT)
+all: nut
nut: $(OBJS)
- $(CC) -O -o $(EXECUTABLE) $(OBJS) $(LIBS)
-
-ifeq ($(HAVE_FLTK),1)
-$(FLTK_NUT):
- -cd fltk; $(MAKE)
-endif
+ $(CC) $(LDFLAGS) -o $(EXECUTABLE) $(OBJS) $(LIBS)
deps:
makedepend -Y. *.c >/dev/null 2>&1
|