aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorthefosk <marco@mashape.com>2015-11-06 21:22:07 -0800
committerthefosk <marco@mashape.com>2015-11-06 21:22:07 -0800
commitb1696f33dd7ae2b621ad8d04f1547df57731d6d0 (patch)
treef77bd2bb6215647d2681ae62f091aa813ec44fcb /Makefile
downloadlua_uuid-b1696f33dd7ae2b621ad8d04f1547df57731d6d0.tar.gz
lua_uuid-b1696f33dd7ae2b621ad8d04f1547df57731d6d0.tar.bz2
lua_uuid-b1696f33dd7ae2b621ad8d04f1547df57731d6d0.zip
0.1-1 version
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0b872e0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+LUA ?= lua5.1
+LUA_PC ?= lua5.1
+LUA_CFLAGS = $(shell pkg-config $(LUA_PC) --cflags)
+
+CFLAGS ?= -O3 -Wall -Werror
+
+all: lua_uuid.so
+
+%.o: %.c
+ $(CC) -c $(CFLAGS) -fPIC $(LUA_CFLAGS) -o $@ $<
+
+lua_uuid.so: lua_uuid.o test/lua_uuid_test.lua
+ $(CC) -shared lua_uuid.o -o $@
+ $(LUA) test/lua_uuid_test.lua
+
+clean:
+ rm -f lua_uuid.so lua_uuid.o *.rock