]>
Commit | Line | Data |
---|---|---|
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 | |
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 | ||
15 | # -libmil means use the intrinsic library functions like strlen | |
16 | CPPFLAGS += -libmil | |
17 | ||
18 | # -mt means 'compiles and links a multithreaded program' | |
374ca955 A |
19 | THREADSCFLAGS += -mt |
20 | THREADSCXXFLAGS += -mt | |
b75a7d8f A |
21 | |
22 | ## Commands to link | |
23 | ## For Sun Workshop, use CC to link to bring in C++ runtime | |
24 | LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) | |
25 | LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) | |
26 | ||
27 | ## Commands to make a shared library | |
28 | SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G | |
29 | SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G | |
30 | ||
31 | ## Compiler switch to embed a runtime search path | |
32 | LD_RPATH= -R | |
33 | LD_RPATH_PRE= | |
34 | ||
35 | ## Compiler switch to embed a library name | |
374ca955 A |
36 | LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET)) |
37 | ||
38 | ## The type of assembly needed when pkgdata is used for generating shared libraries. | |
39 | GENCCODE_ASSEMBLY=-a sun | |
b75a7d8f A |
40 | |
41 | ## Shared object suffix | |
42 | SO= so | |
43 | ## Non-shared intermediate object suffix | |
44 | STATIC_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 | 75 | ifeq (strip $(GENCCODE_ASSEMBLY),) |
b75a7d8f A |
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 | |
374ca955 A |
79 | endif |
80 | ||
b75a7d8f | 81 | ## End Solaris-specific setup |