]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-solaris
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / config / mh-solaris
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## Solaris-specific setup using Sun's workshop compilers
374ca955 3## Copyright (c) 1999-2004, 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
15# -libmil means use the intrinsic library functions like strlen
16CPPFLAGS += -libmil
17
18# -mt means 'compiles and links a multithreaded program'
374ca955
A
19THREADSCFLAGS += -mt
20THREADSCXXFLAGS += -mt
b75a7d8f
A
21
22## Commands to link
23## For Sun Workshop, use CC to link to bring in C++ runtime
24LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
25LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
26
27## Commands to make a shared library
28SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
29SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
30
31## Compiler switch to embed a runtime search path
32LD_RPATH= -R
33LD_RPATH_PRE=
34
35## Compiler switch to embed a library name
374ca955
A
36LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
37
38## The type of assembly needed when pkgdata is used for generating shared libraries.
39GENCCODE_ASSEMBLY=-a sun
b75a7d8f
A
40
41## Shared object suffix
42SO= so
43## Non-shared intermediate object suffix
44STATIC_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
b75a7d8f
A
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)
374ca955 70 $(RM) $@ && ln -s ${<F} $@
b75a7d8f 71%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
374ca955 72 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
b75a7d8f
A
73
74#
374ca955 75ifeq (strip $(GENCCODE_ASSEMBLY),)
b75a7d8f
A
76BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
77BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
78BIR_DEPS= $(NAME).map
374ca955
A
79endif
80
b75a7d8f 81## End Solaris-specific setup