summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Harley2020-01-24 05:15:35 +0000
committerTom Harley2020-01-24 05:15:35 +0000
commitc9f0de12be31eea463bf022f3eee76490b30f8dc (patch)
treea80718ff00fa2dcb1c52c2af6828feffc7f89d8b /Makefile
downloadparapat-c9f0de12be31eea463bf022f3eee76490b30f8dc.tar.gz
parapat-c9f0de12be31eea463bf022f3eee76490b30f8dc.zip

Initial commit

HEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b0f38ab
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+COMMON += -ggdb3 -O0 -Wpedantic -Wall -Werror -Wextra -std=c89
+TRGT = libparapat.a libparapat.so
+
+.PHONY: default all clean test
+
+default: all
+
+all: $(TRGT)
+
+%.o: %.c
+ $(CC) $(COMMON) -c -MMD -MP -o $@ $<
+
+%.pic.o: %.c
+ $(CC) $(COMMON) -c -fPIC -MMD -MP -o $@ $<
+
+libparapat.so: parapat.pic.o queue.pic.o
+ $(CC) $(COMMON) -shared -o $@ $^
+
+.NOTPARALLEL: libparapat.a
+
+libparapat.a: libparapat.a(parapat.o) libparapat.a(queue.o)
+
+test: $(TRGT)
+ (cd test && $(MAKE))
+
+clean:
+ $(RM) $(TRGT) *.o *.d
+ $(MAKE) -C test clean
+
+-include $(wildcard *.d)