summaryrefslogtreecommitdiffhomepage
path: root/libs/web/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-07-23 00:41:44 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-07-23 00:41:44 +0000
commit80a2dd2cc27e2fc0c55f03f01a1d460a91954ab6 (patch)
tree4f1b20fc7842d491cd9ef06be6336e1129186ccc /libs/web/Makefile
parent9cf0abcb073454cc405a4757b04446dcdc98d399 (diff)
libs/web: add template parser reimplemented in C
Diffstat (limited to 'libs/web/Makefile')
-rw-r--r--libs/web/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/libs/web/Makefile b/libs/web/Makefile
index f7fac7740..cc3bc96fc 100644
--- a/libs/web/Makefile
+++ b/libs/web/Makefile
@@ -1,2 +1,28 @@
include ../../build/config.mk
include ../../build/module.mk
+include ../../build/gccconfig.mk
+
+TPL_LDFLAGS =
+TPL_CFLAGS =
+TPL_SO = parser.so
+TPL_COMMON_OBJ = src/template_parser.o
+TPL_LUALIB_OBJ = src/template_lualib.o
+
+%.o: %.c
+ $(COMPILE) $(TPL_CFLAGS) $(LUA_CFLAGS) $(FPIC) -c -o $@ $<
+
+compile: build-clean $(TPL_COMMON_OBJ) $(TPL_LUALIB_OBJ)
+ $(LINK) $(SHLIB_FLAGS) $(TPL_LDFLAGS) -o src/$(TPL_SO) \
+ $(TPL_COMMON_OBJ) $(TPL_LUALIB_OBJ)
+ mkdir -p dist$(LUCI_LIBRARYDIR)/template
+ cp src/$(TPL_SO) dist$(LUCI_LIBRARYDIR)/template/$(TPL_SO)
+
+install: build
+ cp -pR dist$(LUA_LIBRARYDIR)/* $(LUA_LIBRARYDIR)
+
+clean: build-clean
+
+build-clean:
+ rm -f src/*.o src/$(TPL_SO)
+
+