aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Harning Jr <harningt@gmail.com>2011-01-15 20:02:20 -0500
committerThomas Harning Jr <harningt@gmail.com>2011-01-15 20:02:20 -0500
commit1273235c989166c8de728f74af93f50da7bcbd89 (patch)
tree7d213199828e2746f152ba31e4a07c15b65969cb
parent6a50014e882186e06ee379d4df437738ca7f8fab (diff)
downloadluaevent-prosody-1273235c989166c8de728f74af93f50da7bcbd89.tar.gz
luaevent-prosody-1273235c989166c8de728f74af93f50da7bcbd89.zip
base: updated makefile to be a little more configurable, still needs much work
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 40a13d3..56241a3 100644
--- a/Makefile
+++ b/Makefile
@@ -4,22 +4,22 @@ INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
# Flags
-CFLAGS = -O3 -c -Wall -fpic
+CFLAGS = -Wall -fpic
LDFLAGS = -shared
# Directories
-LUA_INC_DIR=/usr/include/lua5.1
-LUA_LIB_DIR=/usr/lib
+LUA_INC_DIR ?= /usr/include/lua5.1
+LUA_LIB_DIR ?= /usr/lib
-INSTALL_DIR_LUA=/usr/share/lua/5.1
-INSTALL_DIR_BIN=/usr/lib/lua/5.1
+INSTALL_DIR_LUA ?= /usr/share/lua/5.1
+INSTALL_DIR_BIN ?= /usr/lib/lua/5.1
# Files
-LUA_LIB = lua5.1
+LUA_LIB ?= lua5.1
LIB = core.so
all:
- $(CC) $(CFLAGS) -Iinclude -I$(LUA_INC_DIR) src/*.c
+ $(CC) $(CFLAGS) -c -Iinclude -I$(LUA_INC_DIR) src/*.c
$(CC) $(LDFLAGS) -o $(LIB) *.o -L$(LUA_LIB_DIR) -l$(LUA_LIB) -levent
install: all
@@ -27,6 +27,6 @@ install: all
$(INSTALL_PROGRAM) -D $(LIB) $(DESTDIR)$(INSTALL_DIR_BIN)/luaevent/$(LIB)
clean:
- rm *.so
- rm *.o
+ rm -f *.so
+ rm -f *.o