lua-immutable/Makefile

39 lines
544 B
Makefile
Raw Normal View History

2018-02-09 02:13:07 -08:00
# makefile for immutable table library for Lua
2018-02-11 14:11:11 -08:00
LUA_DIR=/opt/local
LUA_INC= $(LUA_DIR)/include
LUA_BIN= $(LUA_DIR)/bin
LUA= lua
2018-02-09 02:13:07 -08:00
CC= gcc
CFLAGS= $(INCS) $(WARN) -O2 $G
2018-02-09 05:22:27 -08:00
WARN= -std=c11 -pedantic -Wall -Wextra
2018-02-11 14:11:11 -08:00
INCS= -I$(LUA_INC)
2018-02-09 02:13:07 -08:00
#MAKESO= $(CC) -shared
MAKESO= $(CC) -bundle -undefined dynamic_lookup
MYNAME= immutable
MYLIB= l$(MYNAME)
T= $(MYNAME).so
OBJS= $(MYLIB).o
2018-02-11 13:43:42 -08:00
TEST= tests.lua
2018-02-09 02:13:07 -08:00
all: $T
2018-02-09 02:13:07 -08:00
test: $T
2018-02-11 14:11:11 -08:00
$(LUA_BIN)/$(LUA) $(TEST)
2018-02-09 02:13:07 -08:00
o: $(MYLIB).o
so: $T
$T: $(OBJS)
$(MAKESO) -o $@ $(OBJS)
2018-02-12 16:37:50 -08:00
$(OBJS): $(MYLIB).c
2018-02-09 02:13:07 -08:00
clean:
2018-02-11 14:11:11 -08:00
rm -f $(OBJS) $T
2018-02-09 02:13:07 -08:00
# eof