You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
--- /dev/null 2014-02-16 10:23:32.271000394 +0100
|
|
+++ b/Makefile 2014-02-18 15:25:06.121294649 +0100
|
|
@@ -0,0 +1,36 @@
|
|
+CC ?= cc
|
|
+RM ?= rm -rf
|
|
+INSTALL ?= install
|
|
+INSTALL_PROGRAM ?= $(INSTALL)
|
|
+INSTALL_DATA ?= $(INSTALL) -m 644
|
|
+LUA_V ?= 5.1
|
|
+LUA_LDIR ?= /usr/share/lua/$(LUA_V)
|
|
+LUA_CDIR ?= /usr/lib/lua/$(LUA_V)
|
|
+T = lxp
|
|
+LIBNAME = $(T).so
|
|
+
|
|
+COMMON_CFLAGS = -g -pedantic -Wall -O2 -shared -fPIC -DPIC -ansi
|
|
+LUA_INC ?= -I/usr/include/lua$(LUA_V)
|
|
+EXPAT_INC ?= -I/usr/include
|
|
+CF = $(LUA_INC) $(EXPAT_INC) $(COMMON_CFLAGS) $(CFLAGS)
|
|
+
|
|
+EXPAT_LIB = -lexpat
|
|
+COMMON_LDFLAGS = -shared
|
|
+LF = $(COMMON_LDFLAGS) $(EXPAT_LIB) $(LDFLAGS)
|
|
+
|
|
+OBJS = src/lxplib.o
|
|
+
|
|
+lib: src/$(LIBNAME)
|
|
+
|
|
+src/$(LIBNAME):
|
|
+ export MACOSX_DEPLOYMENT_TARGET="10.3";
|
|
+ $(CC) $(CF) $(LF) -o $@ src/$(T)lib.c
|
|
+
|
|
+install:
|
|
+ $(INSTALL_PROGRAM) -D src/$(LIBNAME) $(DESTDIR)$(LUA_CDIR)/$(LIBNAME)
|
|
+ $(INSTALL_PROGRAM) -D src/$T/lom.lua $(DESTDIR)$(LUA_LDIR)/$T/lom.lua
|
|
+ $(INSTALL_DATA) -D tests/test.lua $(DESTDIR)$(LUA_LDIR)/$T/tests/test.lua
|
|
+ $(INSTALL_DATA) -D tests/test-lom.lua $(DESTDIR)$(LUA_LDIR)/$T/tests/test-lom.lua
|
|
+
|
|
+clean:
|
|
+ $(RM) src/$(LIBNAME) $(OBJS)
|
|
|