]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/config/mh-hpux-acc
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / config / mh-hpux-acc
... / ...
CommitLineData
1## -*-makefile-*-
2## HP/UX-specific setup using aCC
3## Copyright (c) 1999-2004, International Business Machines Corporation and
4## others. All Rights Reserved.
5
6## Commands to generate dependency files
7GEN_DEPS.c= :
8GEN_DEPS.cc= :
9
10## Flags for position independent code
11SHAREDLIBCFLAGS = +z
12SHAREDLIBCXXFLAGS = +z
13
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
19# Use Extended ANSI mode, which is useful for 64-bit numbers
20# +Olibcalls uses intrinsic functions for strlen and others
21# +W ignores some warnings
22# 495 The linkage directive is ignored for an object or function...
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)
26# 823 Redundant preprocessing concatenation operation results in two valid
27# preprocessing tokens. This comes from INT64_C in <inttypes.h>
28CFLAGS += +Olibcalls -Ae +ESlit
29CXXFLAGS += +Olibcalls +W495 +W740 +W749 +W823
30
31## Commands to compile
32COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c
33COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c
34
35## Common 'default' path to ensure the sanity of users. Search the current
36## directory, at least.
37LD_DEFAULTPATH= -Wl,+b,.:'$$'ORIGIN/
38
39# Use SHLIB_PATH and LD_LIBRARY_PATH to locate shared libraries
40LDFLAGS += -Wl,+s $(LD_DEFAULTPATH)
41
42## Commands to link
43## For aCC, use the C++ linker so that __shlinit gets defined
44LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
45LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
46
47## Commands to make a shared library
48#SHLIB.c= $(LD) $(LDFLAGS) -b
49SHLIB.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -b
50SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -b
51
52## Compiler switch to embed a runtime search path
53LD_RPATH= -Wl,+b,
54LD_RPATH_PRE=
55
56## Environment variable to set a runtime search path
57LDLIBRARYPATH_ENVVAR = SHLIB_PATH
58
59## Compiler switch to embed a library name
60LD_SONAME = -Wl,+h,$(notdir $(MIDDLE_SO_TARGET))
61
62## The type of assembly needed when pkgdata is used for generating shared libraries.
63# Commented out for now because the hp1 test machine runs out of memory.
64#GENCCODE_ASSEMBLY=-a aCC
65
66## Shared object suffix
67SO= sl
68## Non-shared intermediate object suffix
69STATIC_O = o
70
71## Compilation rules
72%.$(STATIC_O): $(srcdir)/%.c
73 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
74%.o: $(srcdir)/%.c
75 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
76
77%.$(STATIC_O): $(srcdir)/%.cpp
78 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
79%.o: $(srcdir)/%.cpp
80 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
81
82
83## Dependency rules
84%.d : $(srcdir)/%.c
85 @echo "generating dependency information for $<"
86 @$(GEN_DEPS.c) $< > $@
87
88%.d : $(srcdir)/%.cpp
89 @echo "generating dependency information for $<"
90 @$(GEN_DEPS.cc) $< > $@
91
92## Versioned libraries rules
93
94%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
95 $(RM) $@ && ln -s ${<F} $@
96%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
97 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
98
99## Install libraries as executable
100INSTALL-L=$(INSTALL_PROGRAM)
101
102## End HP/UX-specific setup