2 ## Linux-specific setup
3 ## Copyright (c) 1999-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## Commands to generate dependency files
7 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
8 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
10 ## Flags for position independent code
11 SHAREDLIBCFLAGS = -fPIC
12 SHAREDLIBCXXFLAGS = -fPIC
13 SHAREDLIBCPPFLAGS = -DPIC
15 ## Additional flags when building libraries and with threads
16 LIBCPPFLAGS = -D_REENTRANT
17 THREADSCPPFLAGS = -D_REENTRANT
19 # The tests need complete IEEE floating point support
23 ## Compiler switch to embed a runtime search path
25 LD_RPATH_PRE= -Wl,-rpath,
27 ## Compiler switch to embed a library name
28 LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
30 ## Shared object suffix
32 ## Non-shared intermediate object suffix
36 %.$(STATIC_O): $(srcdir)/%.c
37 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
39 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
41 %.$(STATIC_O): $(srcdir)/%.cpp
42 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
44 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
49 @echo "generating dependency information for $<"
50 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
51 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
52 [ -s $@ ] || rm -f $@'
55 @echo "generating dependency information for $<"
56 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
57 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
58 [ -s $@ ] || rm -f $@'
60 ## Versioned libraries rules
62 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
63 $(RM) $@ && ln -s ${<F} $@
64 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
65 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
67 # The type of assembly to write for generating an object file
68 GENCCODE_ASSEMBLY=-a gcc
70 ## Bind internal references
72 # LDflags that pkgdata will use
73 BIR_LDFLAGS= -Wl,-Bsymbolic
75 # CPPflags for genccode/gencmn
76 BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
78 # Dependencies [i.e. map files] for the final library
81 ## End Linux-specific setup