CFLAGS=-g -Wall -shared -fPIC CC=gcc AR=ar RANLIB=ranlib LIBS=-L./ -lcgic all: libcgic.so cgictest.cgi capture install: libcgic.so cp libcgic.so /usr/local/lib cp cgic.h /usr/local/include @echo libcgic.so is in /usr/local/lib. cgic.h is in /usr/local/include. libcgic.so: cgic.o cgic.h rm -f libcgic.so #$(AR) rc libcgic.a cgic.o #$(RANLIB) libcgic.so #mingw32 and cygwin users: replace .cgi with .exe cgictest.cgi: cgictest.o libcgic.so gcc cgictest.o -o cgictest.cgi ${LIBS} capture: capture.o libcgic.so gcc capture.o -o capture ${LIBS} clean: rm -f *.o *.so cgictest.cgi capture cgicunittest test: gcc -D UNIT_TEST=1 cgic.c -o cgicunittest ./cgicunittest