Last change
on this file since 346 was
346,
checked in by neteler, 13 years ago
|
fix compilation on 64bit linux
|
File size:
863 bytes
|
Rev | Line | |
---|
[78] | 1 | OS:=$(shell uname -s) |
---|
[346] | 2 | CPU:=$(shell uname -m) |
---|
[78] | 3 | ifeq ($(OS),Darwin) |
---|
[308] | 4 | MACOS_CFLAGS=-arch x86_64 |
---|
[78] | 5 | LIBS= -L./ -lcgic /usr/lib/libfcgi.dylib |
---|
| 6 | else |
---|
[346] | 7 | ifeq ($(CPU),x86_64) |
---|
| 8 | LIBS= -L./ -lcgic /usr/lib64/libfcgi.so |
---|
| 9 | else |
---|
[78] | 10 | LIBS= -L./ -lcgic /usr/lib/libfcgi.a |
---|
| 11 | endif |
---|
[346] | 12 | endif |
---|
[78] | 13 | CFLAGS=-g -Wall ${MACOS_CFLAGS} |
---|
[1] | 14 | CC=gcc |
---|
| 15 | AR=ar |
---|
| 16 | RANLIB=ranlib |
---|
| 17 | |
---|
| 18 | all: libcgic.a cgictest.cgi capture |
---|
| 19 | |
---|
| 20 | install: libcgic.a |
---|
[346] | 21 | mkdir -p ../../dist/lib |
---|
[1] | 22 | cp libcgic.a ../../dist/lib |
---|
[346] | 23 | cp cgic.h ../../dist/include |
---|
| 24 | @echo libcgic.a is in ../../dist/lib/ and cgic.h is in ../../dist/include/ |
---|
[1] | 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.