michael@0: ## -*-makefile-*- michael@0: ## HPUX/gcc specific setup michael@0: ## Copyright (c) 1999-2012, International Business Machines Corporation and michael@0: ## others. All Rights Reserved. michael@0: michael@0: ## Commands to generate dependency files michael@0: GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) michael@0: GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) michael@0: michael@0: ## Flags for position independent code michael@0: SHAREDLIBCFLAGS = -fPIC michael@0: SHAREDLIBCXXFLAGS = -fPIC michael@0: SHAREDLIBCPPFLAGS = -DPIC michael@0: michael@0: ## Common 'default' path to ensure the sanity of users. Search the current michael@0: ## directory, at least. michael@0: LD_DEFAULTPATH= -Wl,+b,.:'$$'ORIGIN/ michael@0: michael@0: # Need to override this or we will get unworking assembly michael@0: #GENCCODE_ASSEMBLY=-a gcc michael@0: GENCCODE_ASSEMBLY= michael@0: michael@0: # Get some handy functions defined properly michael@0: DEFS += -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L michael@0: michael@0: ## Commands to link michael@0: ## For aCC, use the C++ linker so that __shlinit gets defined michael@0: LINK.c= $(CXX) $(DEFS) $(LDFLAGS) -Wl,+s $(LD_DEFAULTPATH) michael@0: LINK.cc= $(CXX) $(DEFS) $(LDFLAGS) -Wl,+s $(LD_DEFAULTPATH) michael@0: michael@0: ## Shared library options michael@0: LD_SOOPTIONS= -Wl,-Bsymbolic michael@0: michael@0: ## Commands to make a shared library michael@0: SHLIB.c= $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) $(SHAREDLIBCXXFLAGS) -shared -Wl,+s $(LD_DEFAULTPATH) $(LD_SOOPTIONS) michael@0: SHLIB.cc= $(CXX) $(DEFS) $(CXXFLAGS) $(LDFLAGS) $(SHAREDLIBCXXFLAGS) -shared -Wl,+s $(LD_DEFAULTPATH) $(LD_SOOPTIONS) michael@0: michael@0: ## Compiler switch to embed a runtime search path michael@0: LD_RPATH= -Wl,+b, michael@0: LD_RPATH_PRE= michael@0: michael@0: ## Compiler switch to embed a library name michael@0: LD_SONAME = -Wl,+h,$(notdir $(MIDDLE_SO_TARGET)) michael@0: michael@0: ## Environment variable to set a runtime search path michael@0: LDLIBRARYPATH_ENVVAR = SHLIB_PATH michael@0: michael@0: ## Shared object suffix michael@0: SO= sl michael@0: ## Non-shared intermediate object suffix michael@0: STATIC_O = o michael@0: michael@0: ## Compilation rules michael@0: %.$(STATIC_O): $(srcdir)/%.c michael@0: $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< michael@0: %.o: $(srcdir)/%.c michael@0: $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< michael@0: michael@0: %.$(STATIC_O): $(srcdir)/%.cpp michael@0: $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< michael@0: %.o: $(srcdir)/%.cpp michael@0: $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< michael@0: michael@0: michael@0: ## Dependency rules michael@0: %.d : $(srcdir)/%.c michael@0: @echo "Generating dependency information for $<" michael@0: @$(SHELL) -ec '$(GEN_DEPS.c) $< \ michael@0: | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ michael@0: [ -s $@ ] || rm -f $@' michael@0: michael@0: %.d : $(srcdir)/%.cpp michael@0: @echo "Generating dependency information for $<" michael@0: @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ michael@0: | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ michael@0: [ -s $@ ] || rm -f $@' michael@0: michael@0: ## Versioned libraries rules michael@0: michael@0: %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) michael@0: $(RM) $@ && ln -s ${