blob: 15adc4cda2dd8df7669228c2daa395a5014e3ce3 (
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
|
Makefile: fix for cross-compilation
Probably-Signed-off-by: Dave Bender <bender@benegon.com>
[yann.morin.1998@free.fr: patch was made by Dave, but he
forgot his SoB line, so I added it]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
diff -rupN cgic206/Makefile cgic206-br/Makefile
--- cgic206/Makefile 2014-03-16 18:17:11.000000000 -0400
+++ cgic206-br/Makefile 2015-01-16 11:18:03.714874000 -0500
@@ -1,15 +1,14 @@
-CFLAGS=-g -Wall
-CC=gcc
-AR=ar
-RANLIB=ranlib
LIBS=-L./ -lcgic
all: libcgic.a cgictest.cgi capture
install: libcgic.a
- cp libcgic.a /usr/local/lib
- cp cgic.h /usr/local/include
- @echo libcgic.a is in /usr/local/lib. cgic.h is in /usr/local/include.
+ cp libcgic.a $(PREFIX)/usr/lib
+ cp cgic.h $(PREFIX)/usr/include
+ @echo libcgic.a is in $(PREFIX)/usr/lib. cgic.h is in $(PREFIX)/usr/include.
+
+cgi.o: cgic.c cgic.h
+ $(CC) $(CFLAGS) cgic.c -o cgic.o
libcgic.a: cgic.o cgic.h
rm -f libcgic.a
@@ -19,10 +18,10 @@ libcgic.a: cgic.o cgic.h
#mingw32 and cygwin users: replace .cgi with .exe
cgictest.cgi: cgictest.o libcgic.a
- gcc cgictest.o -o cgictest.cgi ${LIBS}
+ $(CC) cgictest.o -o cgictest.cgi ${LIBS}
capture: capture.o libcgic.a
- gcc capture.o -o capture ${LIBS}
+ $(CC) capture.o -o capture ${LIBS}
clean:
rm -f *.o *.a cgictest.cgi capture
|