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