]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/mh-hpux-gcc
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / config / mh-hpux-gcc
1 ## -*-makefile-*-
2 ## HPUX/gcc specific setup
3 ## Copyright (c) 1999-2001, International Business Machines Corporation and
4 ## others. All Rights Reserved.
5 ##
6 ## $Id: mh-hpux-gcc,v 1.1.1.1 2003/02/05 21:31:17 avery Exp $
7
8 ## Commands to generate dependency files
9 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
10 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
11
12 ## Flags for position independent code
13 SHAREDLIBCFLAGS = -fPIC
14 SHAREDLIBCXXFLAGS = -fPIC
15 SHAREDLIBCPPFLAGS = -DPIC
16
17 ## Common 'default' path to ensure the sanity of users. Search the current
18 ## directory, at least.
19 LD_DEFAULTPATH= -Wl,+b,.:'$$'ORIGIN/
20
21 # Get some handy functions defined properly
22 DEFS += -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L
23
24 ## Commands to link
25 ## For aCC, use the C++ linker so that __shlinit gets defined
26 LINK.c= $(CXX) $(DEFS) $(LDFLAGS) -Wl,+s $(LD_DEFAULTPATH)
27 LINK.cc= $(CXX) $(DEFS) $(LDFLAGS) -Wl,+s $(LD_DEFAULTPATH)
28
29 ## Commands to make a shared library
30 SHLIB.c= $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) $(SHAREDLIBCXXFLAGS) -shared -Wl,+s $(LD_DEFAULTPATH)
31 SHLIB.cc= $(CXX) $(DEFS) $(CXXFLAGS) $(LDFLAGS) $(SHAREDLIBCXXFLAGS) -shared -Wl,+s $(LD_DEFAULTPATH)
32
33 ## Compiler switch to embed a runtime search path
34 LD_RPATH= -Wl,+b,
35 LD_RPATH_PRE=
36
37 ## Compiler switch to embed a library name
38 LD_SONAME = -Wl,+h,$(MIDDLE_SO_TARGET)
39
40 ## Environment variable to set a runtime search path
41 LDLIBRARYPATH_ENVVAR = SHLIB_PATH
42
43 ## Shared object suffix
44 SO= sl
45 ## Non-shared intermediate object suffix
46 STATIC_O = o
47
48 ## Compilation rules
49 %.$(STATIC_O): $(srcdir)/%.c
50 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
51 %.o: $(srcdir)/%.c
52 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
53
54 %.$(STATIC_O): $(srcdir)/%.cpp
55 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
56 %.o: $(srcdir)/%.cpp
57 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
58
59 ../data/%.o: ../data/%.c
60 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
61
62 ## Dependency rules
63 %.d : $(srcdir)/%.c
64 @echo "Generating dependency information for $<"
65 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
66 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
67 [ -s $@ ] || rm -f $@'
68
69 %.d : $(srcdir)/%.cpp
70 @echo "Generating dependency information for $<"
71 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
72 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
73 [ -s $@ ] || rm -f $@'
74
75 ## Versioned libraries rules
76
77 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
78 $(RM) $@ && ln -s $< $@
79 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
80 $(RM) $@ && ln -s $*.$(SO).$(SO_TARGET_VERSION) $@
81
82 ## End HPUX/gcc specific setup
83