# $Id$ EXTRA_CFLAGS = -fPIC EXTRA_LDFLAGS = -shared EXTRA_LIBS = .PHONY: all clean install ifeq ($(shell uname -s),Linux) EXTRA_LIBS += -ldl endif all: ./subversion.so ./syslog.so ./http.so ./cookie.so ./%.so: ./%.o ./util.o ./db.o ./crypto.o $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS) ./util.o: ../Mandshurica/util.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< ./db.o: ../Mandshurica/db.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< ./crypto.o: ../Mandshurica/crypto.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< ./%.o: ./%.c ../Mandshurica/mandshurica.h $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< install: cp *.so $(MODULE_PREFIX)/ clean: rm -f *.so *.o