source: trunk/SOURCE_TOOLS/COMPILE_COMPAT/Makefile

Last change on this file was 18981, checked in by westram, 3 years ago
  • export/use ARB_CORE_LIBS (instead of using ARB_GLIB_LIBS directly).
File size: 3.5 KB
Line 
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
11OBJECTS = c0x.o nostd.o
12
13BINARIES = $(addprefix bin/,$(subst .o,,$(OBJECTS)))
14
15LIB_ARBDB := $(LIBPATH) $(ARBDB_LIB) $(ARB_CORE_LIBS)
16
17LIBDIR=../../lib
18LIB_DEPENDS := $(LIBDIR)/libARBDB.$(SHARED_LIB_SUFFIX) $(LIBDIR)/libCORE.$(SHARED_LIB_SUFFIX)
19
20$(MAIN): binaries
21
22binaries:
23        mkdir -p bin
24        $(MAKE) $(BINARIES)
25
26cxxflags_c0x:=$(subst -std=gnu++11,-std=gnu++0x,$(cxxflags))
27
28cxxflags_nostd:=$(cxxflags)
29cxxflags_nostd:=$(subst -std=gnu++0x,,$(cxxflags_nostd))
30cxxflags_nostd:=$(subst -std=gnu++11,,$(cxxflags_nostd))
31cxxflags_nostd:=$(subst -std=gnu++14,,$(cxxflags_nostd))
32cxxflags_nostd:=$(subst -std=gnu++17,,$(cxxflags_nostd))
33
34disabled_warn_nostd:=-Wno-unused-local-typedefs -Wno-zero-as-null-pointer-constant
35
36c0x.o: c0x.cxx Makefile
37        $(A_CXX) $(cflags) $(cxxflags_c0x) -c $< $(CXX_INCLUDES) -o $@ $(POST_COMPILE) $<
38
39nostd.o: nostd.cxx Makefile
40        $(A_CXX) $(cflags) $(cxxflags_nostd) $(disabled_warn_nostd) -c $< $(CXX_INCLUDES) -o $@ $(POST_COMPILE) $<
41
42bin/% : %.o
43        $(LINK_EXECUTABLE) $@ $< $(LIB_ARBDB)
44
45$(OBJECTS) : $(LIB_DEPENDS)
46
47clean:
48        rm -f $(BINARIES) $(OBJECTS)
49
50DEPENDS = $(OBJECTS:.o=.depend)
51depends: $(DEPENDS)
52        @cat $(DEPENDS) | grep -v '^#' >>Makefile
53        @rm $(DEPENDS)
54$(DEPENDS): depend.init
55depend.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
65c0x.o: $(ARBHOME)/INCLUDE/ad_prot.h
66c0x.o: $(ARBHOME)/INCLUDE/ad_t_prot.h
67c0x.o: $(ARBHOME)/INCLUDE/arb_assert.h
68c0x.o: $(ARBHOME)/INCLUDE/arb_core.h
69c0x.o: $(ARBHOME)/INCLUDE/arb_error.h
70c0x.o: $(ARBHOME)/INCLUDE/arb_mem.h
71c0x.o: $(ARBHOME)/INCLUDE/arb_msg.h
72c0x.o: $(ARBHOME)/INCLUDE/arb_string.h
73c0x.o: $(ARBHOME)/INCLUDE/arbdb.h
74c0x.o: $(ARBHOME)/INCLUDE/arbdb_base.h
75c0x.o: $(ARBHOME)/INCLUDE/arbdbt.h
76c0x.o: $(ARBHOME)/INCLUDE/arbtools.h
77c0x.o: $(ARBHOME)/INCLUDE/attributes.h
78c0x.o: $(ARBHOME)/INCLUDE/cxxforward.h
79c0x.o: $(ARBHOME)/INCLUDE/downcast.h
80c0x.o: $(ARBHOME)/INCLUDE/dupstr.h
81c0x.o: $(ARBHOME)/INCLUDE/gccver.h
82c0x.o: $(ARBHOME)/INCLUDE/smartptr.h
83c0x.o: $(ARBHOME)/INCLUDE/static_assert.h
84c0x.o: $(ARBHOME)/INCLUDE/stringize.h
85c0x.o: $(ARBHOME)/INCLUDE/test_global.h
86
87nostd.o: $(ARBHOME)/INCLUDE/ad_prot.h
88nostd.o: $(ARBHOME)/INCLUDE/ad_t_prot.h
89nostd.o: $(ARBHOME)/INCLUDE/arb_assert.h
90nostd.o: $(ARBHOME)/INCLUDE/arb_core.h
91nostd.o: $(ARBHOME)/INCLUDE/arb_error.h
92nostd.o: $(ARBHOME)/INCLUDE/arb_mem.h
93nostd.o: $(ARBHOME)/INCLUDE/arb_msg.h
94nostd.o: $(ARBHOME)/INCLUDE/arb_string.h
95nostd.o: $(ARBHOME)/INCLUDE/arbdb.h
96nostd.o: $(ARBHOME)/INCLUDE/arbdb_base.h
97nostd.o: $(ARBHOME)/INCLUDE/arbdbt.h
98nostd.o: $(ARBHOME)/INCLUDE/arbtools.h
99nostd.o: $(ARBHOME)/INCLUDE/attributes.h
100nostd.o: $(ARBHOME)/INCLUDE/cxxforward.h
101nostd.o: $(ARBHOME)/INCLUDE/downcast.h
102nostd.o: $(ARBHOME)/INCLUDE/dupstr.h
103nostd.o: $(ARBHOME)/INCLUDE/gccver.h
104nostd.o: $(ARBHOME)/INCLUDE/smartptr.h
105nostd.o: $(ARBHOME)/INCLUDE/static_assert.h
106nostd.o: $(ARBHOME)/INCLUDE/stringize.h
107nostd.o: $(ARBHOME)/INCLUDE/test_global.h
Note: See TracBrowser for help on using the repository browser.