Make-lang.in 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. # Top level -*- makefile -*- fragment for GNU Objective-C++
  2. # Copyright (C) 2005-2015 Free Software Foundation, Inc.
  3. # Contributed by Ziemowit Laski <zlaski@apple.com>
  4. #This file is part of GCC.
  5. #GCC is free software; you can redistribute it and/or modify
  6. #it under the terms of the GNU General Public License as published by
  7. #the Free Software Foundation; either version 3, or (at your option)
  8. #any later version.
  9. #GCC is distributed in the hope that it will be useful,
  10. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. #GNU General Public License for more details.
  13. #You should have received a copy of the GNU General Public License
  14. #along with GCC; see the file COPYING3. If not see
  15. #<http://www.gnu.org/licenses/>.
  16. # This file provides the language dependent support in the main Makefile.
  17. # Each language makefile fragment must provide the following targets:
  18. #
  19. # foo.all.cross, foo.start.encap, foo.rest.encap,
  20. # foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
  21. # foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
  22. # foo.mostlyclean, foo.clean, foo.distclean,
  23. # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
  24. #
  25. # where `foo' is the name of the language.
  26. #
  27. # It should also provide rules for:
  28. #
  29. # - making any compiler driver (eg: g++)
  30. # - the compiler proper (eg: cc1plus)
  31. # - define the names for selecting the language in LANGUAGES.
  32. #
  33. # Define the names for selecting Objective-C++ in LANGUAGES.
  34. obj-c++: cc1objplus$(exeext)
  35. # Tell GNU make to ignore these if they exist.
  36. .PHONY: obj-c++
  37. # Use maximal warnings for this front end. Also, make ObjC and C++
  38. # headers accessible.
  39. objcp-warn = $(STRICT_WARN) -DOBJCPLUS -I$(srcdir)/objc -I$(srcdir)/cp
  40. # Language-specific object files for Objective C++.
  41. OBJCXX_OBJS = objcp/objcp-act.o objcp/objcp-lang.o objcp/objcp-decl.o \
  42. objcp/objc-runtime-shared-support.o \
  43. objcp/objc-gnu-runtime-abi-01.o \
  44. objcp/objc-next-runtime-abi-01.o \
  45. objcp/objc-next-runtime-abi-02.o \
  46. objcp/objc-encoding.o \
  47. objcp/objc-map.o \
  48. $(CXX_AND_OBJCXX_OBJS)
  49. obj-c++_OBJS = $(OBJCXX_OBJS) cc1objplus-checksum.o
  50. cc1objplus-checksum.c : build/genchecksum$(build_exeext) checksum-options \
  51. $(OBJCXX_OBJS) $(BACKEND) $(LIBDEPS)
  52. build/genchecksum$(build_exeext) $(OBJCXX_OBJS) $(BACKEND) \
  53. $(LIBDEPS) checksum-options > cc1objplus-checksum.c.tmp && \
  54. $(srcdir)/../move-if-change cc1objplus-checksum.c.tmp \
  55. cc1objplus-checksum.c
  56. cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS)
  57. +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
  58. $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
  59. # Objective C++ language specific files.
  60. objcp/objc-runtime-shared-support.o: objc/objc-runtime-shared-support.c
  61. $(COMPILE) $<
  62. $(POSTCOMPILE)
  63. objcp/objc-gnu-runtime-abi-01.o: objc/objc-gnu-runtime-abi-01.c
  64. $(COMPILE) $<
  65. $(POSTCOMPILE)
  66. objcp/objc-next-runtime-abi-01.o: objc/objc-next-runtime-abi-01.c
  67. $(COMPILE) $<
  68. $(POSTCOMPILE)
  69. objcp/objc-next-runtime-abi-02.o: objc/objc-next-runtime-abi-02.c
  70. $(COMPILE) $<
  71. $(POSTCOMPILE)
  72. objcp/objcp-act.o: objc/objc-act.c
  73. $(COMPILE) $<
  74. $(POSTCOMPILE)
  75. objcp/objc-encoding.o: objc/objc-encoding.c
  76. $(COMPILE) $<
  77. $(POSTCOMPILE)
  78. objcp/objc-map.o: objc/objc-map.c
  79. $(COMPILE) $<
  80. $(POSTCOMPILE)
  81. po-generated:
  82. #
  83. # Build hooks:
  84. obj-c++.all.cross:
  85. obj-c++.start.encap:
  86. obj-c++.rest.encap:
  87. obj-c++.info:
  88. obj-c++.install-info:
  89. obj-c++.dvi:
  90. obj-c++.pdf:
  91. obj-c++.install-pdf:
  92. obj-c++.html:
  93. obj-c++.install-html:
  94. obj-c++.srcinfo:
  95. obj-c++.srcextra:
  96. obj-c++.man:
  97. obj-c++.install-plugin:
  98. obj-c++.tags: force
  99. cd $(srcdir)/objcp; etags -o TAGS.sub *.c *.h; \
  100. etags --include TAGS.sub --include ../TAGS.sub
  101. lang_checks += check-obj-c++
  102. #
  103. # Install hooks:
  104. # cc1objplus is installed elsewhere as part of $(COMPILERS).
  105. obj-c++.install-common:
  106. obj-c++.install-man:
  107. obj-c++.uninstall:
  108. #
  109. # Clean hooks:
  110. # A lot of the ancillary files are deleted by the main makefile.
  111. # We just have to delete files specific to us.
  112. obj-c++.mostlyclean:
  113. -rm -f objcp/*$(objext)
  114. -rm -f objcp/*$(coverageexts)
  115. obj-c++.clean: obj-c++.mostlyclean
  116. obj-c++.distclean:
  117. -rm -f objcp/config.status objcp/Makefile
  118. obj-c++.maintainer-clean:
  119. #
  120. # Stage hooks:
  121. obj-c++.stage1: stage1-start
  122. -mv objcp/*$(objext) stage1/objcp
  123. obj-c++.stage2: stage2-start
  124. -mv objcp/*$(objext) stage2/objcp
  125. obj-c++.stage3: stage3-start
  126. -mv objcp/*$(objext) stage3/objcp
  127. obj-c++.stage4: stage4-start
  128. -mv objcp/*$(objext) stage4/objcp
  129. obj-c++.stageprofile: stageprofile-start
  130. -mv objcp/*$(objext) stageprofile/objcp
  131. obj-c++.stagefeedback: stagefeedback-start
  132. -mv objcp/*$(objext) stagefeedback/objcp