kumquat-buildroot/package/cgic/0001-prepare_makefile.patch
David Bender 5bda8c9681 cgic: new package
Signed-off-by: Dave Bender <bender@benegon.com>
Signed-off-by: David Bender <codehero@gmail.com>
[yann.morin.1998@free.fr: simplify rules to use -C $(@D); do not install
 in target/ ; add description to patches; split patches into independent
 changes; add hash]
[Thomas: fix minor typos in patch description.]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-25 19:21:51 +01:00

45 lines
1.3 KiB
Diff

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