Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (24 sloc) 653 Bytes
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.
libcgic.a: cgic.o cgic.h
rm -f libcgic.a
$(AR) rc libcgic.a cgic.o
$(RANLIB) libcgic.a
#mingw32 and cygwin users: replace .cgi with .exe
cgictest.cgi: cgictest.o libcgic.a
gcc cgictest.o -o cgictest.cgi ${LIBS}
capture: capture.o libcgic.a
gcc capture.o -o capture ${LIBS}
clean:
rm -f *.o *.a cgictest.cgi capture cgicunittest
test:
gcc -D UNIT_TEST=1 cgic.c -o cgicunittest
./cgicunittest
You can’t perform that action at this time.