]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/mh-solaris
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / config / mh-solaris
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
9 SHAREDLIBCFLAGS = -KPIC
10 SHAREDLIBCXXFLAGS = -KPIC
11 SHAREDLIBCPPFLAGS = -DPIC
12
13 ## Commands to generate dependency files
14 GEN_DEPS.c= $(CC) -xM $(DEFS) $(CPPFLAGS)
15 GEN_DEPS.cc= $(CXX) -xM $(DEFS) $(CPPFLAGS)
16
17 # -libmil means use the intrinsic library functions like strlen
18 CPPFLAGS += -libmil
19
20 # -mt means 'compiles and links a multithreaded program'
21 CFLAGS += -mt
22 CXXFLAGS += -mt
23
24 ## Commands to link
25 ## For Sun Workshop, use CC to link to bring in C++ runtime
26 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
27 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
28
29 ## Commands to make a shared library
30 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
31 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
32
33 ## Compiler switch to embed a runtime search path
34 LD_RPATH= -R
35 LD_RPATH_PRE=
36
37 ## Compiler switch to embed a library name
38 LD_SONAME = -h $(MIDDLE_SO_TARGET)
39
40 ## Shared object suffix
41 SO= so
42 ## Non-shared intermediate object suffix
43 STATIC_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 #
76 BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate
77 BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
78 BIR_DEPS= $(NAME).map
79 ## End Solaris-specific setup