.PHONY: all clean 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) yhy_test: LDLIBS = -lyhy.debug yhy_test: LDFLAGS = -L. -Wl,-rpath . all: libyhy.so libyhy.debug.so yhy_test clean: $(RM) libyhy.so $(RM) libyhy.debug.so $(RM) yhy_test