michael@0: ## -*-makefile-*- michael@0: ## Solaris-specific setup using Sun's compilers michael@0: ## Copyright (c) 1999-2010, International Business Machines Corporation and michael@0: ## others. All Rights Reserved. michael@0: michael@0: ## Flags for position independent code michael@0: SHAREDLIBCFLAGS = -KPIC michael@0: SHAREDLIBCXXFLAGS = -KPIC michael@0: SHAREDLIBCPPFLAGS = -DPIC michael@0: michael@0: ## Commands to generate dependency files michael@0: GEN_DEPS.c= $(CC) -xM $(DEFS) $(CPPFLAGS) michael@0: GEN_DEPS.cc= $(CXX) -xM $(DEFS) $(CPPFLAGS) michael@0: michael@0: ifeq ($(UCLN_NO_AUTO_CLEANUP),0) michael@0: # set up init point. michael@0: UCLN_FINI = ucln_fini$(TARGET_STUBNAME)_$(SO_TARGET_VERSION_MAJOR)$(ICULIBSUFFIXCNAME) michael@0: CPPFLAGS_FINI = -DUCLN_FINI=$(UCLN_FINI) michael@0: LDFLAGS_FINI = -zfiniarray=$(UCLN_FINI) michael@0: michael@0: CPPFLAGSICUUC += $(CPPFLAGS_FINI) michael@0: LDFLAGSICUUC += $(LDFLAGS_FINI) michael@0: CPPFLAGSICUIO += $(CPPFLAGS_FINI) michael@0: LDFLAGSICUIO += $(LDFLAGS_FINI) michael@0: CPPFLAGSICUI18N += $(CPPFLAGS_FINI) michael@0: LDFLAGSICUI18N += $(LDFLAGS_FINI) michael@0: CPPFLAGSCTESTFW += $(CPPFLAGS_FINI) michael@0: LDFLAGSCTESTFW += $(LDFLAGS_FINI) michael@0: michael@0: # ICUUC, ICUIO, ICUI18N, CTESTFW michael@0: endif michael@0: michael@0: # -mt means 'compiles and links a multithreaded program' michael@0: THREADSCFLAGS += -mt michael@0: THREADSCXXFLAGS += -mt michael@0: michael@0: ## Commands to link michael@0: ## For Sun Workshop, use CC to link to bring in C++ runtime michael@0: LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) michael@0: LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) michael@0: michael@0: ## Commands to make a shared library michael@0: SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G michael@0: SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G michael@0: michael@0: ## Compiler switch to embed a runtime search path michael@0: LD_RPATH= -R'$$'ORIGIN michael@0: LD_RPATH_PRE= -R michael@0: michael@0: #LIBRARY_PATH_PREFIX=/usr/lib/lwp: michael@0: michael@0: ## Compiler switch to embed a library name michael@0: LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET)) michael@0: michael@0: ## Shared object suffix michael@0: SO= so 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: @$(GEN_DEPS.c) $< > $@ michael@0: michael@0: %.d : $(srcdir)/%.cpp michael@0: @echo "generating dependency information for $<" michael@0: @$(GEN_DEPS.cc) $< > $@ 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 ${