]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-hpux-cc
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / config / mh-hpux-cc
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## HP/UX-specific setup using CC
374ca955 3## Copyright (c) 1999-2004, International Business Machines Corporation and
b75a7d8f 4## others. All Rights Reserved.
b75a7d8f
A
5
6
7## This causes source/tools/pkgdata generated makefiles to create and link
8## in a bogus C++ file, so that exception handling with +eh will be
9## enabled properly. Fun.
10HPUX_JUNK_OBJ= $(TEMP_DIR)/hpux_junk_obj.o
11
12## Commands to generate dependency files
13GEN_DEPS.c= :
14GEN_DEPS.cc= :
15
16## Commands to compile
17COMPILE.c= $(CC) -D__STDC__ +z -Ae $(DEFS) $(CPPFLAGS) $(CFLAGS) -c
18COMPILE.cc= $(CXX) -D__STDC__ +z -ext +dup_static_removal +d $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c
19
20## Commands to link
21## We need to use the C++ linker, even when linking C programs, since
22## our libraries contain C++ code (bug in linker?)
23#LINK.c= $(CC) +z -Ae $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
24LINK.c= $(CXX) +z +a1 $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -Wl,+s
25LINK.cc= $(CXX) +z +a1 $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -Wl,+s
26
27## Commands to make a shared library
28#SHLIB.c= $(LD) $(LDFLAGS) -b
29SHLIB.c= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -b -Wl,+s
30SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -b -Wl,+s
31
32## Compiler switch to embed a runtime search path
33LD_RPATH= -Wl,+b,
34LD_RPATH_PRE=
35
36## Environment variable to set a runtime search path
37LDLIBRARYPATH_ENVVAR = SHLIB_PATH
38
39## Compiler switch to embed a library name
374ca955 40LD_SONAME = -Wl,+h,$(notdir $(MIDDLE_SO_TARGET))
b75a7d8f
A
41
42## Shared object suffix
43SO= sl
44## Non-shared intermediate object suffix
45STATIC_O = o
46
47## Compilation rules
48%.$(STATIC_O): $(srcdir)/%.c
49 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
50%.o: $(srcdir)/%.c
51 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
52
53%.$(STATIC_O): $(srcdir)/%.cpp
54 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
55%.o: $(srcdir)/%.cpp
56 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
57
b75a7d8f
A
58
59## Dependency rules
60%.d : $(srcdir)/%.c
61 @echo "generating dependency information for $<"
62 @$(GEN_DEPS.c) $< > $@
63
64%.d : $(srcdir)/%.cpp
65 @echo "generating dependency information for $<"
66 @$(GEN_DEPS.cc) $< > $@
67
68## Versioned libraries rules
69
70%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
374ca955 71 $(RM) $@ && ln -s ${<F} $@
b75a7d8f 72%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
374ca955 73 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
b75a7d8f
A
74
75## End HP/UX-specific setup
76