Rev | Line | |
---|
[78] | 1 | OS:=$(shell uname -s) |
---|
| 2 | ifeq ($(OS),Darwin) |
---|
[301] | 3 | MACOS_CFLAGS=-arch $(shell uname -m) |
---|
[78] | 4 | LIBS= -L./ -lcgic /usr/lib/libfcgi.dylib |
---|
| 5 | else |
---|
| 6 | LIBS= -L./ -lcgic /usr/lib/libfcgi.a |
---|
| 7 | endif |
---|
| 8 | CFLAGS=-g -Wall ${MACOS_CFLAGS} |
---|
[1] | 9 | CC=gcc |
---|
| 10 | AR=ar |
---|
| 11 | RANLIB=ranlib |
---|
| 12 | |
---|
| 13 | all: libcgic.a cgictest.cgi capture |
---|
| 14 | |
---|
| 15 | install: libcgic.a |
---|
| 16 | cp libcgic.a ../../dist/lib |
---|
| 17 | cp cgic.h ../../dist//include |
---|
| 18 | @echo libcgic.a is in ../../dist/lib and cgic.h is in ../../dist//include. |
---|
| 19 | |
---|
| 20 | libcgic.a: cgic.o cgic.h |
---|
| 21 | rm -f libcgic.a |
---|
| 22 | $(AR) rc libcgic.a cgic.o |
---|
| 23 | $(RANLIB) libcgic.a |
---|
| 24 | |
---|
| 25 | #mingw32 and cygwin users: replace .cgi with .exe |
---|
| 26 | |
---|
| 27 | cgictest.cgi: cgictest.o libcgic.a |
---|
| 28 | gcc cgictest.o -o cgictest.cgi ${LIBS} |
---|
| 29 | |
---|
| 30 | capture: capture.o libcgic.a |
---|
| 31 | gcc capture.o -o capture ${LIBS} |
---|
| 32 | |
---|
| 33 | clean: |
---|
| 34 | rm -f *.o *.a cgictest.cgi capture |
---|
| 35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.