+CXXFLAGS = -O3
+CFLAGS = $(CXXFLAGS)
+OBJECTS = wikiq.o md5.o disorder.o
+
all: wikiq
-wikiq: wikiq.c
- gcc -O3 wikiq.c -o wikiq -lexpat
+wikiq: $(OBJECTS)
+ $(CXX) $(CXXFLAGS) $(OBJECTS) -lpcrecpp -lpcre -lexpat -o wikiq
+
+disorder.o: disorder.h
+md5.o: md5.h
clean:
- rm -f wikiq
+ rm -f wikiq $(OBJECTS)
+
+static: $(OBJECTS)
+ $(CXX) $(CXXFLAGS) $(OBJECTS) -static -lpcrecpp -lpcre -lexpat -o wikiq
+
+gprof:
+ $(MAKE) CFLAGS=-pg wikiq
-.PHONY: all clean
+.PHONY: all gprof