2 ## HP/UX-specific setup using CC
3 ## Copyright (c) 1999-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
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.
10 HPUX_JUNK_OBJ= $(TEMP_DIR)/hpux_junk_obj.o
12 ## Commands to generate dependency files
16 ## Commands to compile
17 COMPILE.c= $(CC) -D__STDC__ +z -Ae $(DEFS) $(CPPFLAGS) $(CFLAGS) -c
18 COMPILE.cc= $(CXX) -D__STDC__ +z -ext +dup_static_removal +d $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c
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)
24 LINK.c= $(CXX) +z +a1 $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -Wl,+s
25 LINK.cc= $(CXX) +z +a1 $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -Wl,+s
27 ## Commands to make a shared library
28 #SHLIB.c= $(LD) $(LDFLAGS) -b
29 SHLIB.c= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -b -Wl,+s
30 SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -b -Wl,+s
32 ## Compiler switch to embed a runtime search path
36 ## Environment variable to set a runtime search path
37 LDLIBRARYPATH_ENVVAR = SHLIB_PATH
39 ## Compiler switch to embed a library name
40 LD_SONAME = -Wl,+h,$(notdir $(MIDDLE_SO_TARGET))
42 ## Shared object suffix
44 ## Non-shared intermediate object suffix
48 %.$(STATIC_O): $(srcdir)/%.c
49 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
51 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
53 %.$(STATIC_O): $(srcdir)/%.cpp
54 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
56 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
61 @echo "generating dependency information for $<"
62 @$(GEN_DEPS.c) $< > $@
65 @echo "generating dependency information for $<"
66 @$(GEN_DEPS.cc) $< > $@
68 ## Versioned libraries rules
70 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
71 $(RM) $@ && ln -s ${<F} $@
72 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
73 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
75 ## End HP/UX-specific setup