blob: 7cf011b1c8dcaa40b1e5aa701b0aa2cc750dec08 (
plain)
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
From 7fa0d31ec5c0be9dca84a03851b2d44f61527ec8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
Date: Sun, 4 Dec 2011 16:01:04 +0100
Subject: [PATCH] GNUmakefile: add possibility to override variables
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
this is useful for cross compilation
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
Upstream-Status: Inappropriate [embedded specific]
src/libbsd/GNUmakefile | 10 +++++-----
src/libmy/GNUmakefile | 26 +++++++++++++-------------
src/nhttpd/GNUmakefile | 12 ++++++------
src/tools/GNUmakefile | 8 ++++----
4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/libbsd/GNUmakefile b/src/libbsd/GNUmakefile
index e2d01a3..b034bc6 100644
--- a/src/libbsd/GNUmakefile
+++ b/src/libbsd/GNUmakefile
@@ -1,12 +1,12 @@
-CCFLAGS = -O2 -pipe -Wall -Werror -Wstrict-prototypes -c
+CFLAGS := -O2 -pipe -Wall -Werror -Wstrict-prototypes -c
libbsd.a: strlcpy.o strlcat.o
- ar -r libbsd.a strlcpy.o strlcat.o
- ranlib libbsd.a
+ $(AR) -r libbsd.a strlcpy.o strlcat.o
+ $(RANLIB) libbsd.a
strlcpy.o: strlcpy.c
- cc ${CCFLAGS} strlcpy.c
+ $(CC) $(CFLAGS) strlcpy.c
strlcat.o: strlcat.c
- cc ${CCFLAGS} strlcat.c
+ $(CC) $(CFLAGS) strlcat.c
clean:
rm -f libbsd.a *.o
diff --git a/src/libmy/GNUmakefile b/src/libmy/GNUmakefile
index ce90dd9..891ffea 100644
--- a/src/libmy/GNUmakefile
+++ b/src/libmy/GNUmakefile
@@ -1,30 +1,30 @@
-CCFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -c
+CFLAGS := -O2 -Wall -Werror -Wstrict-prototypes -c
libmy.a: strcutl.o strcutw.o strcuts.o strcuti.o strcutf.o flog.o flogd.o fparse.o strlower.o strb64d.o
- ar -r libmy.a strcutl.o strcutw.o strcuts.o strcuti.o strcutf.o flog.o flogd.o fparse.o strlower.o strb64d.o
- ranlib libmy.a
+ $(AR) -r libmy.a strcutl.o strcutw.o strcuts.o strcuti.o strcutf.o flog.o flogd.o fparse.o strlower.o strb64d.o
+ $(RANLIB) libmy.a
strcutl.o: strcutl.c
- cc ${CCFLAGS} strcutl.c
+ $(CC) $(CFLAGS) strcutl.c
strcutw.o: strcutw.c
- cc ${CCFLAGS} strcutw.c
+ $(CC) $(CFLAGS) strcutw.c
strcuts.o: strcuts.c
- cc ${CCFLAGS} strcuts.c
+ $(CC) $(CFLAGS) strcuts.c
strcuti.o: strcuti.c
- cc ${CCFLAGS} strcuti.c
+ $(CC) $(CFLAGS) strcuti.c
strcutf.o: strcutf.c
- cc ${CCFLAGS} strcutf.c
+ $(CC) $(CFLAGS) strcutf.c
strlower.o: strlower.c
- cc ${CCFLAGS} strlower.c
+ $(CC) $(CFLAGS) strlower.c
strb64d.o: strb64d.c
- cc ${CCFLAGS} strb64d.c
+ $(CC) $(CFLAGS) strb64d.c
flog.o: flog.c
- cc ${CCFLAGS} flog.c
+ $(CC) $(CFLAGS) flog.c
flogd.o: flogd.c
- cc ${CCFLAGS} flogd.c
+ $(CC) $(CFLAGS) flogd.c
fparse.o: fparse.c
- cc ${CCFLAGS} fparse.c
+ $(CC) $(CFLAGS) fparse.c
clean:
rm -f libmy.a *.o
diff --git a/src/nhttpd/GNUmakefile b/src/nhttpd/GNUmakefile
index f6d12de..9524911 100644
--- a/src/nhttpd/GNUmakefile
+++ b/src/nhttpd/GNUmakefile
@@ -1,18 +1,18 @@
-CCFLAGS = -O2 -pipe -Wall -Wstrict-prototypes -c
+CFLAGS := -O2 -pipe -Wall -Wstrict-prototypes -c
nhttpd: main.o http.o sys.o
- cc -L../libmy -L../libbsd -o nhttpd main.o http.o sys.o -lmy -lbsd -lssl -lcrypt
- strip nhttpd
+ $(CC) -L../libmy -L../libbsd -o nhttpd main.o http.o sys.o -lmy -lbsd -lssl -lcrypt
+# $(STRIP) nhttpd
nroff -Tascii -c -mandoc nhttpd.8 > nhttpd.cat8
main.o: main.c
- cc ${CCFLAGS} main.c
+ $(CC) $(CFLAGS) main.c
http.o: http.c
- cc ${CCFLAGS} http.c
+ $(CC) $(CFLAGS) http.c
sys.o: sys.c
- cc ${CCFLAGS} sys.c
+ $(CC) $(CFLAGS) sys.c
clean:
rm -f nhttpd nhttpd.cat8 *.o
diff --git a/src/tools/GNUmakefile b/src/tools/GNUmakefile
index 15bea61..663ddb5 100644
--- a/src/tools/GNUmakefile
+++ b/src/tools/GNUmakefile
@@ -1,11 +1,11 @@
-CCFLAGS = -O2 -pipe -Wall -Werror -Wstrict-prototypes -c
+CCFLAGS := -O2 -pipe -Wall -Werror -Wstrict-prototypes
crypt: crypt.o
- cc -o crypt crypt.o -lcrypt
- strip crypt
+ $(CC) $(CFLAGS) -o crypt crypt.o -lcrypt
+# $(STRIP) crypt
crypt.o: crypt.c
- cc ${CCFLAGS} crypt.c
+ $(CC) $(CFLAGS) -c crypt.c
clean:
rm -f crypt *.o
--
1.7.6.4
|