]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/mh-aix-va
ICU-6.2.21.tar.gz
[apple/icu.git] / icuSources / config / mh-aix-va
1 ## -*-makefile-*-
2 ## Aix-specific setup (for Visual Age 5+)
3 ## Copyright (c) 1999-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
5
6 ## Commands to generate dependency files
7 GEN_DEPS.c= $(CC) -E -M $(DEFS) $(CPPFLAGS)
8 GEN_DEPS.cc= $(CXX) -E -M $(DEFS) $(CPPFLAGS)
9
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
15
16 # If you readd this line, you must change the SO value
17 #LDFLAGS += -brtl
18
19 ## We need to delete things prior to linking, or else we'll get
20 ## SEVERE ERROR: output file in use .. on AIX.
21 ## But, shell script version should NOT delete target as we don't
22 ## have $@ in that context. (SH = only shell script, icu-config)
23 AIX_PREDELETE=rm -f $@ ;
24 #SH# AIX_PREDELETE=
25
26 ## Commands to link
27 ## We need to use the C++ linker, even when linking C programs, since
28 ## our libraries contain C++ code (C++ static init not called)
29 LINK.c= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
30 LINK.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
31
32 ## Commands to make a shared library
33 ## -G means -berok -brtl -bnortllib -bnosymbolic -bnoautoexp
34 ## -bh:8 means halt on errors or worse. We don't display warnings about
35 ## duplicate inline symbols.
36 SHLIB.c= $(AIX_PREDELETE) $(CXX) -qmkshrobj -G $(LDFLAGS)
37 SHLIB.cc= $(AIX_PREDELETE) $(CXX) -qmkshrobj -G $(LDFLAGS)
38
39 ## Compiler switch to embed a runtime search path
40 LD_RPATH= -I
41 LD_RPATH_PRE=
42
43 ## Environment variable to set a runtime search path
44 LDLIBRARYPATH_ENVVAR = LIBPATH
45
46 ## Override Versioned target for a shared library.
47 FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
48 MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
49
50 # The following is for Makefile.inc's use.
51 ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
52
53 # this one is for icudefs.mk's use
54 ifeq ($(ENABLE_SHARED),YES)
55 SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
56 endif
57
58 LD_SONAME =
59
60 ## The type of assembly needed when pkgdata is used for generating shared libraries.
61 GENCCODE_ASSEMBLY=-a xlc
62
63 ## Shared object suffix
64 #SO= so
65 # without the -brtl option, the library names use .a. AIX is funny that way.
66 SO= a
67 ## Non-shared intermediate object suffix
68 STATIC_O = o
69
70 ## Build archive from shared object
71 %.a : %.so
72 $(AR) $(ARFLAGS) $@ $<
73
74 ## Build import list from export list
75 %.e : %.exp
76 @echo "Building an import list for $<"
77 @$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
78
79 ## Compilation rules
80 %.$(STATIC_O): $(srcdir)/%.c
81 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
82 %.o: $(srcdir)/%.c
83 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
84
85 %.$(STATIC_O): $(srcdir)/%.cpp
86 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
87 %.o: $(srcdir)/%.cpp
88 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
89
90
91 ## Dependency rules
92 %.d : %.u
93 @$(SHELL) -ec 'cat $< \
94 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
95 [ -s $@ ] || rm -f $@ ; rm -f $<'
96
97 %.u : $(srcdir)/%.c
98 @echo "generating dependency information for $<"
99 @$(SHELL) -ec '$(GEN_DEPS.c) $< > /dev/null'
100
101 %.u : $(srcdir)/%.cpp
102 @echo "generating dependency information for $<"
103 @$(SHELL) -ec '$(GEN_DEPS.cc) $< > /dev/null'
104
105 ## Versioned libraries rules
106 %$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
107 $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
108 %.$(SO): %$(SO_TARGET_VERSION).$(SO)
109 $(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
110
111 ## End Aix-specific setup