source: tags/arb-6.0.4/SOURCE_TOOLS/COMPILE_COMPAT/Makefile

Last change on this file was 11667, checked in by westram, 10 years ago
  • use SHARED_LIB_SUFFIX instead of 'so'
File size: 3.1 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_GLIB_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))
27cxxflags_nostd=$(subst -std=gnu++0x,,$(subst -std=gnu++11,,$(cxxflags)))
28
29c0x.o: c0x.cxx Makefile
30        $(A_CXX) $(cflags) $(cxxflags_c0x) -c $< $(CXX_INCLUDES) -o $@ $(POST_COMPILE)
31
32nostd.o: nostd.cxx Makefile
33        $(A_CXX) $(cflags) $(cxxflags_nostd) -c $< $(CXX_INCLUDES) -o $@ $(POST_COMPILE)
34
35bin/% : %.o
36        $(LINK_EXECUTABLE) $@ $< $(LIB_ARBDB)
37
38$(OBJECTS) : $(LIB_DEPENDS)
39
40clean:
41        rm -f $(BINARIES) $(OBJECTS)
42
43DEPENDS = $(OBJECTS:.o=.depend)
44depends: $(DEPENDS)
45        @cat $(DEPENDS) | grep -v '^#' >>Makefile
46        @rm $(DEPENDS)
47$(DEPENDS): depend.init
48depend.init:
49        $(MAKEDEPEND) $(MAKEDEPENDFLAGS) 2>/dev/null # remove dependencies
50.cxx.depend:
51        $(MAKEDEPEND) -f- $(MAKEDEPENDFLAGS) $< 2>/dev/null >$@
52
53# DO NOT DELETE THIS LINE -- make depend depends on it.
54
55# Do not add dependencies manually - use 'make depend' in $ARBHOME
56# For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main)
57
58c0x.o: $(ARBHOME)/INCLUDE/ad_prot.h
59c0x.o: $(ARBHOME)/INCLUDE/ad_t_prot.h
60c0x.o: $(ARBHOME)/INCLUDE/arb_assert.h
61c0x.o: $(ARBHOME)/INCLUDE/arb_core.h
62c0x.o: $(ARBHOME)/INCLUDE/arb_error.h
63c0x.o: $(ARBHOME)/INCLUDE/arb_msg.h
64c0x.o: $(ARBHOME)/INCLUDE/arb_string.h
65c0x.o: $(ARBHOME)/INCLUDE/arbdb.h
66c0x.o: $(ARBHOME)/INCLUDE/arbdb_base.h
67c0x.o: $(ARBHOME)/INCLUDE/arbdbt.h
68c0x.o: $(ARBHOME)/INCLUDE/arbtools.h
69c0x.o: $(ARBHOME)/INCLUDE/attributes.h
70c0x.o: $(ARBHOME)/INCLUDE/cxxforward.h
71c0x.o: $(ARBHOME)/INCLUDE/downcast.h
72c0x.o: $(ARBHOME)/INCLUDE/dupstr.h
73c0x.o: $(ARBHOME)/INCLUDE/gccver.h
74c0x.o: $(ARBHOME)/INCLUDE/smartptr.h
75c0x.o: $(ARBHOME)/INCLUDE/static_assert.h
76c0x.o: $(ARBHOME)/INCLUDE/test_global.h
77
78nostd.o: $(ARBHOME)/INCLUDE/ad_prot.h
79nostd.o: $(ARBHOME)/INCLUDE/ad_t_prot.h
80nostd.o: $(ARBHOME)/INCLUDE/arb_assert.h
81nostd.o: $(ARBHOME)/INCLUDE/arb_core.h
82nostd.o: $(ARBHOME)/INCLUDE/arb_error.h
83nostd.o: $(ARBHOME)/INCLUDE/arb_msg.h
84nostd.o: $(ARBHOME)/INCLUDE/arb_string.h
85nostd.o: $(ARBHOME)/INCLUDE/arbdb.h
86nostd.o: $(ARBHOME)/INCLUDE/arbdb_base.h
87nostd.o: $(ARBHOME)/INCLUDE/arbdbt.h
88nostd.o: $(ARBHOME)/INCLUDE/arbtools.h
89nostd.o: $(ARBHOME)/INCLUDE/attributes.h
90nostd.o: $(ARBHOME)/INCLUDE/cxxforward.h
91nostd.o: $(ARBHOME)/INCLUDE/downcast.h
92nostd.o: $(ARBHOME)/INCLUDE/dupstr.h
93nostd.o: $(ARBHOME)/INCLUDE/gccver.h
94nostd.o: $(ARBHOME)/INCLUDE/smartptr.h
95nostd.o: $(ARBHOME)/INCLUDE/static_assert.h
96nostd.o: $(ARBHOME)/INCLUDE/test_global.h
Note: See TracBrowser for help on using the repository browser.