03e887e1d5dc7d28390a4b11717fd15a1f74a2b9
[project/luci.git] / modules / luci-base / src / Makefile
1 %.o: %.c
2 $(CC) $(CPPFLAGS) $(CFLAGS) $(FPIC) -c -o $@ $<
3
4 clean:
5 rm -f po2lmo parser.so version.lua *.o
6
7 po2lmo: po2lmo.o template_lmo.o
8 $(CC) $(LDFLAGS) -o $@ $^
9
10 parser.so: template_parser.o template_utils.o template_lmo.o template_lualib.o
11 $(CC) $(LDFLAGS) -shared -o $@ $^
12
13 version.lua:
14 ./mkversion.sh $@ $(LUCI_VERSION) "$(LUCI_GITBRANCH)"
15
16 compile: parser.so version.lua
17
18 install: compile
19 mkdir -p $(DESTDIR)/usr/lib/lua/luci/template
20 cp parser.so $(DESTDIR)/usr/lib/lua/luci/template/parser.so
21 cp version.lua $(DESTDIR)/usr/lib/lua/luci/version.lua