Last change
on this file since 616 was
346,
checked in by neteler, 13 years ago
|
fix compilation on 64bit linux
|
File size:
863 bytes
|
Line | |
---|
1 | OS:=$(shell uname -s) |
---|
2 | CPU:=$(shell uname -m) |
---|
3 | ifeq ($(OS),Darwin) |
---|
4 | MACOS_CFLAGS=-arch x86_64 |
---|
5 | LIBS= -L./ -lcgic /usr/lib/libfcgi.dylib |
---|
6 | else |
---|
7 | ifeq ($(CPU),x86_64) |
---|
8 | LIBS= -L./ -lcgic /usr/lib64/libfcgi.so |
---|
9 | else |
---|
10 | LIBS= -L./ -lcgic /usr/lib/libfcgi.a |
---|
11 | endif |
---|
12 | endif |
---|
13 | CFLAGS=-g -Wall ${MACOS_CFLAGS} |
---|
14 | CC=gcc |
---|
15 | AR=ar |
---|
16 | RANLIB=ranlib |
---|
17 | |
---|
18 | all: libcgic.a cgictest.cgi capture |
---|
19 | |
---|
20 | install: libcgic.a |
---|
21 | mkdir -p ../../dist/lib |
---|
22 | cp libcgic.a ../../dist/lib |
---|
23 | cp cgic.h ../../dist/include |
---|
24 | @echo libcgic.a is in ../../dist/lib/ and cgic.h is in ../../dist/include/ |
---|
25 | |
---|
26 | libcgic.a: cgic.o cgic.h |
---|
27 | rm -f libcgic.a |
---|
28 | $(AR) rc libcgic.a cgic.o |
---|
29 | $(RANLIB) libcgic.a |
---|
30 | |
---|
31 | #mingw32 and cygwin users: replace .cgi with .exe |
---|
32 | |
---|
33 | cgictest.cgi: cgictest.o libcgic.a |
---|
34 | gcc cgictest.o -o cgictest.cgi ${LIBS} |
---|
35 | |
---|
36 | capture: capture.o libcgic.a |
---|
37 | gcc capture.o -o capture ${LIBS} |
---|
38 | |
---|
39 | clean: |
---|
40 | rm -f *.o *.a cgictest.cgi capture |
---|
41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.