2 ## MP-RAS specific setup
3 ## Copyright (c) 2003-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## Original contributer: Jason Gordon from NCR
8 ## Flags for position independent code
9 SHAREDLIBCFLAGS = -K PIC
10 SHAREDLIBCXXFLAGS = -K PIC
11 SHAREDLIBCPPFLAGS = -DPIC
13 ## Commands to generate dependency files
14 GEN_DEPS.c= $(CC) -Hnocopyr -I/usr/include -Hcpplvl=3 -Xa -Hmake $(DEFS) $(CPPFLAGS)
15 GEN_DEPS.cc= $(CXX) -Hnocopyr -I/usr/include -Hcpplvl=3 -Xa -Hmake $(DEFS) $(CPPFLAGS)
18 LINK.c= $(CC) $(CXXFLAGS) $(LDFLAGS)
19 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
21 ## Commands to make a shared library
22 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
23 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
25 ## Compiler switch to embed a runtime search path
29 ## Compiler switch to embed a library name
30 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
32 ## Shared object suffix
34 ## Non-shared intermediate object suffix
38 %.$(STATIC_O): $(srcdir)/%.c
39 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
41 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
43 %.$(STATIC_O): $(srcdir)/%.cpp
44 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
46 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
51 @echo "generating dependency information for $<"
52 @$(GEN_DEPS.c) $< > $@
55 @echo "generating dependency information for $<"
56 @$(GEN_DEPS.cc) $< > $@
58 ## Versioned libraries rules
60 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
61 $(RM) $@ && ln -s ${<F} $@
62 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
63 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@