3e6ead10859da2cae20d4348a0850601d63c545e
[oweals/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 jsmin: jsmin.o
8         $(CC) $(LDFLAGS) -o $@ $^
9
10 po2lmo: po2lmo.o template_lmo.o
11         $(CC) $(LDFLAGS) -o $@ $^
12
13 parser.so: template_parser.o template_utils.o template_lmo.o template_lualib.o
14         $(CC) $(LDFLAGS) -shared -o $@ $^
15
16 version.lua:
17         ./mkversion.sh $@ $(LUCI_VERSION) "$(LUCI_GITBRANCH)"
18
19 compile: parser.so version.lua
20
21 install: compile
22         mkdir -p $(DESTDIR)/usr/lib/lua/luci/template
23         cp parser.so $(DESTDIR)/usr/lib/lua/luci/template/parser.so
24         cp version.lua $(DESTDIR)/usr/lib/lua/luci/version.lua