Super Mario 64 OpenGL port for PC. Mirror of https://github.com/sm64pc/sm64pc https://github.com/sm64pc/sm64pc
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.
 
 
 
 
 
 

249 lines
16 KiB

  1. # --------------------------------------
  2. # General Rules
  3. # --------------------------------------
  4. # obtain a list of segments from the *.c files in bin directory
  5. SEGMENTS := $(notdir $(basename $(wildcard bin/*.c))) $(addprefix $(VERSION)/,$(notdir $(basename $(wildcard bin/$(VERSION)/*.c)))) $(addsuffix _skybox,$(notdir $(basename $(wildcard textures/skyboxes/*.png))))
  6. ACTORS := $(filter %/,$(wildcard actors/*/))
  7. TEXTURE_DIRS := $(addprefix textures/,$(SEGMENTS)) $(ACTORS) textures/intro_raw
  8. # NOTE: textures assume naming convention "texture.<encoding>.png" generates "texture.<encoding>"
  9. ACTOR_GROUPS := \
  10. group0 \
  11. group1 \
  12. group2 \
  13. group3 \
  14. group4 \
  15. group5 \
  16. group6 \
  17. group7 \
  18. group8 \
  19. group9 \
  20. group10 \
  21. group11 \
  22. group12 \
  23. group13 \
  24. group14 \
  25. group15 \
  26. group16 \
  27. group17 \
  28. common0 \
  29. common1
  30. LEVEL_FILES := $(addsuffix leveldata,$(LEVEL_DIRS))
  31. MIO0_FILES := $(addprefix $(MIO0_DIR)/,$(addsuffix .mio0,$(SEGMENTS))) $(addprefix $(BUILD_DIR)/actors/,$(addsuffix .mio0,$(ACTOR_GROUPS))) $(addprefix $(BUILD_DIR)/levels/,$(addsuffix .mio0,$(LEVEL_FILES)))
  32. MIO0_OBJ_FILES := $(MIO0_FILES:.mio0=.mio0.o)
  33. SEGMENT_ELF_FILES := $(addprefix $(BUILD_DIR)/bin/,$(addsuffix .elf,$(SEGMENTS)))
  34. ACTOR_ELF_FILES := $(addprefix $(BUILD_DIR)/actors/,$(addsuffix .elf,$(ACTOR_GROUPS)))
  35. LEVEL_ELF_FILES := $(addprefix $(BUILD_DIR)/levels/,$(addsuffix .elf,$(LEVEL_FILES)))
  36. # --------------------------------------
  37. # Actor Rules
  38. # --------------------------------------
  39. # Actor Directories
  40. KOOPA_DIRS := koopa_flag poundable_pole koopa piranha_plant whomp chain_ball chain_chomp
  41. CAPSWITCH_DIRS := capswitch springboard
  42. CHILLYCHIEF_DIRS := chillychief moneybag
  43. BULLY_DIRS := bully blargg
  44. SPINDRIFT_DIRS := spindrift penguin snowman
  45. KING_BOBOMB_DIRS := king_bobomb water_bubble
  46. BOO_DIRS := bookend book chair small_key mad_piano boo haunted_cage
  47. MR_I_DIRS := mr_i_eyeball mr_i_iris swoop snufit dorrie scuttlebug
  48. HOOT_DIRS := yellow_sphere_small hoot yoshi_egg thwomp bullet_bill heave_ho
  49. COINS_DIRS := mist explosion butterfly coin warp_pipe door bowser_key flame blue_fish pebble leaves warp_collision mario_cap power_meter mushroom_1up star sand dirt transparent_star white_particle wooden_signpost tree
  50. BUBBA_DIRS := bubba wiggler wiggler_body_part lakitu_enemy spiny_egg spiny
  51. SKEETER_DIRS := skeeter seaweed water_mine cyan_fish bub water_ring treasure_chest
  52. KLEPTO_DIRS := klepto eyerok pokey tornado
  53. SEA_DIRS := clam_shell manta sushi unagi whirlpool
  54. AMP_DIRS := blue_coin_switch amp cannon_lid cannon_base cannon_barrel chuckya purple_switch checkerboard_platform heart flyguy breakable_box exclamation_box goomba bobomb metal_box exclamation_box_outline test_platform koopa_shell
  55. MOLE_DIRS := monty_mole_hole monty_mole smoke ukiki fwoosh
  56. LAKITU_DIRS := lakitu_cameraman toad mips boo_castle
  57. PEACH_DIRS := bird peach yoshi
  58. BOWSER_DIRS := bowser_flame impact_ring yellow_sphere bowser bomb impact_smoke
  59. MARIO_DIRS := mario bubble walk_smoke burn_smoke stomp_smoke water_wave sparkle water_splash white_particle_small sparkle_animation
  60. # Actor Files
  61. AMP_CHUCKYA_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(AMP_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  62. BOBOMBS_BUBBLE_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(KING_BOBOMB_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  63. BOO_BOOKEND_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(BOO_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  64. CAPSWITCH_SPRINGBOARD_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(CAPSWITCH_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  65. COINS_PIPE_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(COINS_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  66. BOWSER_FLAMES_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(BOWSER_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  67. BUBBA_WIGGLER_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(BUBBA_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  68. BULLY_BLARGG_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(BULLY_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  69. CHILLYCHIEF_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(CHILLYCHIEF_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  70. HOOT_THWOMP_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(HOOT_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  71. KOOPA_LOG_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(KOOPA_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  72. KLEPTO_EYEROK_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(KLEPTO_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  73. LAKITU_TOAD_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(LAKITU_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  74. MARIO_WATER_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(MARIO_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  75. MOLE_UKIKI_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(MOLE_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  76. MR_I_SWOOP_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(MR_I_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  77. PEACH_TOADSTOOL_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(PEACH_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  78. SEA_CREATURES_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(SEA_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  79. SKEETER_FISH_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(SKEETER_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  80. SPINDRIFT_PENGUIN_FILES := $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(SPINDRIFT_DIRS)),$(patsubst %.png,%.inc.c,$(wildcard $(dir)/*.png)))
  81. # Actor dependencies
  82. $(BUILD_DIR)/actors/group0.o: $(addprefix $(BUILD_DIR)/,$(MARIO_WATER_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(MARIO_DIRS)),$(wildcard $(dir)/*.c))
  83. $(BUILD_DIR)/actors/group1.o: $(addprefix $(BUILD_DIR)/,$(HOOT_THWOMP_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(HOOT_DIRS)),$(wildcard $(dir)/*.c))
  84. $(BUILD_DIR)/actors/group2.o: $(addprefix $(BUILD_DIR)/,$(BULLY_BLARGG_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(BULLY_DIRS)),$(wildcard $(dir)/*.c))
  85. $(BUILD_DIR)/actors/group3.o: $(addprefix $(BUILD_DIR)/,$(BOBOMBS_BUBBLE_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(KING_BOBOMB_DIRS)),$(wildcard $(dir)/*.c))
  86. $(BUILD_DIR)/actors/group4.o: $(addprefix $(BUILD_DIR)/,$(SEA_CREATURES_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(SEA_DIRS)),$(wildcard $(dir)/*.c))
  87. $(BUILD_DIR)/actors/group5.o: $(addprefix $(BUILD_DIR)/,$(KLEPTO_EYEROK_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(KLEPTO_DIRS)),$(wildcard $(dir)/*.c))
  88. $(BUILD_DIR)/actors/group6.o: $(addprefix $(BUILD_DIR)/,$(MOLE_UKIKI_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(MOLE_DIRS)),$(wildcard $(dir)/*.c))
  89. $(BUILD_DIR)/actors/group7.o: $(addprefix $(BUILD_DIR)/,$(SPINDRIFT_PENGUIN_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(SPINDRIFT_DIRS)),$(wildcard $(dir)/*.c))
  90. $(BUILD_DIR)/actors/group8.o: $(addprefix $(BUILD_DIR)/,$(CAPSWITCH_SPRINGBOARD_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(CAPSWITCH_DIRS)),$(wildcard $(dir)/*.c))
  91. $(BUILD_DIR)/actors/group9.o: $(addprefix $(BUILD_DIR)/,$(BOO_BOOKEND_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(BOO_DIRS)),$(wildcard $(dir)/*.c))
  92. $(BUILD_DIR)/actors/group10.o: $(addprefix $(BUILD_DIR)/,$(PEACH_TOADSTOOL_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(PEACH_DIRS)),$(wildcard $(dir)/*.c))
  93. $(BUILD_DIR)/actors/group11.o: $(addprefix $(BUILD_DIR)/,$(BUBBA_WIGGLER_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(BUBBA_DIRS)),$(wildcard $(dir)/*.c))
  94. $(BUILD_DIR)/actors/group12.o: $(addprefix $(BUILD_DIR)/,$(BOWSER_FLAMES_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(BOWSER_DIRS)),$(wildcard $(dir)/*.c))
  95. $(BUILD_DIR)/actors/group13.o: $(addprefix $(BUILD_DIR)/,$(SKEETER_FISH_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(SKEETER_DIRS)),$(wildcard $(dir)/*.c))
  96. $(BUILD_DIR)/actors/group14.o: $(addprefix $(BUILD_DIR)/,$(KOOPA_LOG_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(KOOPA_DIRS)),$(wildcard $(dir)/*.c))
  97. $(BUILD_DIR)/actors/group15.o: $(addprefix $(BUILD_DIR)/,$(LAKITU_TOAD_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(LAKITU_DIRS)),$(wildcard $(dir)/*.c))
  98. $(BUILD_DIR)/actors/group16.o: $(addprefix $(BUILD_DIR)/,$(CHILLYCHIEF_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(CHILLYCHIEF_DIRS)),$(wildcard $(dir)/*.c))
  99. $(BUILD_DIR)/actors/group17.o: $(addprefix $(BUILD_DIR)/,$(MR_I_SWOOP_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(MR_I_DIRS)),$(wildcard $(dir)/*.c))
  100. $(BUILD_DIR)/actors/common0.o: $(addprefix $(BUILD_DIR)/,$(AMP_CHUCKYA_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(AMP_DIRS)),$(wildcard $(dir)/*.c))
  101. $(BUILD_DIR)/actors/common1.o: $(addprefix $(BUILD_DIR)/,$(COINS_PIPE_FILES)) $(foreach dir,$(addprefix $(ACTOR_DIR)/,$(COINS_DIRS)),$(wildcard $(dir)/*.c))
  102. # Actor Elf Files
  103. $(BUILD_DIR)/actors/group0.elf: SEGMENT_ADDRESS := 0x04000000
  104. $(BUILD_DIR)/actors/group1.elf: SEGMENT_ADDRESS := 0x05000000
  105. $(BUILD_DIR)/actors/group2.elf: SEGMENT_ADDRESS := 0x05000000
  106. $(BUILD_DIR)/actors/group3.elf: SEGMENT_ADDRESS := 0x05000000
  107. $(BUILD_DIR)/actors/group4.elf: SEGMENT_ADDRESS := 0x05000000
  108. $(BUILD_DIR)/actors/group5.elf: SEGMENT_ADDRESS := 0x05000000
  109. $(BUILD_DIR)/actors/group6.elf: SEGMENT_ADDRESS := 0x05000000
  110. $(BUILD_DIR)/actors/group7.elf: SEGMENT_ADDRESS := 0x05000000
  111. $(BUILD_DIR)/actors/group8.elf: SEGMENT_ADDRESS := 0x05000000
  112. $(BUILD_DIR)/actors/group9.elf: SEGMENT_ADDRESS := 0x05000000
  113. $(BUILD_DIR)/actors/group10.elf: SEGMENT_ADDRESS := 0x05000000
  114. $(BUILD_DIR)/actors/group11.elf: SEGMENT_ADDRESS := 0x05000000
  115. $(BUILD_DIR)/actors/group12.elf: SEGMENT_ADDRESS := 0x06000000
  116. $(BUILD_DIR)/actors/group13.elf: SEGMENT_ADDRESS := 0x06000000
  117. $(BUILD_DIR)/actors/group14.elf: SEGMENT_ADDRESS := 0x06000000
  118. $(BUILD_DIR)/actors/group15.elf: SEGMENT_ADDRESS := 0x06000000
  119. $(BUILD_DIR)/actors/group16.elf: SEGMENT_ADDRESS := 0x06000000
  120. $(BUILD_DIR)/actors/group17.elf: SEGMENT_ADDRESS := 0x06000000
  121. $(BUILD_DIR)/actors/common0.elf: SEGMENT_ADDRESS := 0x08000000
  122. $(BUILD_DIR)/actors/common1.elf: SEGMENT_ADDRESS := 0x03000000
  123. # --------------------------------------
  124. # Level Rules
  125. # --------------------------------------
  126. $(BUILD_DIR)/levels/%/leveldata.elf: SEGMENT_ADDRESS := 0x07000000
  127. # TODO: Generate these rules from the level configs?
  128. define level_rules =
  129. $(1)_SEG7_FILES := $$(patsubst %.png,%.inc.c,$$(wildcard levels/$(1)/*.png))
  130. $$(BUILD_DIR)/levels/$(1)/leveldata.o: $$(addprefix $$(BUILD_DIR)/,$$($(1)_SEG7_FILES))
  131. $$(BUILD_DIR)/levels/$(1)/leveldata.elf: TEXTURE_BIN := $(2)
  132. endef
  133. ifneq ($(MAKECMDGOALS),clean)
  134. ifneq ($(MAKECMDGOALS),distclean)
  135. $(BUILD_DIR)/level_rules.mk: levels/level_rules.mk levels/level_defines.h
  136. $(CPP) $(VERSION_CFLAGS) -I . -o $@ $<
  137. include $(BUILD_DIR)/level_rules.mk
  138. endif
  139. endif
  140. # --------------------------------------
  141. # Extra Level Rules
  142. # --------------------------------------
  143. $(eval $(call level_rules,intro,generic)) # Intro (Super Mario 64 Logo)
  144. $(eval $(call level_rules,menu,generic)) # Menu (File Select)
  145. # --------------------------------------
  146. # Cake Texture Rules
  147. # --------------------------------------
  148. # Ending cake textures are generated in a special way
  149. $(BUILD_DIR)/levels/ending/cake_eu.inc.c: levels/ending/cake_eu.png
  150. $(SKYCONV) --type cake-eu --split $^ $(BUILD_DIR)/levels/ending
  151. $(BUILD_DIR)/levels/ending/cake.inc.c: levels/ending/cake.png
  152. $(SKYCONV) --type cake --split $^ $(BUILD_DIR)/levels/ending
  153. # --------------------------------------
  154. # Texture Bin Rules
  155. # --------------------------------------
  156. # Others
  157. SEGMENT2_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/segment2/*.png))
  158. TITLE_SCREEN_BG_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/title_screen_bg/*.png))
  159. SPOOKY_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/spooky/*.png))
  160. GENERIC_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/generic/*.png))
  161. OUTSIDE_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/outside/*.png))
  162. SNOW_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/snow/*.png))
  163. EFFECT_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/effect/*.png))
  164. CAVE_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/cave/*.png))
  165. INSIDE_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/inside/*.png))
  166. WATER_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/water/*.png))
  167. FIRE_TEXTURES_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/fire/*.png))
  168. SKY_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/sky/*.png))
  169. MACHINE_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/machine/*.png))
  170. MOUNTAIN_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/mountain/*.png))
  171. GRASS_FILES := $(patsubst %.png,%.inc.c,$(wildcard $(TEXTURE_DIR)/grass/*.png))
  172. # Texture Files
  173. $(BUILD_DIR)/bin/segment2.o: $(addprefix $(BUILD_DIR)/,$(SEGMENT2_FILES))
  174. $(BUILD_DIR)/bin/title_screen_bg.o: $(addprefix $(BUILD_DIR)/,$(TITLE_SCREEN_BG_FILES))
  175. $(BUILD_DIR)/bin/spooky.o: $(addprefix $(BUILD_DIR)/,$(SPOOKY_FILES))
  176. $(BUILD_DIR)/bin/generic.o: $(addprefix $(BUILD_DIR)/,$(GENERIC_FILES))
  177. $(BUILD_DIR)/bin/outside.o: $(addprefix $(BUILD_DIR)/,$(OUTSIDE_FILES))
  178. $(BUILD_DIR)/bin/snow.o: $(addprefix $(BUILD_DIR)/,$(SNOW_FILES))
  179. $(BUILD_DIR)/bin/effect.o: $(addprefix $(BUILD_DIR)/,$(EFFECT_FILES))
  180. $(BUILD_DIR)/bin/cave.o: $(addprefix $(BUILD_DIR)/,$(CAVE_FILES))
  181. $(BUILD_DIR)/bin/inside.o: $(addprefix $(BUILD_DIR)/,$(INSIDE_FILES))
  182. $(BUILD_DIR)/bin/water.o: $(addprefix $(BUILD_DIR)/,$(WATER_FILES))
  183. $(BUILD_DIR)/bin/fire.o: $(addprefix $(BUILD_DIR)/,$(FIRE_TEXTURES_FILES))
  184. $(BUILD_DIR)/bin/sky.o: $(addprefix $(BUILD_DIR)/,$(SKY_FILES))
  185. $(BUILD_DIR)/bin/machine.o: $(addprefix $(BUILD_DIR)/,$(MACHINE_FILES))
  186. $(BUILD_DIR)/bin/mountain.o: $(addprefix $(BUILD_DIR)/,$(MOUNTAIN_FILES))
  187. $(BUILD_DIR)/bin/grass.o: $(addprefix $(BUILD_DIR)/,$(GRASS_FILES))
  188. # Others
  189. $(BUILD_DIR)/bin/segment2.elf: SEGMENT_ADDRESS := 0x02000000
  190. $(BUILD_DIR)/bin/title_screen_bg.elf: SEGMENT_ADDRESS := 0x0A000000
  191. $(BUILD_DIR)/bin/debug_level_select.elf: SEGMENT_ADDRESS := 0x07000000
  192. $(BUILD_DIR)/bin/effect.elf: SEGMENT_ADDRESS := 0x0B000000
  193. $(BUILD_DIR)/bin/spooky.elf: SEGMENT_ADDRESS := 0x09000000
  194. $(BUILD_DIR)/bin/generic.elf: SEGMENT_ADDRESS := 0x09000000
  195. $(BUILD_DIR)/bin/outside.elf: SEGMENT_ADDRESS := 0x09000000
  196. $(BUILD_DIR)/bin/snow.elf: SEGMENT_ADDRESS := 0x09000000
  197. $(BUILD_DIR)/bin/cave.elf: SEGMENT_ADDRESS := 0x09000000
  198. $(BUILD_DIR)/bin/inside.elf: SEGMENT_ADDRESS := 0x09000000
  199. $(BUILD_DIR)/bin/water.elf: SEGMENT_ADDRESS := 0x09000000
  200. $(BUILD_DIR)/bin/fire.elf: SEGMENT_ADDRESS := 0x09000000
  201. $(BUILD_DIR)/bin/sky.elf: SEGMENT_ADDRESS := 0x09000000
  202. $(BUILD_DIR)/bin/machine.elf: SEGMENT_ADDRESS := 0x09000000
  203. $(BUILD_DIR)/bin/mountain.elf: SEGMENT_ADDRESS := 0x09000000
  204. $(BUILD_DIR)/bin/grass.elf: SEGMENT_ADDRESS := 0x09000000
  205. # EU segment 19 translations
  206. $(BUILD_DIR)/bin/eu/translation_de.elf: SEGMENT_ADDRESS := 0x19000000
  207. $(BUILD_DIR)/bin/eu/translation_en.elf: SEGMENT_ADDRESS := 0x19000000
  208. $(BUILD_DIR)/bin/eu/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000
  209. # --------------------------------------
  210. # Skybox Rules
  211. # --------------------------------------
  212. $(BUILD_DIR)/bin/%_skybox.c: textures/skyboxes/%.png
  213. $(SKYCONV) --type sky --split $^ $(BUILD_DIR)/bin
  214. $(BUILD_DIR)/bin/%_skybox.elf: SEGMENT_ADDRESS := 0x0A000000
  215. # --------------------------------------
  216. # Misc Rules
  217. # --------------------------------------
  218. # intro_raw textures are not compressed
  219. INTRO_RAW_FILES := $(wildcard $(TEXTURE_DIR)/intro_raw/*.png)
  220. $(BUILD_DIR)/src/goddard/renderer.o: $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%.inc.c,$(INTRO_RAW_FILES)))