summaryrefslogtreecommitdiffstats
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..ba78215
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+
+VERSION = 0.1
+GIT_REV := $(shell test -d .git && git describe || echo exported)
+ifneq ($(GIT_REV), exported)
+FULL_VERSION := $(GIT_REV)
+FULL_VERSION := $(patsubst v%,%,$(FULL_VERSION))
+else
+FULL_VERSION := $(VERSION)
+endif
+
+
+OBJS = magic.o
+LIBS = -lmagic
+
+CFLAGS ?= -g
+CFLAGS += -fPIC
+
+magic.so: $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ -fPIC -shared $^ $(LIBS)
+