added libixp and wmii submodules from github
[wmiirc-lua.git] / Makefile
blobb4115efcdbe1d3a1787e662aeeb44d7514afab6b
1 # ------------------------------------------------------------------------
2 # default target
4 .PHONY: default
5 default: all
7 # ------------------------------------------------------------------------
8 # includes and defines
10 include config.mk
11 include Makefile.check
13 # ------------------------------------------------------------------------
14 # main targets
16 .PHONY: all help docs clean distclean tags
18 all clean distclean docs install install-user:
19 ${MAKE} -C src $@
21 help:
22 @echo "make [target]"
23 @echo
24 @echo " general targets"
25 @echo " all - build everything"
26 @echo " docs - build documentation"
27 @echo " clean - clean up build"
28 @echo " distclean - clean even more"
29 @echo " install - install in system dir"
30 @echo " install-user - install in user home dir"
31 @echo
32 @echo " development targets"
33 @echo " tags - build ctags/cscope index"
35 config.mk: config.mk.dist
36 if test -f $@ ; then \
37 touch $@ ; \
38 else \
39 cp $< $@ ; \
42 # ------------------------------------------------------------------------
43 # local dependencies for main rules
45 .PHONY: lcl-clean lcl-distclean
47 clean: lcl-clean
48 lcl-clean:
49 -rm -f *~ */*~
50 -rm -f cscope.files cscope.out tags
52 distclean: lcl-distclean
53 lcl-distclean: clean
54 -rm -f config.mk
56 .PHONY:
58 install: install-variable-check
60 install-user: install-user-variable-check
62 # ------------------------------------------------------------------------
63 # tags and cscope
65 .PHONY: cscope tags
67 cscope.files::
68 find . -name '*.[ch]' -o -name '*.lua' | grep -v -e CVS -e SCCS > cscope.files
70 cscope: cscope.out
71 cscope.out: cscope.files
72 -cscope -P`pwd` -b
74 tags: cscope.out
75 rm -f tags
76 xargs -n 50 ctags -a < cscope.files