source: trunk/RNACMA/Makefile

Last change on this file was 19919, checked in by westram, 2 weeks ago
  • force downgrade to c++14 standard for RNACMA.
  • document problems with upgrading eigen + used workaround.
  • add commented-out trace code to Makefile.
File size: 5.3 KB
Line 
1# for variables passed from parent makefile see ../SOURCE_TOOLS/parent_make.txt
2
3.SUFFIXES: .o .cxx .depend
4
5# MAKEFLAGS += --trace --debug=a
6# $(info Trace activated in RNACMA Makefile)
7
8OBJECTS = $(subst .cxx,.o,$(wildcard *.cxx))
9
10cma_cxxflags:=$(cxxflags)
11cma_cflags:= $(cflags)
12
13# dump flags
14# $(info cma_cflags: $(cma_cflags))
15# $(info cma_cxxflags: $(cma_cxxflags))
16
17SUPPRESS_WARNINGS=1# set to 0 to show warnings
18
19ifeq ($(SUPPRESS_WARNINGS),1)
20 cma_cxxflags:= $(subst -Weffc++,,$(cma_cxxflags))
21 cma_cxxflags:= $(subst -Wctor-dtor-privacy,,$(cma_cxxflags))
22 cma_cxxflags:= $(subst -Wlogical-op,,$(cma_cxxflags))
23 cma_cxxflags:= $(subst -Wunused-local-typedefs,,$(cma_cxxflags))
24 cma_cxxflags:= $(cma_cxxflags) -Wno-deprecated-declarations -Wno-ignored-attributes -Wno-int-in-bool-context -Wno-zero-as-null-pointer-constant -Wno-deprecated-copy
25 cma_cflags:= $(subst -Wshadow,,$(cma_cflags))
26 ifeq ($(USE_CLANG),1)
27# clang spams warnings about unused parameters in Eigen (-> skip them)
28  cma_cxxflags+= -Wno-unused-parameter -Wno-unused-variable
29 else
30  # -Wunused-local-typedefs is included in -Wall -> disable (but not for clang)
31  cma_cflags+= -Wno-unused-local-typedefs
32 endif
33endif
34
35cma_cflags+= -I../HEADERLIBS
36
37# clang reports error for binder1st, binder2nd etc => downgrade to C++14
38cma_cxxflags:= $(subst -std=gnu++20,-std=gnu++17,$(cma_cxxflags))
39cma_cxxflags:= $(subst -std=gnu++17,-std=gnu++14,$(cma_cxxflags))
40
41# $(info cma_cflags: $(cma_cflags))
42# $(info cma_cxxflags: $(cma_cxxflags))
43
44$(MAIN): $(OBJECTS) warn
45        @$(ARBHOME)/SOURCE_TOOLS/binuptodate.pl $(MAIN) $(OBJECTS) || ( \
46                echo "$(LINK_STATIC_LIB) $(MAIN) $(OBJECTS)"; \
47                $(LINK_STATIC_LIB) $(MAIN) $(OBJECTS) ; \
48        )
49
50warn:
51ifeq ($(SUPPRESS_WARNINGS),1)
52        @echo "------------------------------------------------------------------------------------------"
53        @echo "Please note: Several compiler warnings have been disabled in RNACMA"
54        @echo "(namely -Weffc++, -Wctor-dtor-privacy, -Wlogical-op, -Wshadow, -Wunused-local-typedefs,"
55        @echo "        -Wint-in-bool-context, -Wdeprecated-declarations, -Wignored-attributes,"
56        @echo "        -Wzero-as-null-pointer-constant -Wdeprecated-copy)"
57        @echo "to avoid Eigen spams us with warnings here."
58        @echo "------------------------------------------------------------------------------------------"
59endif
60
61.cxx.o: warn Makefile
62        $(A_CXX) $(cma_cflags) $(cma_cxxflags) -c $<  $(CXX_INCLUDES)  $(POST_COMPILE) $<
63
64
65$(OBJECTS) : Makefile
66
67clean:
68        rm -f $(OBJECTS) *.o *.a
69
70DEPENDS = $(OBJECTS:.o=.depend)
71depends: $(DEPENDS)
72        @cat $(DEPENDS) | grep -v '^#' >>Makefile
73        @rm $(DEPENDS)
74$(DEPENDS): depend.init
75depend.init:
76        $(MAKEDEPEND) $(MAKEDEPENDFLAGS) 2>/dev/null # remove dependencies
77.c.depend:
78        $(MAKEDEPEND) -f- $(MAKEDEPENDFLAGS) $< 2>/dev/null >$@
79.cxx.depend:
80        $(MAKEDEPEND) -f- $(MAKEDEPENDFLAGS) $< 2>/dev/null >$@
81
82# DO NOT DELETE THIS LINE -- make depend depends on it.
83
84# Do not add dependencies manually - use 'make depend' in $ARBHOME
85# For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main)
86
87AlignedSequenceLoader.o: AlignedSequenceLoader.h
88AlignedSequenceLoader.o: Cma.h
89AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/ad_prot.h
90AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/ad_t_prot.h
91AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arb_assert.h
92AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arb_core.h
93AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arb_error.h
94AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arb_mem.h
95AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arb_msg.h
96AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arb_string.h
97AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arbdb.h
98AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arbdb_base.h
99AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arbdbt.h
100AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/arbtools.h
101AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/attributes.h
102AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/cxxforward.h
103AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/downcast.h
104AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/dupstr.h
105AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/gccver.h
106AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/smartptr.h
107AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/static_assert.h
108AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/stringize.h
109AlignedSequenceLoader.o: $(ARBHOME)/INCLUDE/test_global.h
110
111Analyser.o: AlignedSequenceLoader.h
112Analyser.o: Analyser.h
113Analyser.o: Cma.h
114Analyser.o: $(ARBHOME)/INCLUDE/ad_prot.h
115Analyser.o: $(ARBHOME)/INCLUDE/ad_t_prot.h
116Analyser.o: $(ARBHOME)/INCLUDE/arb_assert.h
117Analyser.o: $(ARBHOME)/INCLUDE/arb_core.h
118Analyser.o: $(ARBHOME)/INCLUDE/arb_error.h
119Analyser.o: $(ARBHOME)/INCLUDE/arb_mem.h
120Analyser.o: $(ARBHOME)/INCLUDE/arb_msg.h
121Analyser.o: $(ARBHOME)/INCLUDE/arb_string.h
122Analyser.o: $(ARBHOME)/INCLUDE/arbdb.h
123Analyser.o: $(ARBHOME)/INCLUDE/arbdb_base.h
124Analyser.o: $(ARBHOME)/INCLUDE/arbdbt.h
125Analyser.o: $(ARBHOME)/INCLUDE/arbtools.h
126Analyser.o: $(ARBHOME)/INCLUDE/attributes.h
127Analyser.o: $(ARBHOME)/INCLUDE/cxxforward.h
128Analyser.o: $(ARBHOME)/INCLUDE/downcast.h
129Analyser.o: $(ARBHOME)/INCLUDE/dupstr.h
130Analyser.o: $(ARBHOME)/INCLUDE/gccver.h
131Analyser.o: $(ARBHOME)/INCLUDE/smartptr.h
132Analyser.o: $(ARBHOME)/INCLUDE/static_assert.h
133Analyser.o: $(ARBHOME)/INCLUDE/stringize.h
134Analyser.o: $(ARBHOME)/INCLUDE/test_global.h
135Analyser.o: $(ARBHOME)/INCLUDE/test_unit.h
136
137Cma.o: Cma.h
138Cma.o: $(ARBHOME)/INCLUDE/cxxforward.h
139Cma.o: $(ARBHOME)/INCLUDE/gccver.h
Note: See TracBrowser for help on using the repository browser.