diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-12-15 00:41:44 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-12-15 00:41:44 +0100 |
commit | 1b3247bc573314e4b05ce5bc60cf9f14c93228a5 (patch) | |
tree | 192f6b1206562248782af12a0f9b15e0223af696 | |
parent | 4dccff04592ff40a4fe6edb518ca741dd160c902 (diff) | |
download | ltunify-1b3247bc573314e4b05ce5bc60cf9f14c93228a5.tar.gz |
lib: add Makefile, ignore .o/.a files
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | lib/Makefile | 16 |
2 files changed, 18 insertions, 0 deletions
@@ -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 $@ $< |