Jeu de FPS en multijoueur. Voir la description sur planete casio
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

150 lines
3.5KB

  1. #! /usr/bin/make -f
  2. # Default Makefile for fxSDK add-ins. This file was probably copied there by
  3. # the [fxsdk] program.
  4. #---
  5. #
  6. # Configuration
  7. #
  8. include project.cfg
  9. # Compiler flags
  10. cf := -mb -ffreestanding -nostdlib -Wall -Wextra \
  11. -fstrict-volatile-bitfields $(CFLAGS)
  12. cf-fx := $(cf) -m3 -DFX9860G
  13. cf-cg := $(cf) -m4-nofpu -DFXCG50
  14. # Linker flags
  15. lf-fx := -Tfx9860g.ld -lgint-fx $(LDFLAGS) -lgcc -Wl,-Map=build-fx/map
  16. lf-cg := -Tfxcg50.ld -lgint-cg $(LDFLAGS) -lgcc -Wl,-Map=build-cg/map
  17. dflags = -MMD -MT $@ -MF $(@:.o=.d) -MP
  18. cpflags := -R .bss -R .gint_bss
  19. g1af := -i "$(ICON_FX)" -n "$(NAME)" --internal="$(INTERNAL)"
  20. g3af := -n basic:"$(NAME)" -i uns:"$(ICON_CG_UNS)" -i sel:"$(ICON_CG_SEL)"
  21. #
  22. # File listings
  23. #
  24. null :=
  25. filename := $(subst $(null) $(null),-,$(NAME))
  26. elf = $(dir $<)$(filename).elf
  27. bin = $(dir $<)$(filename).bin
  28. target-fx := $(filename).g1a
  29. target-cg := $(filename).g3a
  30. # Source files
  31. src := $(wildcard src/*.[csS] src/*/*.[csS] src/*/*/*.[csS] \
  32. src/*/*/*/*.[csS])
  33. assets-fx := $(wildcard assets-fx/*/*)
  34. assets-cg := $(wildcard assets-cg/*/*)
  35. # Object files
  36. obj-fx := $(src:%.c=build-fx/%.o) $(assets-fx:assets-fx/%=build-fx/assets/%.o)
  37. obj-cg := $(src:%.c=build-cg/%.o) $(assets-cg:assets-cg/%=build-cg/assets/%.o)
  38. # Additional dependencies
  39. deps-fx := $(ICON_FX)
  40. deps-cg := $(ICON_CG_UNS) $(ICON_CG_SEL)
  41. # All targets
  42. all :=
  43. ifneq "$(wildcard build-fx)" ""
  44. all += all-fx
  45. endif
  46. ifneq "$(wildcard build-cg)" ""
  47. all += all-cg
  48. endif
  49. #
  50. # Build rules
  51. #
  52. all: $(all)
  53. all-fx: $(target-fx)
  54. all-cg: $(target-cg)
  55. $(target-fx): $(obj-fx) $(deps-fx)
  56. sh3eb-elf-gcc -o $(elf) $(obj-fx) $(cf-fx) $(lf-fx)
  57. sh3eb-elf-objcopy -O binary $(cpflags) $(elf) $(bin)
  58. fxg1a $(bin) -o $@ $(g1af)
  59. $(target-cg): $(obj-cg) $(deps-cg)
  60. sh4eb-elf-gcc -o $(elf) $(obj-cg) $(cf-cg) $(lf-cg)
  61. sh4eb-elf-objcopy -O binary $(cpflags) $(elf) $(bin)
  62. mkg3a $(g3af) $(bin) $@
  63. # C sources
  64. build-fx/%.o: %.c
  65. @ mkdir -p $(dir $@)
  66. sh3eb-elf-gcc -c $< -o $@ $(cf-fx) $(dflags)
  67. build-cg/%.o: %.c
  68. @ mkdir -p $(dir $@)
  69. sh4eb-elf-gcc -c $< -o $@ $(cf-cg) $(dflags)
  70. # Assembler sources
  71. build-fx/%.o: %.s
  72. @ mkdir -p $(dir $@)
  73. sh3eb-elf-gcc -c $< -o $@
  74. build-fx/%.o: %.S
  75. @ mkdir -p $(dir $@)
  76. sh3eb-elf-gcc -c $< -o $@ $(sflags)
  77. build-cg/%.o: %.s
  78. @ mkdir -p $(dir $@)
  79. sh4eb-elf-gcc -c $< -o $@
  80. build-cg/%.o: %.S
  81. @ mkdir -p $(dir $@)
  82. sh4eb-elf-gcc -c $< -o $@ $(sflags)
  83. # Images
  84. build-fx/assets/img/%.o: assets-fx/img/%
  85. @ mkdir -p $(dir $@)
  86. fxconv -i $< -o $@ --fx name:img_$(basename $*)
  87. build-cg/assets/img/%.o: assets-cg/img/%
  88. @ mkdir -p $(dir $@)
  89. fxconv -i $< -o $@ --cg name:img_$(basename $*)
  90. # Fonts
  91. build-fx/assets/fonts/%.o: assets-fx/fonts/%
  92. @ mkdir -p $(dir $@)
  93. fxconv -f $< -o $@ name:font_$(basename $*) $(FONT.$*)
  94. build-cg/assets/fonts/%.o: assets-cg/fonts/%
  95. @ mkdir -p $(dir $@)
  96. fxconv -f $< -o $@ name:font_$(basename $*) $(FONT.$*)
  97. #
  98. # Cleaning and utilities
  99. #
  100. # Dependency information
  101. -include $(shell find build* -name *.d 2> /dev/null)
  102. build-fx/%.d: ;
  103. build-cg/%.d: ;
  104. .PRECIOUS: build-fx build-cg build-fx/%.d build-cg/%.d %/
  105. clean:
  106. @ rm -rf build*
  107. distclean: clean
  108. @ rm -f $(target-fx) $(target-cg)
  109. install-fx: $(target-fx)
  110. p7 send -f $<
  111. install-cg: $(target-cg)
  112. @ while [[ ! -h /dev/Prizm1 ]]; do sleep 0.25; done
  113. @ while ! mount /dev/Prizm1; do sleep 0.25; done
  114. @ rm -f /mnt/prizm/$<
  115. @ cp $< /mnt/prizm
  116. @ umount /dev/Prizm1
  117. @- eject /dev/Prizm1
  118. .PHONY: all all-fx all-cg clean distclean install-fx install-cg