2 ## Copyright (C) 2016 and later: Unicode, Inc. and others.
3 ## License & terms of use: http://www.unicode.org/copyright.html
4 ## MP-RAS specific setup
5 ## Copyright (c) 2003-2004, International Business Machines Corporation and
6 ## others. All Rights Reserved.
8 ## Original contributer: Jason Gordon from NCR
10 ## Flags for position independent code
11 SHAREDLIBCFLAGS = -K PIC
12 SHAREDLIBCXXFLAGS = -K PIC
13 SHAREDLIBCPPFLAGS = -DPIC
15 ## Commands to generate dependency files
16 GEN_DEPS.c= $(CC) -Hnocopyr -I/usr/include -Hcpplvl=3 -Xa -Hmake $(DEFS) $(CPPFLAGS)
17 GEN_DEPS.cc= $(CXX) -Hnocopyr -I/usr/include -Hcpplvl=3 -Xa -Hmake $(DEFS) $(CPPFLAGS)
20 LINK.c= $(CC) $(CXXFLAGS) $(LDFLAGS)
21 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
23 ## Commands to make a shared library
24 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
25 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
27 ## Compiler switch to embed a runtime search path
31 ## Compiler switch to embed a library name
32 LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
34 ## Shared object suffix
36 ## Non-shared intermediate object suffix
40 %.$(STATIC_O): $(srcdir)/%.c
41 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
43 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
45 %.$(STATIC_O): $(srcdir)/%.cpp
46 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
48 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
53 @echo "generating dependency information for $<"
54 @$(GEN_DEPS.c) $< > $@
57 @echo "generating dependency information for $<"
58 @$(GEN_DEPS.cc) $< > $@
60 ## Versioned libraries rules
62 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
63 $(RM) $@ && ln -s ${<F} $@
64 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
65 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@