.PHONY: all clean OBJS = libtwn3.so libtwn3.debug.so twn3_test CFLAGS = -g -Wall -Wpedantic %.so: CFLAGS += -shared -fPIC %.debug.so: CFLAGS += -DDEBUG %.so :: %.c %.h $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS) %.debug.so :: %.c %.h $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS) twn3_test: LDLIBS = -ltwn3.debug twn3_test: LDFLAGS = -L. -Wl,-rpath . all: $(OBJS) clean: $(RM) $(OBJS)