mh-linux 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. ## -*-makefile-*-
  2. ## Copyright (C) 2016 and later: Unicode, Inc. and others.
  3. ## License & terms of use: http://www.unicode.org/copyright.html
  4. ## Linux-specific setup
  5. ## Copyright (c) 1999-2013, International Business Machines Corporation and
  6. ## others. All Rights Reserved.
  7. ## Commands to generate dependency files
  8. GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
  9. GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
  10. ## Flags for position independent code
  11. SHAREDLIBCFLAGS = -fPIC
  12. SHAREDLIBCXXFLAGS = -fPIC
  13. SHAREDLIBCPPFLAGS = -DPIC
  14. ## Additional flags when building libraries and with threads
  15. THREADSCPPFLAGS = -D_REENTRANT
  16. LIBCPPFLAGS =
  17. ## Compiler switch to embed a runtime search path
  18. LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
  19. LD_RPATH_PRE = -Wl,-rpath,
  20. ## These are the library specific LDFLAGS
  21. LDFLAGSICUDT=-nodefaultlibs -nostdlib
  22. ## Compiler switch to embed a library name
  23. # The initial tab in the next line is to prevent icu-config from reading it.
  24. LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
  25. #SH# # We can't depend on MIDDLE_SO_TARGET being set.
  26. #SH# LD_SONAME=
  27. ## Shared library options
  28. LD_SOOPTIONS= -Wl,-Bsymbolic
  29. ## Shared object suffix
  30. SO = so
  31. ## Non-shared intermediate object suffix
  32. STATIC_O = ao
  33. ## Compilation rules
  34. %.$(STATIC_O): $(srcdir)/%.c
  35. $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -o $@ $<)
  36. %.o: $(srcdir)/%.c
  37. $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS)) -o $@ $<)
  38. %.$(STATIC_O): $(srcdir)/%.cpp
  39. $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS)) -o $@ $<)
  40. %.o: $(srcdir)/%.cpp
  41. $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS)) -o $@ $<)
  42. ## Dependency rules
  43. %.d: $(srcdir)/%.c
  44. $(call ICU_MSG,(deps)) $<
  45. @$(SHELL) -ec '$(GEN_DEPS.c) $< \
  46. | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
  47. [ -s $@ ] || rm -f $@'
  48. %.d: $(srcdir)/%.cpp
  49. $(call ICU_MSG,(deps)) $<
  50. @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
  51. | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
  52. [ -s $@ ] || rm -f $@'
  53. ## Versioned libraries rules
  54. %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
  55. $(RM) $@ && ln -s ${<F} $@
  56. %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
  57. $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
  58. ## Bind internal references
  59. # LDflags that pkgdata will use
  60. BIR_LDFLAGS= -Wl,-Bsymbolic
  61. # Dependencies [i.e. map files] for the final library
  62. BIR_DEPS=
  63. ## Remove shared library 's'
  64. STATIC_PREFIX_WHEN_USED =
  65. STATIC_PREFIX =
  66. ## End Linux-specific setup