]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | ## -*-makefile-*- |
73c04bcf A |
2 | ## Solaris-specific setup using Sun's compilers |
3 | ## Copyright (c) 1999-2006, 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 | ||
b75a7d8f | 15 | # -mt means 'compiles and links a multithreaded program' |
374ca955 A |
16 | THREADSCFLAGS += -mt |
17 | THREADSCXXFLAGS += -mt | |
b75a7d8f A |
18 | |
19 | ## Commands to link | |
20 | ## For Sun Workshop, use CC to link to bring in C++ runtime | |
21 | LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) | |
22 | LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) | |
23 | ||
24 | ## Commands to make a shared library | |
25 | SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G | |
26 | SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G | |
27 | ||
28 | ## Compiler switch to embed a runtime search path | |
29 | LD_RPATH= -R | |
30 | LD_RPATH_PRE= | |
31 | ||
73c04bcf A |
32 | #LIBRARY_PATH_PREFIX=/usr/lib/lwp: |
33 | ||
b75a7d8f | 34 | ## Compiler switch to embed a library name |
374ca955 A |
35 | LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET)) |
36 | ||
b75a7d8f A |
37 | ## Shared object suffix |
38 | SO= so | |
39 | ## Non-shared intermediate object suffix | |
40 | STATIC_O = o | |
41 | ||
42 | ## Compilation rules | |
43 | %.$(STATIC_O): $(srcdir)/%.c | |
44 | $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< | |
45 | %.o: $(srcdir)/%.c | |
46 | $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< | |
47 | ||
48 | %.$(STATIC_O): $(srcdir)/%.cpp | |
49 | $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< | |
50 | %.o: $(srcdir)/%.cpp | |
51 | $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< | |
52 | ||
b75a7d8f A |
53 | |
54 | ## Dependency rules | |
55 | %.d : $(srcdir)/%.c | |
56 | @echo "generating dependency information for $<" | |
57 | @$(GEN_DEPS.c) $< > $@ | |
58 | ||
59 | %.d : $(srcdir)/%.cpp | |
60 | @echo "generating dependency information for $<" | |
61 | @$(GEN_DEPS.cc) $< > $@ | |
62 | ||
63 | ## Versioned libraries rules | |
64 | ||
65 | %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) | |
374ca955 | 66 | $(RM) $@ && ln -s ${<F} $@ |
b75a7d8f | 67 | %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) |
374ca955 | 68 | $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ |
b75a7d8f A |
69 | |
70 | # | |
374ca955 | 71 | ifeq (strip $(GENCCODE_ASSEMBLY),) |
b75a7d8f | 72 | BIR_LDFLAGS= -Wl,-M,$(NAME).map -Wl,-B,symbolic -Wl,-B,eliminate |
b75a7d8f | 73 | BIR_DEPS= $(NAME).map |
374ca955 A |
74 | endif |
75 | ||
b75a7d8f | 76 | ## End Solaris-specific setup |