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::
|
2010-03-18 21:56:20 +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::
|
2010-03-18 21:56:20 +08:00
|
|
|
$(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
|
|
|
|
grep -v /lib/Headers | grep -v /test/`
|
2009-02-12 10:25:47 +08:00
|
|
|
|
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
|
2010-03-11 05:26:01 +08:00
|
|
|
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
|
2009-10-09 06:15:31 +08:00
|
|
|
$(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 \
|
2010-03-11 05:26:01 +08:00
|
|
|
instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
|
2009-10-09 06:15:31 +08:00
|
|
|
if test \! -d "$$instdir" ; then \
|
|
|
|
$(EchoCmd) Making install directory $$instdir ; \
|
|
|
|
$(MKDIR) $$instdir ;\
|
|
|
|
fi ; \
|
2010-03-11 05:26:01 +08:00
|
|
|
$(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
|
2009-10-09 06:15:31 +08:00
|
|
|
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 \
|
2010-03-11 05:26:01 +08:00
|
|
|
$(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
|
2009-10-09 06:15:31 +08:00
|
|
|
done ; \
|
|
|
|
fi
|
|
|
|
endif
|