]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-hpux-acc
ICU-511.25.tar.gz
[apple/icu.git] / icuSources / config / mh-hpux-acc
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## HP/UX-specific setup using aCC
51004dcb 3## Copyright (c) 1999-2012, International Business Machines Corporation and
b75a7d8f 4## others. All Rights Reserved.
b75a7d8f
A
5
6## Commands to generate dependency files
7GEN_DEPS.c= :
8GEN_DEPS.cc= :
9
10## Flags for position independent code
729e4ab9
A
11SHAREDLIBCFLAGS = +Z
12SHAREDLIBCXXFLAGS = +Z
b75a7d8f 13
374ca955
A
14## Additional flags when building libraries with threads
15## We use this instead of -mt, which isn't available in all versions of aCC
16## Our tools won't compile with -D_POSIX_C_SOURCE=199506L
17THREADSCPPFLAGS = -D_REENTRANT -D_THREAD_SAFE
18
b75a7d8f 19# Use Extended ANSI mode, which is useful for 64-bit numbers
b75a7d8f 20# +W ignores some warnings
b75a7d8f
A
21# 740 Unsafe cast between pointers/references to incomplete classes...
22# 749 This operation is non-portable and potentially unsafe.
23# (Ironically the solution to fix this warning is non-portable)
374ca955
A
24# 823 Redundant preprocessing concatenation operation results in two valid
25# preprocessing tokens. This comes from INT64_C in <inttypes.h>
46f4442e 26# 4232 conversion to a more strictly aligned type may cause misaligned access.
729e4ab9 27CFLAGS += -Ae +Olit=all
51004dcb 28CXXFLAGS += -AA -Wc,-ansi_for_scope,on +W740 +W749 +W823 +W4232
729e4ab9
A
29
30ifeq ($(UCLN_NO_AUTO_CLEANUP),0)
31# set up init point.
32UCLN_FINI = ucln_fini$(TARGET_STUBNAME)_$(SO_TARGET_VERSION_MAJOR)$(ICULIBSUFFIXCNAME)
33CPPFLAGS_FINI = -DUCLN_FINI=$(UCLN_FINI)
34LDFLAGS_FINI = -Wl,+fini,$(UCLN_FINI)
35
36CPPFLAGSICUUC += $(CPPFLAGS_FINI)
37LDFLAGSICUUC += $(LDFLAGS_FINI)
38CPPFLAGSICUIO += $(CPPFLAGS_FINI)
39LDFLAGSICUIO += $(LDFLAGS_FINI)
40CPPFLAGSICUI18N += $(CPPFLAGS_FINI)
41LDFLAGSICUI18N += $(LDFLAGS_FINI)
42CPPFLAGSCTESTFW += $(CPPFLAGS_FINI)
43LDFLAGSCTESTFW += $(LDFLAGS_FINI)
44
45# ICUUC, ICUIO, ICUI18N, CTESTFW
46endif
46f4442e
A
47
48# -Bhidden_def Hides all symbols defined in the module.
49#LIBCFLAGS = -Bhidden_def
50#LIBCXXFLAGS = -Bhidden_def
b75a7d8f
A
51
52## Commands to compile
53COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c
54COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c
55
56## Common 'default' path to ensure the sanity of users. Search the current
57## directory, at least.
73c04bcf 58LD_DEFAULTPATH= -Wl,+b,'$$'ORIGIN/
b75a7d8f
A
59
60# Use SHLIB_PATH and LD_LIBRARY_PATH to locate shared libraries
61LDFLAGS += -Wl,+s $(LD_DEFAULTPATH)
62
63## Commands to link
64## For aCC, use the C++ linker so that __shlinit gets defined
65LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
66LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
67
729e4ab9
A
68## Shared library options
69## HPUX PA-risc does not recognize -Bprotected_def aC++ option.
70## Use linker option -Wl,-B,symbolic instead.
71ifeq ($(shell uname -m),ia64)
4388f060 72LD_SOOPTIONS= -Bprotected_def
729e4ab9 73else
4388f060 74LD_SOOPTIONS= -Wl,-B,symbolic
729e4ab9
A
75endif
76
b75a7d8f
A
77## Commands to make a shared library
78#SHLIB.c= $(LD) $(LDFLAGS) -b
729e4ab9
A
79SHLIB.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -b $(LD_SOOPTIONS)
80SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -b $(LD_SOOPTIONS)
b75a7d8f
A
81
82## Compiler switch to embed a runtime search path
83LD_RPATH= -Wl,+b,
84LD_RPATH_PRE=
85
86## Environment variable to set a runtime search path
87LDLIBRARYPATH_ENVVAR = SHLIB_PATH
88
89## Compiler switch to embed a library name
374ca955
A
90LD_SONAME = -Wl,+h,$(notdir $(MIDDLE_SO_TARGET))
91
92## The type of assembly needed when pkgdata is used for generating shared libraries.
93# Commented out for now because the hp1 test machine runs out of memory.
46f4442e 94#GENCCODE_ASSEMBLY=-a aCC-parisc
b75a7d8f
A
95
96## Shared object suffix
97SO= sl
98## Non-shared intermediate object suffix
99STATIC_O = o
100
101## Compilation rules
102%.$(STATIC_O): $(srcdir)/%.c
103 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
104%.o: $(srcdir)/%.c
105 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
106
107%.$(STATIC_O): $(srcdir)/%.cpp
108 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
109%.o: $(srcdir)/%.cpp
110 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
111
b75a7d8f
A
112
113## Dependency rules
114%.d : $(srcdir)/%.c
115 @echo "generating dependency information for $<"
116 @$(GEN_DEPS.c) $< > $@
117
118%.d : $(srcdir)/%.cpp
119 @echo "generating dependency information for $<"
120 @$(GEN_DEPS.cc) $< > $@
121
122## Versioned libraries rules
123
124%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
374ca955 125 $(RM) $@ && ln -s ${<F} $@
b75a7d8f 126%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
374ca955 127 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
b75a7d8f
A
128
129## Install libraries as executable
130INSTALL-L=$(INSTALL_PROGRAM)
131
729e4ab9
A
132## Remove shared library 's'
133STATIC_PREFIX_WHEN_USED =
134STATIC_PREFIX =
135
b75a7d8f 136## End HP/UX-specific setup