]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/mh-solaris
ICU-400.37.tar.gz
[apple/icu.git] / icuSources / config / mh-solaris
1 ## -*-makefile-*-
2 ## Solaris-specific setup using Sun's compilers
3 ## Copyright (c) 1999-2006, 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 # -mt means 'compiles and links a multithreaded program'
16 THREADSCFLAGS += -mt
17 THREADSCXXFLAGS += -mt
18
19 ## Commands to link
20 ## For Sun Workshop, use CC to link to bring in C++ runtime
21 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
22 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
23
24 ## Commands to make a shared library
25 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
26 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
27
28 ## Compiler switch to embed a runtime search path
29 LD_RPATH= -R
30 LD_RPATH_PRE=
31
32 #LIBRARY_PATH_PREFIX=/usr/lib/lwp:
33
34 ## Compiler switch to embed a library name
35 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
36
37 ## Shared object suffix
38 SO= so
39 ## Non-shared intermediate object suffix
40 STATIC_O = o
41
42 ## Compilation rules
43 %.$(STATIC_O): $(srcdir)/%.c
44 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
45 %.o: $(srcdir)/%.c
46 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
47
48 %.$(STATIC_O): $(srcdir)/%.cpp
49 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
50 %.o: $(srcdir)/%.cpp
51 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
52
53
54 ## Dependency rules
55 %.d : $(srcdir)/%.c
56 @echo "generating dependency information for $<"
57 @$(GEN_DEPS.c) $< > $@
58
59 %.d : $(srcdir)/%.cpp
60 @echo "generating dependency information for $<"
61 @$(GEN_DEPS.cc) $< > $@
62
63 ## Versioned libraries rules
64
65 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
66 $(RM) $@ && ln -s ${<F} $@
67 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
68 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
69
70 #
71 ifeq (strip $(GENCCODE_ASSEMBLY),)
72 BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
73 BIR_DEPS= $(NAME).map
74 endif
75
76 ## End Solaris-specific setup