1 | # -------------------------------------------------------------------------------- |
---|
2 | # Compilations done here try to make sure, that ARB stays compatible |
---|
3 | # to compile environments used by other software that uses (parts of) ARB. |
---|
4 | # -------------------------------------------------------------------------------- |
---|
5 | # |
---|
6 | # for variables passed from parent makefile see ../parent_make.txt |
---|
7 | |
---|
8 | .SUFFIXES: .o .cxx .depend |
---|
9 | .PHONY: binaries clean depends depends.init |
---|
10 | |
---|
11 | OBJECTS = c0x.o nostd.o |
---|
12 | |
---|
13 | BINARIES = $(addprefix bin/,$(subst .o,,$(OBJECTS))) |
---|
14 | |
---|
15 | LIB_ARBDB := $(LIBPATH) $(ARBDB_LIB) $(ARB_CORE_LIBS) |
---|
16 | |
---|
17 | LIBDIR=../../lib |
---|
18 | LIB_DEPENDS := $(LIBDIR)/libARBDB.$(SHARED_LIB_SUFFIX) $(LIBDIR)/libCORE.$(SHARED_LIB_SUFFIX) |
---|
19 | |
---|
20 | $(MAIN): binaries |
---|
21 | |
---|
22 | binaries: |
---|
23 | mkdir -p bin |
---|
24 | $(MAKE) $(BINARIES) |
---|
25 | |
---|
26 | cxxflags_c0x:=$(subst -std=gnu++11,-std=gnu++0x,$(cxxflags)) |
---|
27 | |
---|
28 | cxxflags_nostd:=$(cxxflags) |
---|
29 | cxxflags_nostd:=$(subst -std=gnu++0x,,$(cxxflags_nostd)) |
---|
30 | cxxflags_nostd:=$(subst -std=gnu++11,,$(cxxflags_nostd)) |
---|
31 | cxxflags_nostd:=$(subst -std=gnu++14,,$(cxxflags_nostd)) |
---|
32 | cxxflags_nostd:=$(subst -std=gnu++17,,$(cxxflags_nostd)) |
---|
33 | |
---|
34 | disabled_warn_nostd:=-Wno-unused-local-typedefs -Wno-zero-as-null-pointer-constant |
---|
35 | |
---|
36 | c0x.o: c0x.cxx Makefile |
---|
37 | $(A_CXX) $(cflags) $(cxxflags_c0x) -c $< $(CXX_INCLUDES) -o $@ $(POST_COMPILE) $< |
---|
38 | |
---|
39 | nostd.o: nostd.cxx Makefile |
---|
40 | $(A_CXX) $(cflags) $(cxxflags_nostd) $(disabled_warn_nostd) -c $< $(CXX_INCLUDES) -o $@ $(POST_COMPILE) $< |
---|
41 | |
---|
42 | bin/% : %.o |
---|
43 | $(LINK_EXECUTABLE) $@ $< $(LIB_ARBDB) |
---|
44 | |
---|
45 | $(OBJECTS) : $(LIB_DEPENDS) |
---|
46 | |
---|
47 | clean: |
---|
48 | rm -f $(BINARIES) $(OBJECTS) |
---|
49 | |
---|
50 | DEPENDS = $(OBJECTS:.o=.depend) |
---|
51 | depends: $(DEPENDS) |
---|
52 | @cat $(DEPENDS) | grep -v '^#' >>Makefile |
---|
53 | @rm $(DEPENDS) |
---|
54 | $(DEPENDS): depend.init |
---|
55 | depend.init: |
---|
56 | $(MAKEDEPEND) $(MAKEDEPENDFLAGS) 2>/dev/null # remove dependencies |
---|
57 | .cxx.depend: |
---|
58 | $(MAKEDEPEND) -f- $(MAKEDEPENDFLAGS) $< 2>/dev/null >$@ |
---|
59 | |
---|
60 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
---|
61 | |
---|
62 | # Do not add dependencies manually - use 'make depend' in $ARBHOME |
---|
63 | # For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main) |
---|
64 | |
---|
65 | c0x.o: $(ARBHOME)/INCLUDE/ad_prot.h |
---|
66 | c0x.o: $(ARBHOME)/INCLUDE/ad_t_prot.h |
---|
67 | c0x.o: $(ARBHOME)/INCLUDE/arb_assert.h |
---|
68 | c0x.o: $(ARBHOME)/INCLUDE/arb_core.h |
---|
69 | c0x.o: $(ARBHOME)/INCLUDE/arb_error.h |
---|
70 | c0x.o: $(ARBHOME)/INCLUDE/arb_mem.h |
---|
71 | c0x.o: $(ARBHOME)/INCLUDE/arb_msg.h |
---|
72 | c0x.o: $(ARBHOME)/INCLUDE/arb_string.h |
---|
73 | c0x.o: $(ARBHOME)/INCLUDE/arbdb.h |
---|
74 | c0x.o: $(ARBHOME)/INCLUDE/arbdb_base.h |
---|
75 | c0x.o: $(ARBHOME)/INCLUDE/arbdbt.h |
---|
76 | c0x.o: $(ARBHOME)/INCLUDE/arbtools.h |
---|
77 | c0x.o: $(ARBHOME)/INCLUDE/attributes.h |
---|
78 | c0x.o: $(ARBHOME)/INCLUDE/cxxforward.h |
---|
79 | c0x.o: $(ARBHOME)/INCLUDE/downcast.h |
---|
80 | c0x.o: $(ARBHOME)/INCLUDE/dupstr.h |
---|
81 | c0x.o: $(ARBHOME)/INCLUDE/gccver.h |
---|
82 | c0x.o: $(ARBHOME)/INCLUDE/smartptr.h |
---|
83 | c0x.o: $(ARBHOME)/INCLUDE/static_assert.h |
---|
84 | c0x.o: $(ARBHOME)/INCLUDE/test_global.h |
---|
85 | |
---|
86 | nostd.o: $(ARBHOME)/INCLUDE/ad_prot.h |
---|
87 | nostd.o: $(ARBHOME)/INCLUDE/ad_t_prot.h |
---|
88 | nostd.o: $(ARBHOME)/INCLUDE/arb_assert.h |
---|
89 | nostd.o: $(ARBHOME)/INCLUDE/arb_core.h |
---|
90 | nostd.o: $(ARBHOME)/INCLUDE/arb_error.h |
---|
91 | nostd.o: $(ARBHOME)/INCLUDE/arb_mem.h |
---|
92 | nostd.o: $(ARBHOME)/INCLUDE/arb_msg.h |
---|
93 | nostd.o: $(ARBHOME)/INCLUDE/arb_string.h |
---|
94 | nostd.o: $(ARBHOME)/INCLUDE/arbdb.h |
---|
95 | nostd.o: $(ARBHOME)/INCLUDE/arbdb_base.h |
---|
96 | nostd.o: $(ARBHOME)/INCLUDE/arbdbt.h |
---|
97 | nostd.o: $(ARBHOME)/INCLUDE/arbtools.h |
---|
98 | nostd.o: $(ARBHOME)/INCLUDE/attributes.h |
---|
99 | nostd.o: $(ARBHOME)/INCLUDE/cxxforward.h |
---|
100 | nostd.o: $(ARBHOME)/INCLUDE/downcast.h |
---|
101 | nostd.o: $(ARBHOME)/INCLUDE/dupstr.h |
---|
102 | nostd.o: $(ARBHOME)/INCLUDE/gccver.h |
---|
103 | nostd.o: $(ARBHOME)/INCLUDE/smartptr.h |
---|
104 | nostd.o: $(ARBHOME)/INCLUDE/static_assert.h |
---|
105 | nostd.o: $(ARBHOME)/INCLUDE/test_global.h |
---|