aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorthefosk <marco@mashape.com>2015-11-13 15:52:51 -0800
committerthefosk <marco@mashape.com>2015-11-13 15:52:51 -0800
commit54af6a4aecdca9f0b8df5d2425da82b1e31b03d5 (patch)
tree1ac92c7969fc52fdf6b37ea65ab639b59a11f5d7 /Makefile
parentb484545922f4c5d6dda86e0f66cb3622da654d53 (diff)
downloadlua_uuid-54af6a4aecdca9f0b8df5d2425da82b1e31b03d5.tar.gz
lua_uuid-54af6a4aecdca9f0b8df5d2425da82b1e31b03d5.tar.bz2
lua_uuid-54af6a4aecdca9f0b8df5d2425da82b1e31b03d5.zip
Makefile cleanup
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 4 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index f08d82d..fb6e6ca 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,10 @@
-LUA ?= lua5.1
-LUA_PC ?= lua5.1
-LUA_LIBS ?= $(shell pkg-config $(LUA_PC) --libs)
-LUA_CFLAGS = $(shell pkg-config $(LUA_PC) --cflags)
-
-CFLAGS ?= -O2 -Wall -Werror
-
all: lua_uuid.so
-%.o: %.c
- $(CC) -c $(CFLAGS) -fPIC $(LUA_CFLAGS) -o $@ $<
+lua_uuid.so: lua_uuid.o
+ $(CC) $(LIBFLAG) -luuid -o $@ -L$(LUA_LIBDIR) $<
-lua_uuid.so: lua_uuid.o test/lua_uuid_test.lua
- $(CC) -shared lua_uuid.o $(LUA_LIBS) -luuid -o $@
- $(LUA) test/lua_uuid_test.lua
+lua_uuid.o: lua_uuid.c
+ $(CC) -c $(CFLAGS) -I$(LUA_INCDIR) $< -o $@
install: lua_uuid.so
cp lua_uuid.so $(INST_LIBDIR)