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