CFLAGS := -O2 -Wall -fno-stack-protector -I../include LDFLAGS := -ldl -rdynamic # ############################ all: $(PLUGINS:%=%.so) %.d: %.c $(CC) $(CFLAGS) -MM -c $< -o $@ %.o: %.c $(CC) $(CFLAGS) -fPIC -o $@ -c $< apache.so: apache.o $(LD) -shared -lcurl -o $@ $^ conntrack.so: conntrack.o $(LD) -shared -lnfnetlink -lnetfilter_conntrack -o $@ $^ mysql.so: mysql.o mysql_helper.o $(LD) -shared -lmysqlclient -o $@ $^ %.so: %.o $(LD) -shared -o $@ $< clean: rm -rf *.d *.o *.so -include $(PLUGINS:%=%.d)