Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

115 строки
2.9 KiB

  1. #
  2. # Define these variables from the beginning
  3. #
  4. CLEANFILES =
  5. SUFFIXES =
  6. EXTRA_DIST =
  7. #
  8. # Miscellaneous rules
  9. #
  10. lol_recursive_rule = \
  11. @if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \
  12. if test "$$subdir" != "."; then \
  13. ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $(patsubst %-recursive, %, $@)) || exit 1; \
  14. fi; done; fi
  15. bench: bench-recursive
  16. bench-recursive:
  17. $(lol_recursive_rule)
  18. lolcheck: lolcheck-recursive
  19. lolcheck-recursive:
  20. $(lol_recursive_rule)
  21. #
  22. # .lolfx build rule
  23. #
  24. lolfx_gen = $(lolfx_gen_$(V))
  25. lolfx_gen_ = $(lolfx_gen_$(AM_DEFAULT_VERBOSITY))
  26. lolfx_gen_0 = @echo " LOLFX " $@;
  27. SUFFIXES += .lolfx
  28. .lolfx.o:
  29. $(lolfx_gen)
  30. $(AM_V_at)(echo "char const *"; \
  31. echo "lolfx_resource_$(notdir $(basename $(filter %.lolfx, $^))) ="; \
  32. $(SED) 's/"/\\"/g' $(filter %.lolfx, $^) | $(SED) 's/\([^\r]*\).*/"\1\\n"/'; \
  33. echo ";") \
  34. > $@.lolfx.cpp && \
  35. $(CXXCOMPILE) -xc++ -c $@.lolfx.cpp -o $@ && \
  36. exit=0 || exit=1; rm -f $@.lolfx.cpp ; exit "$$exit"
  37. # Disable on the fly compilation because emscripten doesn't support it
  38. # | $(CXXCOMPILE) -xc++ -c - -o $@
  39. #
  40. # Win32 rules
  41. #
  42. # This is here in case we forget to make clean after a Windows build
  43. CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.exe) \
  44. $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
  45. #
  46. # Emscripten rules
  47. #
  48. CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.data) \
  49. $(noinst_PROGRAMS:%$(EXEEXT)=%.data)
  50. #
  51. # Android rules
  52. #
  53. all-local: all-local-android
  54. clean-local: clean-local-android
  55. if USE_ANDROID
  56. all-local-android: $(foreach p, $(PROGRAMS:%$(EXEEXT)=%), .$(p).androidstamp)
  57. .%.androidstamp: %$(EXEEXT)
  58. $(eval p := $(^:%$(EXEEXT)=%))
  59. $(eval d := .$(p).androiddir)
  60. rm -rf "$(d)"
  61. $(MKDIR_P) "$(d)" $(sort $(foreach f, $($(p)_DATA), "$(d)/assets/$(dir $(f))"))
  62. $(foreach f, $($(p)_DATA), $(LN_S) "$(abs_srcdir)/$(f)" "$(d)/assets/$(f)" &&) true
  63. $(SED) -e 's,@PROGRAM@,$(subst -,_,$(p)),' "$(top_srcdir)/build/android/AndroidManifest.xml" > "$(d)/AndroidManifest.xml"
  64. $(MKDIR_P) "$(d)/src/net/lolengine"
  65. $(SED) -e 's,@PROGRAM@,$(subst -,_,$(p)),' "$(top_srcdir)/build/android/LolActivity.java" > "$(d)/src/net/lolengine/LolActivity.java"
  66. $(MKDIR_P) "$(d)/res/values"
  67. $(SED) -e 's,@PROGRAM@,$(subst -,_,$(p)),' "$(top_srcdir)/build/android/strings.xml" > "$(d)/res/values/strings.xml"
  68. $(MKDIR_P) "$(d)/res/drawable"
  69. cp "$(top_srcdir)/build/android/icon.png" "$(d)/res/drawable/"
  70. $(MKDIR_P) "$(d)/libs/armeabi"
  71. $(LN_S) "$(abs_builddir)/$(p)$(EXEEXT)" "$(d)/libs/armeabi/lib$(p).so"
  72. $(LN_S) "$${ANDROID_NDK_ROOT}/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so" "$(d)/libs/armeabi"
  73. android update project -t android-19 -n "$(p)" -p "$(d)"
  74. ant debug -f "$(d)/build.xml"
  75. touch $@
  76. else
  77. all-local-android:
  78. endif
  79. clean-local-android:
  80. $(foreach p, $(PROGRAMS:%$(EXEEXT)=%), rm -rf ".$(p).androiddir";)
  81. $(foreach p, $(PROGRAMS:%$(EXEEXT)=%), rm -f ".$(p).androidstamp";)
  82. #
  83. # Additional rules
  84. #
  85. EXTRA_DIST += $(foreach p, $(PROGRAMS), $($(p)_DATA))
  86. .PHONY: bench lolcheck