summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-11-17 14:49:02 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2011-11-17 14:55:13 +0100
commitf110c93c3a788f53c3515ede62997230c4a1d063 (patch)
tree57ab7831aaf87c72f2d5034dfc84ff053583c307 /Makefile
downloadlua-file-magic-f110c93c3a788f53c3515ede62997230c4a1d063.tar.bz2
lua-file-magic-f110c93c3a788f53c3515ede62997230c4a1d063.tar.xz
Initial commit
We have constants and api defined
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)
+