mh-linux 2.4 KB

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