diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5c5268a --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +.PHONY: all clean + +CFLAGS = -g -Wall -Wpedantic + +%.so: CFLAGS += -shared -fPIC +%.debug.so: CFLAGS += -shared -fPIC -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) yhy_test |