]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | ## -*-makefile-*- |
73c04bcf | 2 | ## Solaris-specific setup using Sun's compilers |
729e4ab9 | 3 | ## Copyright (c) 1999-2010, International Business Machines Corporation and |
b75a7d8f | 4 | ## others. All Rights Reserved. |
b75a7d8f A |
5 | |
6 | ## Flags for position independent code | |
7 | SHAREDLIBCFLAGS = -KPIC | |
8 | SHAREDLIBCXXFLAGS = -KPIC | |
9 | SHAREDLIBCPPFLAGS = -DPIC | |
10 | ||
11 | ## Commands to generate dependency files | |
12 | GEN_DEPS.c= $(CC) -xM $(DEFS) $(CPPFLAGS) | |
13 | GEN_DEPS.cc= $(CXX) -xM $(DEFS) $(CPPFLAGS) | |
14 | ||
729e4ab9 A |
15 | ifeq ($(UCLN_NO_AUTO_CLEANUP),0) |
16 | # set up init point. | |
17 | UCLN_FINI = ucln_fini$(TARGET_STUBNAME)_$(SO_TARGET_VERSION_MAJOR)$(ICULIBSUFFIXCNAME) | |
18 | CPPFLAGS_FINI = -DUCLN_FINI=$(UCLN_FINI) | |
19 | LDFLAGS_FINI = -zfiniarray=$(UCLN_FINI) | |
20 | ||
21 | CPPFLAGSICUUC += $(CPPFLAGS_FINI) | |
22 | LDFLAGSICUUC += $(LDFLAGS_FINI) | |
23 | CPPFLAGSICUIO += $(CPPFLAGS_FINI) | |
24 | LDFLAGSICUIO += $(LDFLAGS_FINI) | |
25 | CPPFLAGSICUI18N += $(CPPFLAGS_FINI) | |
26 | LDFLAGSICUI18N += $(LDFLAGS_FINI) | |
27 | CPPFLAGSCTESTFW += $(CPPFLAGS_FINI) | |
28 | LDFLAGSCTESTFW += $(LDFLAGS_FINI) | |
29 | ||
30 | # ICUUC, ICUIO, ICUI18N, CTESTFW | |
31 | endif | |
32 | ||
b75a7d8f | 33 | # -mt means 'compiles and links a multithreaded program' |
374ca955 A |
34 | THREADSCFLAGS += -mt |
35 | THREADSCXXFLAGS += -mt | |
b75a7d8f A |
36 | |
37 | ## Commands to link | |
38 | ## For Sun Workshop, use CC to link to bring in C++ runtime | |
39 | LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) | |
40 | LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) | |
41 | ||
42 | ## Commands to make a shared library | |
43 | SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G | |
44 | SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G | |
45 | ||
46 | ## Compiler switch to embed a runtime search path | |
729e4ab9 A |
47 | LD_RPATH= -R'$$'ORIGIN |
48 | LD_RPATH_PRE= -R | |
b75a7d8f | 49 | |
73c04bcf A |
50 | #LIBRARY_PATH_PREFIX=/usr/lib/lwp: |
51 | ||
b75a7d8f | 52 | ## Compiler switch to embed a library name |
374ca955 A |
53 | LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET)) |
54 | ||
b75a7d8f A |
55 | ## Shared object suffix |
56 | SO= so | |
57 | ## Non-shared intermediate object suffix | |
58 | STATIC_O = o | |
59 | ||
60 | ## Compilation rules | |
61 | %.$(STATIC_O): $(srcdir)/%.c | |
62 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< | |
63 | %.o: $(srcdir)/%.c | |
64 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< | |
65 | ||
66 | %.$(STATIC_O): $(srcdir)/%.cpp | |
67 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< | |
68 | %.o: $(srcdir)/%.cpp | |
69 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< | |
70 | ||
b75a7d8f A |
71 | |
72 | ## Dependency rules | |
73 | %.d : $(srcdir)/%.c | |
74 | @echo "generating dependency information for $<" | |
75 | @$(GEN_DEPS.c) $< > $@ | |
76 | ||
77 | %.d : $(srcdir)/%.cpp | |
78 | @echo "generating dependency information for $<" | |
79 | @$(GEN_DEPS.cc) $< > $@ | |
80 | ||
81 | ## Versioned libraries rules | |
82 | ||
83 | %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) | |
374ca955 | 84 | $(RM) $@ && ln -s ${<F} $@ |
b75a7d8f | 85 | %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) |
374ca955 | 86 | $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ |
b75a7d8f A |
87 | |
88 | # | |
374ca955 | 89 | ifeq (strip $(GENCCODE_ASSEMBLY),) |
b75a7d8f | 90 | BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate |
b75a7d8f | 91 | BIR_DEPS= $(NAME).map |
374ca955 A |
92 | endif |
93 | ||
729e4ab9 A |
94 | ## Remove shared library 's' |
95 | STATIC_PREFIX_WHEN_USED = | |
96 | STATIC_PREFIX = | |
97 | ||
b75a7d8f | 98 | ## End Solaris-specific setup |