1
0
Fork 0
mirror of https://github.com/Oreolek/mod_muc_rpg.git synced 2024-04-25 05:29:19 +03:00
mod_muc_rpg/random/Makefile

51 lines
930 B
Makefile

# makefile for random library for Lua
# change these to reflect your Lua installation
#LUA=/home/alexander/Programming/neovim/.deps/build/src/luajit
#LUAINC= $(LUA)/src
#LUALIB= $(LUA)/src
#LUABIN= $(LUA)/src
# these will probably work if Lua has been installed globally
LUA= /usr
LUAINC= $(LUA)/include/lua5.1
LUALIB= $(LUA)/lib/lua5.1
LUABIN= $(LUA)/bin
# probably no need to change anything below here
CC= gcc
CFLAGS= $(INCS) $(WARN) -O2 -fPIC $G
WARN= -ansi -pedantic -Wall -Wextra
INCS= -I$(LUAINC)
MAKESO= $(CC) -shared
#MAKESO= $(CC) -bundle -undefined dynamic_lookup
MYNAME= random
MYLIB= l$(MYNAME)
T= $(MYNAME).so
OBJS= $(MYLIB).o
TEST= test.lua
all: test
test: $T
$(LUABIN)/lua $(TEST)
o: $(MYLIB).o
so: $T
$T: $(OBJS)
$(MAKESO) -o $@ $(OBJS)
$(OBJS): random.c
clean:
rm -f $(OBJS) $T core core.*
doc:
@echo "$(MYNAME) library:"
@fgrep '/**' $(MYLIB).c | cut -f2 -d/ | tr -d '*' | sort | column
# eof