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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
--- a/argh/Makefile
+++ b/argh/Makefile
@@ -16,12 +16,12 @@
all: libargh.so libargh.a
libargh.so: argh.lo
- $(CXX) -g -shared -Wl,-soname=$@ -o $@ $^
+ $(CXX) -shared -Wl,-soname=$@ -o $@ $^
argh.lo: argh.cc
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -fpic -o $@ -c $<
libargh.a: argh.o
- ar -rc $@ $^
+ $(AR) -rc $@ $^
include depfun.mak
--- a/argh/Makefile.sets
+++ b/argh/Makefile.sets
@@ -1,21 +1,18 @@
-CC=gcc
-CPP=g++
#CXX=g++-2.95
-CXX=g++
#CXX=remotegcc -soktober -- g++
# Options for compiling, generally.
-CPPFLAGS=-DVERSION=\"$(VERSION)\" -pipe -g
+CPPFLAGS+=-DVERSION=\"$(VERSION)\"
# -fmessage-length=0
WARNINGS=-Wall -W -pedantic \
- -Wundef -Wcast-qual -Wpointer-arith -Wstrict-prototypes \
- -Wconversion -Wmissing-prototypes -Wwrite-strings \
+ -Wundef -Wcast-qual -Wpointer-arith \
+ -Wconversion -Wwrite-strings \
-Wsign-compare -Wredundant-decls
# -Wtraditional -Wcast-align
# C specific warnings
-CCOPTS=$(WARNINGS) -Waggregate-return -Wshadow -Winline
+CCOPTS=$(WARNINGS) -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wshadow -Winline
# C++ specific warnings
CXXOPTS=$(WARNINGS)
@@ -25,9 +22,8 @@
#-march=pentiumpro
# Flags.
-CFLAGS=$(OPTIM) $(CCOPTS)
-CXXFLAGS=$(OPTIM) $(CXXOPTS) -fno-default-inline
+CFLAGS+=$(CCOPTS)
+CXXFLAGS+=$(CXXOPTS) -fno-default-inline
#-fno-rtti
#LDFLAGS=-pg -ax
-LDFLAGS=-g
--- a/Makefile
+++ b/Makefile
@@ -19,9 +19,9 @@
SUBDIRS=argh
# For DYNAMIC argh-linking, use:
-ARGHLINK=-Largh -largh
+#ARGHLINK=-Largh -largh
# For STATIC argh-linking, use:
-#ARGHLINK=argh/libargh.a
+ARGHLINK=argh/libargh.a
all: subdirs ${PROG}
@@ -29,8 +29,8 @@
$(SUBDIRS):
@$(MAKE) -C $@
-${PROG}: $(OBJS)
- $(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(ARGHLINK)
+${PROG}: $(OBJS) subdirs
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -Iargh -o $@ $< $(LDLIBS) $(ARGHLINK)
include depfun.mak
--- a/Makefile.sets
+++ b/Makefile.sets
@@ -1,22 +1,18 @@
INSTALL=install
-CC=gcc
-CXX=g++
-CPP=$(CC)
-LDFLAGS=-g
#LDLIBS=-lstdc++
-CWARNINGS=-Wall -W -pipe -g \
+CWARNINGS=-Wall -W \
-Wundef \
- -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes \
- -Wmissing-prototypes -Winline
+ -Wcast-qual -Wcast-align -Wwrite-strings \
+ -Winline
# -Wtraditional -fmessage-length=128
-CXXFLAGS=-pedantic -ffast-math $(CWARNINGS)
+CXXFLAGS+=-pedantic $(CWARNINGS)
#CFLAGS=-O3 -fomit-frame-pointer -ffast-math $(CWARNINGS)
-CFLAGS=-O -g $(CWARNINGS)
+CFLAGS+=-Wmissing-prototypes -Wstrict-prototypes $(CWARNINGS)
-CPPFLAGS=-DVERSION=\"$(VERSION)\" \
+CPPFLAGS+=-Iargh -DVERSION=\"$(VERSION)\" \
-DCONFIG=\"$(CFGDIR)/$(CFGFILE)\" \
-DBINDIR=\"$(BINDIR)\" $(DEFS)
|