2 ## Linux-specific setup for Visual Age
3 ## Copyright (c) 2003-2010, 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 # -qroconst make the strings readonly, which is usually the default.
11 # This helps in the data library,
12 # -qproto assumes all functions are prototyped (for optimization)
13 CFLAGS += -qproto -qroconst
14 CXXFLAGS += -qproto -qroconst
16 GENCCODE_ASSEMBLY=-a gcc
17 ## Flags for position independent code
18 SHAREDLIBCFLAGS = -qpic=large
19 SHAREDLIBCXXFLAGS = -qpic=large
20 SHAREDLIBCPPFLAGS = -DPIC
22 ## Additional flags when building libraries and with threads
23 THREADSCPPFLAGS = -D_REENTRANT
26 ## Compiler switch to embed a runtime search path
27 LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
28 #LD_RPATH_PRE = -Wl,-rpath,
30 ## Compiler switch to embed a library name
31 # The initial tab in the next line is to prevent icu-config from reading it.
32 LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
33 #SH# # We can't depend on MIDDLE_SO_TARGET being set.
36 ## The type of assembly needed when pkgdata is used for generating shared libraries.
37 GENCCODE_ASSEMBLY=-a gcc
39 ## Shared object suffix
41 ## Non-shared intermediate object suffix
44 ## Override the default mechanism for building shared objects
45 SHLIB.c= $(CC) $(CFLAGS) -qmkshrobj -qpic=large -G $(LDFLAGS)
46 SHLIB.cc= $(CXX) $(CXXFLAGS) -qmkshrobj -qpic=large -G $(LDFLAGS)
49 %.$(STATIC_O): $(srcdir)/%.c
50 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
52 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
54 %.$(STATIC_O): $(srcdir)/%.cpp
55 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
57 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
62 @echo "generating dependency information for $<"
63 @$(SHELL) -ec '$(GEN_DEPS.c) $< > /dev/null'
66 @echo "generating dependency information for $<"
67 @$(SHELL) -ec '$(GEN_DEPS.cc) $< > /dev/null'
69 ## Versioned libraries rules
71 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
72 $(RM) $@ && ln -s ${<F} $@
73 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
74 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
76 ## End Linux-specific setup