luaevent.c: Make ANSI C compatible.
[luaevent.git] / Makefile
blobef2727422fb052fa2d20eb28d1fd399963fac7d3
1 # Utilities
2 INSTALL = install
3 INSTALL_PROGRAM = $(INSTALL)
4 INSTALL_DATA = $(INSTALL) -m 644
6 # Flags
7 CFLAGS = -g -O0 -c -Wall -fpic
8 LDFLAGS = -g -shared
10 # Directories
11 LUA_INC_DIR=/usr/include/lua5.1
12 LUA_LIB_DIR=/usr/lib
14 INSTALL_DIR_LUA=/usr/share/lua/5.1
15 INSTALL_DIR_BIN=/usr/lib/lua/5.1
17 # Files
18 LUA_LIB = lua5.1
19 LIB = core.so
21 all:
22 $(CC) $(CFLAGS) -Iinclude -I$(LUA_INC_DIR) src/*.c
23 $(CC) $(LDFLAGS) -o $(LIB) *.o -L$(LUA_LIB_DIR) -l$(LUA_LIB) -levent
25 install: all
26 $(INSTALL_DATA) -D lua/luaevent.lua $(DESTDIR)$(INSTALL_DIR_LUA)/luaevent.lua
27 $(INSTALL_PROGRAM) -D $(LIB) $(DESTDIR)$(INSTALL_DIR_BIN)/luaevent/$(LIB)
29 clean:
30 rm *.so
31 rm *.o