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
|
--- ./hnb-1.9.18/Makefile.orig 2003-08-27 04:50:58.000000000 +0200
+++ ./hnb-1.9.18/Makefile 2009-10-23 14:23:16.000000000 +0200
@@ -1,19 +1,19 @@
src/hnb: src/*.c src/*.h src/*.inc src/hnbrc.inc
- (cd src;make)
+ (cd src;$(MAKE))
install: src/hnb
install -D src/hnb /usr/local/bin/hnb
install -D -m444 doc/hnb.1 /usr/local/man/man1/hnb.1
clean:
- (cd src;make clean)
- (cd util;make clean)
+ (cd src;$(MAKE) clean)
+ (cd util;$(MAKE) clean)
rm -f *~
rcupdate: updaterc
updaterc: src/hnbrc.inc
src/hnbrc.inc: doc/hnbrc
- (cd util;make)
+ (cd util;$(MAKE))
echo -n "\"">src/hnbrc.inc
cat doc/hnbrc | util/asc2c >> src/hnbrc.inc
echo "\"">>src/hnbrc.inc
--- ./hnb-1.9.18/hnb-1.9.18/Makefile.orig 2003-08-27 04:50:58.000000000 +0200
+++ ./hnb-1.9.18/hnb-1.9.18/Makefile 2009-10-23 14:23:16.000000000 +0200
@@ -1,19 +1,19 @@
src/hnb: src/*.c src/*.h src/*.inc src/hnbrc.inc
- (cd src;make)
+ (cd src;$(MAKE))
install: src/hnb
install -D src/hnb /usr/local/bin/hnb
install -D -m444 doc/hnb.1 /usr/local/man/man1/hnb.1
clean:
- (cd src;make clean)
- (cd util;make clean)
+ (cd src;$(MAKE) clean)
+ (cd util;$(MAKE) clean)
rm -f *~
rcupdate: updaterc
updaterc: src/hnbrc.inc
src/hnbrc.inc: doc/hnbrc
- (cd util;make)
+ (cd util;$(MAKE))
echo -n "\"">src/hnbrc.inc
cat doc/hnbrc | util/asc2c >> src/hnbrc.inc
echo "\"">>src/hnbrc.inc
--- ./hnb-1.9.18/src/Makefile.orig 2003-08-27 04:50:58.000000000 +0200
+++ ./hnb-1.9.18/src/Makefile 2009-10-23 14:23:16.000000000 +0200
@@ -1,5 +1,6 @@
LIBS=-lncurses libcli/libcli.a
-CFLAGS=-I.. -Ilibcli -DHAVE_CONFIG_H -Wall -pedantic -g
+CFLAGS+=-Wall -pedantic
+CPPFLAGS+=-I.. -Ilibcli -DHAVE_CONFIG_H
CFILES=$(wildcard *.c)
OBJS=$(patsubst %.c,%.o,$(CFILES))
@@ -8,12 +9,12 @@
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
hnb: libcli/libcli.a Makefile $(OBJS) init_subsystems.c *.h *.inc
- $(CC) -o hnb $(OBJS) $(LIBS) $(CFLAGS)
+ $(CC) -o hnb $(OBJS) $(LIBS) $(CFLAGS) $(LDFLAGS)
# strip hnb
libcli/libcli.a: libcli/*.c
- (cd libcli;make libcli.a)
+ (cd libcli;$(MAKE) libcli.a)
libcli/libcli_p.a: libcli/*.c
- (cd libcli;make libcli_p.a)
+ (cd libcli;$(MAKE) libcli_p.a)
init_subsystems.c: *.c
echo "/* this file is autogenerated, do not edit */">init_subsystems.c
cat *.c | grep "^\!init_" | sort | sed -e "s/^\!/void /g">>init_subsystems.c
@@ -23,7 +24,7 @@
echo "}">>init_subsystems.c
clean:
rm -f xml_debug hnb $(OBJS) *~ cli_*.inc
- (cd libcli;make clean)
+ (cd libcli;$(MAKE) clean)
hnb_p: *.c libcli/libcli_p.a init_subsystems.c
$(CC) -o hnb_p *.c -pg -lncurses_p libcli/libcli_p.a -I.. -Ilibcli -DHAVE_CONFIG_H
--- ./hnb-1.9.18/src/libcli/Makefile.orig 2003-08-27 04:50:59.000000000 +0200
+++ ./hnb-1.9.18/src/libcli/Makefile 2009-10-23 14:25:37.000000000 +0200
@@ -1,5 +1,3 @@
-CFLAGS = -Wall
-
OBJS = cli.o cli_history.o cli_tokenize.o
all: libcli.a libcli.so test-static test-shared
@@ -9,8 +7,8 @@
libcli.a: $(OBJS)
ar rc libcli.a cli*.o
libcli_p.a:
- $(CC) -pg -c cli.c
- $(CC) -pg -c cli_history.c
+ $(CC) -pg -c cli.c $(CFLAGS)
+ $(CC) -pg -c cli_history.c $(CFLAGS)
ar rcs libcli_p.a cli*.o
libcli.so: $(OBJS)
$(CC) -shared cli*.o -o libcli.so $(CFLAGS) $(LIBS)
|