aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: cb124b354ddacc2903f0e286724e01b61d5e6f4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
LUA ?= lua5.1
LUA_PC ?= lua5.1
LUA_LIBS ?= $(shell pkg-config $(LUA_PC) --libs)
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 $(LUA_LIBS) -o $@
	$(LUA) test/lua_uuid_test.lua

clean:
	rm -f lua_uuid.so lua_uuid.o *.rock