aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorThomas Harning Jr <harningt@gmail.com>2011-01-15 19:51:21 -0500
committerThomas Harning Jr <harningt@gmail.com>2011-01-15 19:51:21 -0500
commit1153affe43bbc7f929213e0a5d6f8b5189cc45bd (patch)
tree1e63a88fdebccabf3529fa9c697c3f43b067c673 /Makefile
parent24cac1c1bcf4b0dc3188f72934d2881692829e61 (diff)
parentd6cfe3ef1bc7d3c489abe394830211906e650d2c (diff)
downloadluaevent-prosody-1153affe43bbc7f929213e0a5d6f8b5189cc45bd.tar.gz
luaevent-prosody-1153affe43bbc7f929213e0a5d6f8b5189cc45bd.zip
Merge branch 'prosody-tree'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..40a13d3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,32 @@
+# Utilities
+INSTALL = install
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_DATA = $(INSTALL) -m 644
+
+# Flags
+CFLAGS = -O3 -c -Wall -fpic
+LDFLAGS = -shared
+
+# Directories
+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
+
+# Files
+LUA_LIB = lua5.1
+LIB = core.so
+
+all:
+ $(CC) $(CFLAGS) -Iinclude -I$(LUA_INC_DIR) src/*.c
+ $(CC) $(LDFLAGS) -o $(LIB) *.o -L$(LUA_LIB_DIR) -l$(LUA_LIB) -levent
+
+install: all
+ $(INSTALL_DATA) -D lua/luaevent.lua $(DESTDIR)$(INSTALL_DIR_LUA)/luaevent.lua
+ $(INSTALL_PROGRAM) -D $(LIB) $(DESTDIR)$(INSTALL_DIR_BIN)/luaevent/$(LIB)
+
+clean:
+ rm *.so
+ rm *.o
+