]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/mh-solaris
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / config / mh-solaris
1 ## -*-makefile-*-
2 ## Solaris-specific setup using Sun's workshop compilers
3 ## Copyright (c) 1999-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
5
6 ## Flags for position independent code
7 SHAREDLIBCFLAGS = -KPIC
8 SHAREDLIBCXXFLAGS = -KPIC
9 SHAREDLIBCPPFLAGS = -DPIC
10
11 ## Commands to generate dependency files
12 GEN_DEPS.c= $(CC) -xM $(DEFS) $(CPPFLAGS)
13 GEN_DEPS.cc= $(CXX) -xM $(DEFS) $(CPPFLAGS)
14
15 # -libmil means use the intrinsic library functions like strlen
16 CPPFLAGS += -libmil
17
18 # -mt means 'compiles and links a multithreaded program'
19 THREADSCFLAGS += -mt
20 THREADSCXXFLAGS += -mt
21
22 ## Commands to link
23 ## For Sun Workshop, use CC to link to bring in C++ runtime
24 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
25 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
26
27 ## Commands to make a shared library
28 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
29 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
30
31 ## Compiler switch to embed a runtime search path
32 LD_RPATH= -R
33 LD_RPATH_PRE=
34
35 ## Compiler switch to embed a library name
36 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
37
38 ## The type of assembly needed when pkgdata is used for generating shared libraries.
39 GENCCODE_ASSEMBLY=-a sun
40
41 ## Shared object suffix
42 SO= so
43 ## Non-shared intermediate object suffix
44 STATIC_O = o
45
46 ## Compilation rules
47 %.$(STATIC_O): $(srcdir)/%.c
48 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
49 %.o: $(srcdir)/%.c
50 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
51
52 %.$(STATIC_O): $(srcdir)/%.cpp
53 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
54 %.o: $(srcdir)/%.cpp
55 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
56
57
58 ## Dependency rules
59 %.d : $(srcdir)/%.c
60 @echo "generating dependency information for $<"
61 @$(GEN_DEPS.c) $< > $@
62
63 %.d : $(srcdir)/%.cpp
64 @echo "generating dependency information for $<"
65 @$(GEN_DEPS.cc) $< > $@
66
67 ## Versioned libraries rules
68
69 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
70 $(RM) $@ && ln -s ${<F} $@
71 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
72 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
73
74 #
75 ifeq (strip $(GENCCODE_ASSEMBLY),)
76 BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
77 BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
78 BIR_DEPS= $(NAME).map
79 endif
80
81 ## End Solaris-specific setup