summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2023-08-24 00:58:23 +0200
committercbdev <cb@cbcdn.com>2023-08-24 00:58:23 +0200
commite9b7a6ef8fc575e0ee4f55ae16169d1917be9dea (patch)
treec99e9698f408f48587360324fa33b66020adb95f /Makefile
downloadlibtwn-e9b7a6ef8fc575e0ee4f55ae16169d1917be9dea.tar.gz
libtwn-e9b7a6ef8fc575e0ee4f55ae16169d1917be9dea.tar.bz2
libtwn-e9b7a6ef8fc575e0ee4f55ae16169d1917be9dea.zip
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
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)