Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

116 righe
3.0 KiB

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