2 ## HP/UX-specific setup using aCC
3 ## Copyright (c) 1999-2003, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## $Id: mh-hpux-acc,v 1.1.1.2 2003/07/03 18:13:33 avery Exp $
8 ## Commands to generate dependency files
12 ## Flags for position independent code
14 SHAREDLIBCXXFLAGS = +z
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
26 ## Commands to compile
27 COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c
28 COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c
30 ## Common 'default' path to ensure the sanity of users. Search the current
31 ## directory, at least.
32 LD_DEFAULTPATH= -Wl,+b,.:'$$'ORIGIN/
34 # Use SHLIB_PATH and LD_LIBRARY_PATH to locate shared libraries
35 LDFLAGS += -Wl,+s $(LD_DEFAULTPATH)
38 ## For aCC, use the C++ linker so that __shlinit gets defined
39 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
40 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
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
47 ## Compiler switch to embed a runtime search path
51 ## Environment variable to set a runtime search path
52 LDLIBRARYPATH_ENVVAR = SHLIB_PATH
54 ## Compiler switch to embed a library name
55 LD_SONAME = -Wl,+h,$(MIDDLE_SO_TARGET)
57 ## Shared object suffix
59 ## Non-shared intermediate object suffix
63 %.$(STATIC_O): $(srcdir)/%.c
64 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
66 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
68 %.$(STATIC_O): $(srcdir)/%.cpp
69 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
71 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
73 ../data/%.o: ../data/%.c
74 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
78 @echo "generating dependency information for $<"
79 @$(GEN_DEPS.c) $< > $@
82 @echo "generating dependency information for $<"
83 @$(GEN_DEPS.cc) $< > $@
85 ## Versioned libraries rules
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) $@
92 ## Install libraries as executable
93 INSTALL-L=$(INSTALL_PROGRAM)
95 ## End HP/UX-specific setup