]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/mh-hpux-acc
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / config / mh-hpux-acc
1 ## -*-makefile-*-
2 ## HP/UX-specific setup using aCC
3 ## Copyright (c) 1999-2003, International Business Machines Corporation and
4 ## others. All Rights Reserved.
5 ##
6 ## $Id: mh-hpux-acc,v 1.1.1.2 2003/07/03 18:13:33 avery Exp $
7
8 ## Commands to generate dependency files
9 GEN_DEPS.c= :
10 GEN_DEPS.cc= :
11
12 ## Flags for position independent code
13 SHAREDLIBCFLAGS = +z
14 SHAREDLIBCXXFLAGS = +z
15
16 # Use Extended ANSI mode, which is useful for 64-bit numbers
17 # +Olibcalls uses intrinsic functions for strlen and others
18 # +W ignores some warnings
19 # 495 The linkage directive is ignored for an object or function...
20 # 740 Unsafe cast between pointers/references to incomplete classes...
21 # 749 This operation is non-portable and potentially unsafe.
22 # (Ironically the solution to fix this warning is non-portable)
23 CFLAGS += +Olibcalls -Ae +ESlit
24 CXXFLAGS += +Olibcalls +W495 +W740 +W749
25
26 ## Commands to compile
27 COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c
28 COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c
29
30 ## Common 'default' path to ensure the sanity of users. Search the current
31 ## directory, at least.
32 LD_DEFAULTPATH= -Wl,+b,.:'$$'ORIGIN/
33
34 # Use SHLIB_PATH and LD_LIBRARY_PATH to locate shared libraries
35 LDFLAGS += -Wl,+s $(LD_DEFAULTPATH)
36
37 ## Commands to link
38 ## For aCC, use the C++ linker so that __shlinit gets defined
39 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
40 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
41
42 ## Commands to make a shared library
43 #SHLIB.c= $(LD) $(LDFLAGS) -b
44 SHLIB.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -b
45 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -b
46
47 ## Compiler switch to embed a runtime search path
48 LD_RPATH= -Wl,+b,
49 LD_RPATH_PRE=
50
51 ## Environment variable to set a runtime search path
52 LDLIBRARYPATH_ENVVAR = SHLIB_PATH
53
54 ## Compiler switch to embed a library name
55 LD_SONAME = -Wl,+h,$(MIDDLE_SO_TARGET)
56
57 ## Shared object suffix
58 SO= sl
59 ## Non-shared intermediate object suffix
60 STATIC_O = o
61
62 ## Compilation rules
63 %.$(STATIC_O): $(srcdir)/%.c
64 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
65 %.o: $(srcdir)/%.c
66 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
67
68 %.$(STATIC_O): $(srcdir)/%.cpp
69 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
70 %.o: $(srcdir)/%.cpp
71 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
72
73 ../data/%.o: ../data/%.c
74 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
75
76 ## Dependency rules
77 %.d : $(srcdir)/%.c
78 @echo "generating dependency information for $<"
79 @$(GEN_DEPS.c) $< > $@
80
81 %.d : $(srcdir)/%.cpp
82 @echo "generating dependency information for $<"
83 @$(GEN_DEPS.cc) $< > $@
84
85 ## Versioned libraries rules
86
87 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
88 $(RM) $@ && ln -s $< $@
89 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
90 $(RM) $@ && ln -s $*.$(SO).$(SO_TARGET_VERSION) $@
91
92 ## Install libraries as executable
93 INSTALL-L=$(INSTALL_PROGRAM)
94
95 ## End HP/UX-specific setup