]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-aix
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / config / mh-aix
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## Aix-specific setup (for xlC)
3## Copyright (c) 1999-2002, International Business Machines Corporation and
4## others. All Rights Reserved.
5##
6## $Id: mh-aix,v 1.1.1.2 2003/07/03 18:13:33 avery Exp $
7##
8## Please note: AIX does NOT have library versioning per se (there is no 'SONAME' capability).
9## So, we are using 'windows' style library names, that is, libicuuc20.1.so instead of libicuuc.so.20.1
10
11## Commands to generate dependency files
12GEN_DEPS.c= $(CC) -E -M $(DEFS) $(CPPFLAGS)
13GEN_DEPS.cc= $(CXX) -E -M $(DEFS) $(CPPFLAGS)
14
15# Make the strings readonly. This helps in the common data library
16CFLAGS += -qroconst
17CXXFLAGS += -qroconst
18
19LDFLAGS += -brtl
20
21## We need to delete things prior to linking, or else we'll get
22## SEVERE ERROR: output file in use .. on AIX.
23## But, shell script version should NOT delete target as we don't
24## have $@ in that context. (SH = only shell script, icu-config)
25AIX_PREDELETE=rm -f $@ ;
26#SH# AIX_PREDELETE=
27
28
29## Commands to link
30## We need to use the C++ linker, even when linking C programs, since
31## our libraries contain C++ code (C++ static init not called)
32LINK.c= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
33LINK.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
34
35## Commands to make a shared library
36SHLIB.c= $(AIX_PREDELETE) $(AIX_SHLIB) -p 5000 $(LDFLAGS)
37SHLIB.cc= $(AIX_PREDELETE) $(AIX_SHLIB) -p 5000 $(LDFLAGS)
38
39## Compiler switch to embed a runtime search path
40LD_RPATH= -I
41LD_RPATH_PRE=
42
43## Environment variable to set a runtime search path
44LDLIBRARYPATH_ENVVAR = LIBPATH
45
46## Override Versioned target for a shared library.
47FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
48MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
49
50# The following is for Makefile.inc's use.
51ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
52
53# this one is for icudefs.mk's use
54SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
55
56## Compiler switch to embed a library name. Not present on AIX.
57LD_SONAME =
58
59## Shared object suffix
60SO= so
61
62## Non-shared intermediate object suffix
63STATIC_O = o
64
65## Special AIX rules
66
67## Build archive from shared object
68%.a : %.so
69 $(AR) $(ARFLAGS) $@ $<
70
71## Build import list from export list
72%.e : %.exp
73 @echo "Building an import list for $<"
74 @$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
75
76## Compilation rules
77%.$(STATIC_O): $(srcdir)/%.c
78 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
79%.o: $(srcdir)/%.c
80 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
81
82%.$(STATIC_O): $(srcdir)/%.cpp
83 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
84%.o: $(srcdir)/%.cpp
85 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
86
87../data/%.o: ../data/%.c
88 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
89
90## Dependency rules
91%.d : %.u
92 @$(SHELL) -ec 'cat $< \
93 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
94 [ -s $@ ] || rm -f $@ ; rm -f $<'
95
96%.u : $(srcdir)/%.c
97 @echo "generating dependency information for $<"
98 @$(SHELL) -ec '$(GEN_DEPS.c) $< > /dev/null'
99
100%.u : $(srcdir)/%.cpp
101 @echo "generating dependency information for $<"
102 @$(SHELL) -ec '$(GEN_DEPS.cc) $< > /dev/null'
103
104
105## Versioned libraries rules
106%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
107 $(RM) $@ && ln -s $*$(SO_TARGET_VERSION).$(SO) $@
108%.$(SO): %$(SO_TARGET_VERSION).$(SO)
109 $(RM) $@ && ln -s $*$(SO_TARGET_VERSION).$(SO) $@
110
111
112## BIR - bind with internal references [so app data and icu data doesn't collide]
113BIR_LDFLAGS= -E$(NAME).map -bnoexpall
114BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
115BIR_DEPS= $(NAME).map
116
117
118## End Aix-specific setup