2 ## Solaris-specific setup using Sun's workshop compilers
3 ## Copyright (c) 1999-2000, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## $Id: mh-solaris,v 1.1.1.1 2003/02/05 21:31:17 avery Exp $
8 ## Flags for position independent code
9 SHAREDLIBCFLAGS = -KPIC
10 SHAREDLIBCXXFLAGS = -KPIC
11 SHAREDLIBCPPFLAGS = -DPIC
13 ## Commands to generate dependency files
14 GEN_DEPS.c= $(CC) -xM $(DEFS) $(CPPFLAGS)
15 GEN_DEPS.cc= $(CXX) -xM $(DEFS) $(CPPFLAGS)
17 # -libmil means use the intrinsic library functions like strlen
20 # -mt means 'compiles and links a multithreaded program'
25 ## For Sun Workshop, use CC to link to bring in C++ runtime
26 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
27 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
29 ## Commands to make a shared library
30 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
31 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
33 ## Compiler switch to embed a runtime search path
37 ## Compiler switch to embed a library name
38 LD_SONAME = -h $(MIDDLE_SO_TARGET)
40 ## Shared object suffix
42 ## Non-shared intermediate object suffix
46 %.$(STATIC_O): $(srcdir)/%.c
47 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
49 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
51 %.$(STATIC_O): $(srcdir)/%.cpp
52 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
54 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
56 ../data/%.o: ../data/%.c
57 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -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 $< $@
72 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
73 $(RM) $@ && ln -s $*.$(SO).$(SO_TARGET_VERSION) $@
76 BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
77 BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
79 ## End Solaris-specific setup