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