David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 1 | ## -*-makefile-*- |
Kaido Kert | 04cd6fa | 2021-04-16 11:38:35 -0700 | [diff] [blame] | 2 | ## Copyright (C) 2016 and later: Unicode, Inc. and others. |
| 3 | ## License & terms of use: http://www.unicode.org/copyright.html |
David Ghandehari | 9e5b587 | 2016-07-28 09:50:04 -0700 | [diff] [blame] | 4 | ## Alpha-Linux-specific setup |
| 5 | ## Copyright (c) 1999-2006, International Business Machines Corporation and |
| 6 | ## others. All Rights Reserved. |
| 7 | |
| 8 | ## Commands to generate dependency files |
| 9 | #GEN_DEPS.c= $(CC) $(DEFS) $(CPPFLAGS) -MD -c -msg_quiet |
| 10 | #GEN_DEPS.cc= $(CXX) $(DEFS) $(CPPFLAGS) -D__USE_STD_IOSTREAM -c -MD -msg_quiet |
| 11 | |
| 12 | ## Flags for position independent code |
| 13 | SHAREDLIBCFLAGS = -fPIC |
| 14 | SHAREDLIBCXXFLAGS = -fPIC |
| 15 | SHAREDLIBCPPFLAGS = -DPIC |
| 16 | |
| 17 | ## Additional flags when building libraries and with threads |
| 18 | THREADSCPPFLAGS = -D_REENTRANT |
| 19 | LIBCPPFLAGS = |
| 20 | |
| 21 | # The tests need complete IEEE floating point support |
| 22 | CFLAGS += -ieee |
| 23 | CXXFLAGS += -ieee |
| 24 | |
| 25 | ## Commands to compile |
| 26 | COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -signed -accept nogccinline |
| 27 | COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c -signed -D__USE_STD_IOSTREAM -accept nogcc_inline |
| 28 | |
| 29 | |
| 30 | ## Commands to link |
| 31 | LINK.c= $(CC) -call_shared $(CFLAGS) $(LDFLAGS) |
| 32 | LINK.cc= $(CXX) -call_shared $(CXXFLAGS) $(LDFLAGS) |
| 33 | |
| 34 | ## Compiler switch to embed a runtime search path |
| 35 | LD_RPATH= |
| 36 | LD_RPATH_PRE= -Wl,-rpath, |
| 37 | |
| 38 | ## Compiler switch to embed a library name |
| 39 | LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) |
| 40 | |
| 41 | ## Shared object suffix |
| 42 | SO = so |
| 43 | ## Non-shared intermediate object suffix |
| 44 | STATIC_O = ao |
| 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 | |
| 57 | |
| 58 | ## Dependency rules |
| 59 | #%.d: $(srcdir)/%.c |
| 60 | # @echo "generating dependency information for $<" |
| 61 | # @$(SHELL) -ec '$(GEN_DEPS.c) $< \ |
| 62 | # | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ |
| 63 | # [ -s $@ ] || rm -f $@' |
| 64 | |
| 65 | #%.d: $(srcdir)/%.cpp |
| 66 | # @echo "generating dependency information for $<" |
| 67 | # @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ |
| 68 | # | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ |
| 69 | # [ -s $@ ] || rm -f $@' |
| 70 | # |
| 71 | ## Versioned libraries rules |
| 72 | |
| 73 | %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) |
| 74 | $(RM) $@ && ln -s ${<F} $@ |
| 75 | %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) |
| 76 | $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ |
| 77 | |
| 78 | ## Bind internal references |
| 79 | |
| 80 | # LDflags that pkgdata will use |
| 81 | BIR_LDFLAGS= -Wl,-Bsymbolic |
| 82 | |
| 83 | # Dependencies [i.e. map files] for the final library |
| 84 | BIR_DEPS= |
| 85 | |
| 86 | ## End Linux-specific setup |
| 87 | |