michael@0: ## -*-makefile-*- michael@0: ## Linux-specific setup for Visual Age michael@0: ## Copyright (c) 2003-2010, 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: # -qroconst make the strings readonly, which is usually the default. michael@0: # This helps in the data library, michael@0: # -qproto assumes all functions are prototyped (for optimization) michael@0: CFLAGS += -qproto -qroconst michael@0: CXXFLAGS += -qproto -qroconst michael@0: michael@0: GENCCODE_ASSEMBLY=-a gcc michael@0: ## Flags for position independent code michael@0: SHAREDLIBCFLAGS = -qpic=large michael@0: SHAREDLIBCXXFLAGS = -qpic=large michael@0: SHAREDLIBCPPFLAGS = -DPIC michael@0: michael@0: ## Additional flags when building libraries and with threads michael@0: THREADSCPPFLAGS = -D_REENTRANT michael@0: LIBCPPFLAGS = michael@0: michael@0: ## Compiler switch to embed a runtime search path michael@0: LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN michael@0: #LD_RPATH_PRE = -Wl,-rpath, michael@0: michael@0: ## Compiler switch to embed a library name michael@0: # The initial tab in the next line is to prevent icu-config from reading it. michael@0: LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) michael@0: #SH# # We can't depend on MIDDLE_SO_TARGET being set. michael@0: #SH# LD_SONAME= michael@0: michael@0: ## The type of assembly needed when pkgdata is used for generating shared libraries. michael@0: GENCCODE_ASSEMBLY=-a gcc michael@0: michael@0: ## Shared object suffix michael@0: SO = so michael@0: ## Non-shared intermediate object suffix michael@0: STATIC_O = ao michael@0: michael@0: ## Override the default mechanism for building shared objects michael@0: SHLIB.c= $(CC) $(CFLAGS) -qmkshrobj -qpic=large -G $(LDFLAGS) michael@0: SHLIB.cc= $(CXX) $(CXXFLAGS) -qmkshrobj -qpic=large -G $(LDFLAGS) 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) $< > /dev/null' michael@0: michael@0: %.d: $(srcdir)/%.cpp michael@0: @echo "generating dependency information for $<" michael@0: @$(SHELL) -ec '$(GEN_DEPS.cc) $< > /dev/null' 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 ${