summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-12-15 00:41:44 +0100
committerPeter Wu <peter@lekensteyn.nl>2014-12-15 00:41:44 +0100
commit1b3247bc573314e4b05ce5bc60cf9f14c93228a5 (patch)
tree192f6b1206562248782af12a0f9b15e0223af696
parent4dccff04592ff40a4fe6edb518ca741dd160c902 (diff)
downloadltunify-refactor-lib.tar.gz
lib: add Makefile, ignore .o/.a filesrefactor-lib
-rw-r--r--.gitignore2
-rw-r--r--lib/Makefile16
2 files changed, 18 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index c7f2583..a295850 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
read-dev-usbmon
hidraw
ltunify
+*.o
+*.a
diff --git a/lib/Makefile b/lib/Makefile
new file mode 100644
index 0000000..8d1bdaf
--- /dev/null
+++ b/lib/Makefile
@@ -0,0 +1,16 @@
+
+CFLAGS ?= -O2 -g -DENABLE_TRACING
+WFLAGS ?= -Wall -Wextra -Wmissing-prototypes
+
+SOURCES := $(wildcard *.c)
+OBJECTS := $(SOURCES:%.c=%.o)
+
+libltunify.a: $(OBJECTS)
+ #$(CC) $(WFLAGS) $(CFLAGS) -o $@ $^ -lrt -c
+ ar rcs $@ $^
+
+clean:
+ $(RM) libltunify.a $(OBJECTS)
+
+%.o: %.c
+ $(CC) -c $(WFLAGS) $(CFLAGS) -o $@ $<