25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

109 lines
2.6 KiB

  1. #
  2. # Define these variables from the beginning
  3. #
  4. CLEANFILES =
  5. SUFFIXES =
  6. #
  7. # Miscellaneous rules
  8. #
  9. lol_recursive_rule = \
  10. @if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \
  11. ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $(patsubst %-recursive, %, $@)) || exit 1; \
  12. done; fi
  13. bench: bench-recursive
  14. bench-recursive:
  15. $(lol_recursive_rule)
  16. lolcheck: lolcheck-recursive
  17. lolcheck-recursive:
  18. $(lol_recursive_rule)
  19. #
  20. # Flex and Bison files build rule
  21. #
  22. generated: generated-recursive
  23. generated-recursive:
  24. $(lol_recursive_rule)
  25. @if test -n "$(filter %-scanner.l, $(EXTRA_DIST))"; then \
  26. echo $(MKDIR_P) generated; \
  27. $(MKDIR_P) generated; \
  28. rm -f generated/[a-zA-Z]*; \
  29. for scanner in $(patsubst %-scanner.l, %, $(filter %-scanner.l, $(EXTRA_DIST))); do \
  30. b="`basename $$scanner`"; \
  31. echo flex -v -o "generated/$$b-scanner.cpp" "$$scanner-scanner.l"; \
  32. flex -v -o "generated/$$b-scanner.cpp" "$$scanner-scanner.l" || exit 1; \
  33. done; \
  34. for parser in $(patsubst %-parser.y, %, $(filter %-parser.y, $(EXTRA_DIST))); do \
  35. b="`basename $$parser`"; \
  36. echo bison -o "generated/$$b-parser.cpp" --defines="generated/$$b-parser.h" -d -b "generated/$$b" "$$parser-parser.y"; \
  37. bison -o "generated/$$b-parser.cpp" --defines="generated/$$b-parser.h" -d -b "generated/$$b" "$$parser-parser.y" || exit 1; \
  38. done; \
  39. fi
  40. #
  41. # .lolfx build rule
  42. #
  43. lolfx_gen = $(lolfx_gen_$(V))
  44. lolfx_gen_ = $(lolfx_gen_$(AM_DEFAULT_VERBOSITY))
  45. lolfx_gen_0 = @echo " LOLFX " $@;
  46. SUFFIXES += .lolfx
  47. .lolfx.o:
  48. $(lolfx_gen)
  49. $(AM_V_at)(echo "char const *"; \
  50. echo "lolfx_resource_$(notdir $(basename $(filter %.lolfx, $^))) ="; \
  51. $(SED) 's/"/\\"/g' $(filter %.lolfx, $^) | $(SED) 's/\([^\r]*\).*/"\1\\n"/'; \
  52. echo ";") \
  53. | $(CXXCOMPILE) -xc++ -c - -o $@
  54. #
  55. # PS3 fself support rules
  56. #
  57. fself_gen = $(fself_gen_$(V))
  58. fself_gen_ = $(fself_gen_$(AM_DEFAULT_VERBOSITY))
  59. fself_gen_0 = echo " FSELF " $${x}.self;
  60. fself_gen_1 = echo make_fself $${x}$(EXEEXT) $${x}.self;
  61. all-local: all-local-ps3
  62. all-local-ps3: $(PROGRAMS) $(noinst_PROGRAMS)
  63. @if test -n "$^"; then for x in $(^:%$(EXEEXT)=%); do \
  64. if test x$(MAKE_FSELF) != xno; then \
  65. $(fself_gen) \
  66. make_fself $${x}$(EXEEXT) $${x}.self; \
  67. fi; \
  68. done; fi
  69. CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.self) \
  70. $(PROGRAMS:%$(EXEEXT)=%.elf) \
  71. $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
  72. $(noinst_PROGRAMS:%$(EXEEXT)=%.elf)
  73. #
  74. # Win32 rules
  75. #
  76. # This is here in case we forget to make clean after a Windows build
  77. CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.exe) \
  78. $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
  79. #
  80. # Additional rules
  81. #
  82. .PHONY: bench lolcheck generated