From 54af6a4aecdca9f0b8df5d2425da82b1e31b03d5 Mon Sep 17 00:00:00 2001 From: thefosk Date: Fri, 13 Nov 2015 15:52:51 -0800 Subject: Makefile cleanup --- Makefile | 16 ++++------------ lua_uuid-0.1-6.rockspec | 23 ----------------------- lua_uuid-0.1-7.rockspec | 29 +++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 35 deletions(-) delete mode 100644 lua_uuid-0.1-6.rockspec create mode 100644 lua_uuid-0.1-7.rockspec 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) diff --git a/lua_uuid-0.1-6.rockspec b/lua_uuid-0.1-6.rockspec deleted file mode 100644 index 1e01767..0000000 --- a/lua_uuid-0.1-6.rockspec +++ /dev/null @@ -1,23 +0,0 @@ -package = "lua_uuid" -version = "0.1-6" -source = { - url = "https://github.com/Mashape/lua-uuid/archive/0.1-6.tar.gz", - dir = "lua-uuid-0.1-6" -} -description = { - summary = "UUID generation", - detailed = [[ - This is an utility that leverages libuuid to generate UUID strings - ]], - homepage = "https://github.com/Mashape/lua-uuid", - license = "MIT" -} -dependencies = { - "lua >= 5.1" -} -build = { - type = "make", - install_variables = { - INST_LIBDIR = "$(LIBDIR)" - } -} \ No newline at end of file diff --git a/lua_uuid-0.1-7.rockspec b/lua_uuid-0.1-7.rockspec new file mode 100644 index 0000000..e0c12b5 --- /dev/null +++ b/lua_uuid-0.1-7.rockspec @@ -0,0 +1,29 @@ +package = "lua_uuid" +version = "0.1-7" +source = { + url = "https://github.com/Mashape/lua-uuid/archive/0.1-7.tar.gz", + dir = "lua-uuid-0.1-7" +} +description = { + summary = "UUID generation", + detailed = [[ + This is an utility that leverages libuuid to generate UUID strings + ]], + homepage = "https://github.com/Mashape/lua-uuid", + license = "MIT" +} +dependencies = { + "lua >= 5.1" +} +build = { + type = "make", + build_variables = { + CFLAGS="$(CFLAGS)", + LIBFLAG="$(LIBFLAG)", + LUA_LIBDIR="$(LUA_LIBDIR)", + LUA_INCDIR="$(LUA_INCDIR)" + }, + install_variables = { + INST_LIBDIR = "$(LIBDIR)" + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2