summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9cb714b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+.PHONY: all
+
+CFLAGS += -g -Wall -Wpedantic
+CORE_OBJS = control.o reader.o config.o
+PLUGINS = reader_yhy.so
+
+%.so: CFLAGS += -shared -fPIC
+
+%.so :: %.c %.h
+ $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS)
+
+nfcommander: LDLIBS = -ldl
+
+all: nfcommander $(PLUGINS)
+
+nfcommander: nfcommander.c nfcommander.h $(CORE_OBJS)
+
+clean:
+ $(RM) nfcommander
+ $(RM) $(CORE_OBJS)