1 | .SUFFIXES: .o .cxx |
---|
2 | |
---|
3 | SED:=$(ARBHOME)/SH/arb_sed |
---|
4 | |
---|
5 | all: |
---|
6 | @echo "use make clean" |
---|
7 | |
---|
8 | # -------------------------------------------------------------------------------- |
---|
9 | |
---|
10 | OBJECTS=arb_main_cpp.o arb_main_c.o |
---|
11 | |
---|
12 | ARB_MAIN_DEPENDS=Makefile arb_main.h |
---|
13 | |
---|
14 | arb_main_cpp.o: arb_main.cxx $(ARB_MAIN_DEPENDS) |
---|
15 | $(A_CXX) $(cflags) $(cxxflags) -c $< -o $@ $(CXX_INCLUDES) $(POST_COMPILE) $< |
---|
16 | |
---|
17 | arb_main_c.o: arb_main.c $(ARB_MAIN_DEPENDS) arb_main.cxx |
---|
18 | $(A_CC) $(cflags) -c $< -o $@ $(CC_INCLUDES) $(POST_COMPILE) $< |
---|
19 | |
---|
20 | mainwrapper: $(OBJECTS) |
---|
21 | |
---|
22 | # -------------------------------------------------------------------------------- |
---|
23 | |
---|
24 | clean: |
---|
25 | rm -f stamp.* valgrind2grep.lst postcompile.sav $(OBJECTS) |
---|
26 | |
---|
27 | valgrind_update: |
---|
28 | ./arb_valgrind update |
---|
29 | |
---|
30 | VECTORIZED_SOURCE=vectorized.source |
---|
31 | |
---|
32 | vectorize_checks: |
---|
33 | ( echo "# [generated] list of source-files for which loop vectorization shall be checked"; \ |
---|
34 | ( cd $(ARBHOME); \ |
---|
35 | grep --recursive --files-with-matches "--include=*.c" "--include=*.cxx" LOOP_VECTORIZED . \ |
---|
36 | | sort \ |
---|
37 | | $(SED) -e 's/^\.\///' \ |
---|
38 | ) \ |
---|
39 | ) > $(VECTORIZED_SOURCE).tmp |
---|
40 | ./mv_if_diff $(VECTORIZED_SOURCE).tmp $(VECTORIZED_SOURCE) |
---|
41 | |
---|
42 | # -------------------------------------------------------------------------------- |
---|
43 | |
---|
44 | # library dependencies generated here always use dynamic libnames, |
---|
45 | # even if LINK_STATIC=1 defined in ../Makefile@LINK_STATIC |
---|
46 | # |
---|
47 | # The files generated here are not used yet (so the above does not matter) |
---|
48 | # They are intended to be used to link all ARB binaries |
---|
49 | # (instead of using explicit link commands in ../Makefile) |
---|
50 | |
---|
51 | % : %.tmp |
---|
52 | ./mv_if_diff $< $@ |
---|
53 | |
---|
54 | CORE_LIB=lib/libCORE.so |
---|
55 | |
---|
56 | TMP=dep.alltargets.tmp.tmp |
---|
57 | |
---|
58 | dep.alltargets.tmp: Makefile needed_libs.pl |
---|
59 | LINK_STATIC=0;./needed_libs.pl -U -I -F $(CORE_LIB) > $(TMP) |
---|
60 | $(SED) -e 's/ /\n/g' < $(TMP) > $@ |
---|
61 | rm $(TMP) |
---|
62 | echo $(CORE_LIB) >>$@ |
---|
63 | |
---|
64 | dep.libtargets: dep.alltargets |
---|
65 | grep -E '\.(a|o|so)' $< > $@ || true |
---|
66 | |
---|
67 | dep.4dummy.tmp: dep.libtargets |
---|
68 | ./gen_dep.pl dummy <$< >$@ |
---|
69 | |
---|
70 | libdepends: dep.4dummy |
---|
71 | |
---|
72 | |
---|