]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/config/mh-solaris
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / config / mh-solaris
... / ...
CommitLineData
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
7SHAREDLIBCFLAGS = -KPIC
8SHAREDLIBCXXFLAGS = -KPIC
9SHAREDLIBCPPFLAGS = -DPIC
10
11## Commands to generate dependency files
12GEN_DEPS.c= $(CC) -xM $(DEFS) $(CPPFLAGS)
13GEN_DEPS.cc= $(CXX) -xM $(DEFS) $(CPPFLAGS)
14
15# -mt means 'compiles and links a multithreaded program'
16THREADSCFLAGS += -mt
17THREADSCXXFLAGS += -mt
18
19## Commands to link
20## For Sun Workshop, use CC to link to bring in C++ runtime
21LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
22LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
23
24## Commands to make a shared library
25SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
26SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
27
28## Compiler switch to embed a runtime search path
29LD_RPATH= -R
30LD_RPATH_PRE=
31
32#LIBRARY_PATH_PREFIX=/usr/lib/lwp:
33
34## Compiler switch to embed a library name
35LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
36
37## Shared object suffix
38SO= so
39## Non-shared intermediate object suffix
40STATIC_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#
71ifeq (strip $(GENCCODE_ASSEMBLY),)
72BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
73BIR_DEPS= $(NAME).map
74endif
75
76## End Solaris-specific setup