2006-06-18 13:43:12 +08:00
|
|
|
LEVEL = ../..
|
2009-03-24 11:00:12 +08:00
|
|
|
DIRS := include lib tools docs
|
2006-06-18 13:43:12 +08:00
|
|
|
|
2009-11-15 08:22:33 +08:00
|
|
|
PARALLEL_DIRS :=
|
|
|
|
|
|
|
|
ifeq ($(BUILD_EXAMPLES),1)
|
|
|
|
PARALLEL_DIRS += examples
|
|
|
|
endif
|
|
|
|
|
2006-06-18 13:43:12 +08:00
|
|
|
include $(LEVEL)/Makefile.common
|
2006-11-21 13:01:56 +08:00
|
|
|
|
2009-01-21 05:10:41 +08:00
|
|
|
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
|
2009-12-22 07:28:06 +08:00
|
|
|
$(RecursiveTargets)::
|
2009-01-21 05:10:41 +08:00
|
|
|
$(Verb) if [ ! -f test/Makefile ]; then \
|
|
|
|
$(MKDIR) test; \
|
|
|
|
$(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
|
|
|
|
fi
|
|
|
|
endif
|
|
|
|
|
2006-11-21 13:01:56 +08:00
|
|
|
test::
|
2008-04-07 06:32:01 +08:00
|
|
|
@ $(MAKE) -C test
|
2008-03-18 14:14:16 +08:00
|
|
|
|
|
|
|
report::
|
2008-04-07 06:32:01 +08:00
|
|
|
@ $(MAKE) -C test report
|
2007-01-15 10:06:47 +08:00
|
|
|
|
|
|
|
clean::
|
2008-04-07 06:32:01 +08:00
|
|
|
@ $(MAKE) -C test clean
|
2008-03-20 22:28:22 +08:00
|
|
|
|
2009-02-12 10:25:47 +08:00
|
|
|
tags::
|
|
|
|
$(Verb) etags `find . -type f -name \*.h | grep -v /lib/Headers | grep -v /test/` `find . -type f -name \*.cpp | grep -v /lib/Headers | grep -v /test/`
|
|
|
|
|
2009-03-18 13:59:14 +08:00
|
|
|
cscope.files:
|
2009-03-24 11:00:12 +08:00
|
|
|
find tools lib include -name '*.cpp' \
|
2009-03-18 13:59:14 +08:00
|
|
|
-or -name '*.def' \
|
|
|
|
-or -name '*.td' \
|
|
|
|
-or -name '*.h' > cscope.files
|
|
|
|
|
|
|
|
.PHONY: test report clean cscope.files
|
2009-10-09 06:15:31 +08:00
|
|
|
|
|
|
|
install-local::
|
|
|
|
$(Echo) Installing include files
|
|
|
|
$(Verb) $(MKDIR) $(PROJ_includedir)
|
|
|
|
$(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include" ; then \
|
|
|
|
cd $(PROJ_SRC_ROOT)/tools/clang/include && \
|
|
|
|
for hdr in `find . -type f '!' '(' -name '*~' \
|
2009-10-13 00:42:18 +08:00
|
|
|
-o -name '.#*' -o -name '*.in' -o -name '*.txt' \
|
|
|
|
-o -name 'Makefile' -o -name '*.td' ')' -print \
|
2009-11-25 11:46:30 +08:00
|
|
|
| grep -v CVS | grep -v .svn | grep -v .dir` ; do \
|
2009-10-09 06:15:31 +08:00
|
|
|
instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
|
|
|
|
if test \! -d "$$instdir" ; then \
|
|
|
|
$(EchoCmd) Making install directory $$instdir ; \
|
|
|
|
$(MKDIR) $$instdir ;\
|
|
|
|
fi ; \
|
|
|
|
$(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
|
|
|
|
done ; \
|
|
|
|
fi
|
|
|
|
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
|
|
|
|
$(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include" ; then \
|
|
|
|
cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
|
2009-10-13 00:42:18 +08:00
|
|
|
for hdr in `find . -type f '!' '(' -name 'Makefile' ')' -print \
|
2009-11-25 11:46:30 +08:00
|
|
|
| grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
|
2009-10-09 06:15:31 +08:00
|
|
|
$(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
|
|
|
|
done ; \
|
|
|
|
fi
|
|
|
|
endif
|