]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-solaris
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / config / mh-solaris
CommitLineData
b75a7d8f 1## -*-makefile-*-
73c04bcf
A
2## Solaris-specific setup using Sun's compilers
3## Copyright (c) 1999-2006, International Business Machines Corporation and
b75a7d8f 4## others. All Rights Reserved.
b75a7d8f
A
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
b75a7d8f 15# -mt means 'compiles and links a multithreaded program'
374ca955
A
16THREADSCFLAGS += -mt
17THREADSCXXFLAGS += -mt
b75a7d8f
A
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
73c04bcf
A
32#LIBRARY_PATH_PREFIX=/usr/lib/lwp:
33
b75a7d8f 34## Compiler switch to embed a library name
374ca955
A
35LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
36
b75a7d8f
A
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
b75a7d8f
A
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)
374ca955 66 $(RM) $@ && ln -s ${<F} $@
b75a7d8f 67%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
374ca955 68 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
b75a7d8f
A
69
70#
374ca955 71ifeq (strip $(GENCCODE_ASSEMBLY),)
b75a7d8f 72BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
b75a7d8f 73BIR_DEPS= $(NAME).map
374ca955
A
74endif
75
b75a7d8f 76## End Solaris-specific setup