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..100896b --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +.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) |