Browse Source

sync and renice makefile colors

Michael Panzlaff 6 years ago
parent
commit
69674da6af
3 changed files with 39 additions and 39 deletions
  1. 1
    1
      g3headers
  2. 21
    21
      makefile
  3. 17
    17
      sprites.makefile

+ 1
- 1
g3headers

1
-Subproject commit 96f9db527ac23ab26be5614c2aeda2b1e3e5c7ab
1
+Subproject commit a2e68703dcfccb4ef2319f8fd79a8ea7803a63c7

+ 21
- 21
makefile View File

95
 ALL_OBJ     := $(GEN_OBJ) $(C_OBJ) $(ASM_OBJ) $(DATA_OBJ) $(STRING_OBJ) $(SCRIPT_OBJ) $(MAP_PROJ_O) $(MAP_FILES_O) $(TS_FILES_O) $(TS_GEN_O)
95
 ALL_OBJ     := $(GEN_OBJ) $(C_OBJ) $(ASM_OBJ) $(DATA_OBJ) $(STRING_OBJ) $(SCRIPT_OBJ) $(MAP_PROJ_O) $(MAP_FILES_O) $(TS_FILES_O) $(TS_GEN_O)
96
 
96
 
97
 $(MAPMAPS)/%.s: $(MAPMAPS)/%.pmh
97
 $(MAPMAPS)/%.s: $(MAPMAPS)/%.pmh
98
-	@echo "\033[96mGenerating map $<\033[0m"
98
+	@printf "\e[1;33mGenerating map\e[0m $<\n"
99
 	$(PYMAPS) -o $@ $<
99
 	$(PYMAPS) -o $@ $<
100
 
100
 
101
 $(MAPTS)/%.s: $(MAPTS)/%.pts
101
 $(MAPTS)/%.s: $(MAPTS)/%.pts
102
-	@echo "\033[94mGenerating tileset $<\033[0m"
102
+	@printf "\e[1;33mGenerating tileset\e[0m $<\n"
103
 	$(PYSETS) -o $@ $<
103
 	$(PYSETS) -o $@ $<
104
 
104
 
105
 $(STRINGDIR)/%.s: $(STRINGDIR)/%.txt
105
 $(STRINGDIR)/%.s: $(STRINGDIR)/%.txt
106
-	@echo "\033[93mGenerating strings $<\033[0m"
106
+	@printf "\e[1;36mGenerating strings\e[0m $<\n"
107
 	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
107
 	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
108
 
108
 
109
 $(BLDPATH)/%.o: %.c $(ASSETS) $(PAGB_INCLUDE)/pokeagb/pokeagb.h
109
 $(BLDPATH)/%.o: %.c $(ASSETS) $(PAGB_INCLUDE)/pokeagb/pokeagb.h
110
-	@echo "\033[32mCompiling $<\033[0m"		
110
+	@printf "\e[1;31mCompiling\e[0m $<\n"
111
 	$(shell mkdir -p $(dir $@))		
111
 	$(shell mkdir -p $(dir $@))		
112
 	$(CC) $(CFLAGS) -c $< -o $@		
112
 	$(CC) $(CFLAGS) -c $< -o $@		
113
 		
113
 		
114
 $(BLDPATH)/%.o: %.s $(PAGB_INCLUDE)/pokeagb/pokeagb.h
114
 $(BLDPATH)/%.o: %.s $(PAGB_INCLUDE)/pokeagb/pokeagb.h
115
-	@echo "\033[32mAssembling $<\033[0m"		
116
-	$(shell mkdir -p $(dir $@))		
117
-	$(PREPROC) $< $(CHARMAP) > $*.i		
115
+	@printf "\e[1;31mAssembling\e[0m $<\n"
116
+	$(shell mkdir -p $(dir $@))
117
+	$(PREPROC) $< $(CHARMAP) > $*.i
118
 	$(CC) $(CFLAGS) -c -x assembler-with-cpp $*.i -o $@		
118
 	$(CC) $(CFLAGS) -c -x assembler-with-cpp $*.i -o $@		
119
 	@rm -f $*.i
119
 	@rm -f $*.i
120
 
120
 
121
 $(MAPTS)/%.s: $(MAPTS)/%.png
121
 $(MAPTS)/%.s: $(MAPTS)/%.png
122
-	@echo "\033[34mProcessing image (tileset) $<\033[0m"
122
+	@printf "\e[1;33mProcessing image (tileset)\e[0m $<\n"
123
 	$(GRIT) $< -o $@ -fts -gzl -pz! -pu16 -gB4 -m! -mR!
123
 	$(GRIT) $< -o $@ -fts -gzl -pz! -pu16 -gB4 -m! -mR!
124
 
124
 
125
 generated_image/%.c generated_image/%.h: $(AUTO_ASSET_ROOT)/%.png $(AUTO_ASSET_ROOT)/%.grit
125
 generated_image/%.c generated_image/%.h: $(AUTO_ASSET_ROOT)/%.png $(AUTO_ASSET_ROOT)/%.grit
126
-	@echo "\033[34mProcessing image $<\033[0m"
126
+	@printf "\e[1;33mProcessing image\e[0m $<\n"
127
 	$(shell mkdir -p $(dir $@))
127
 	$(shell mkdir -p $(dir $@))
128
 	$(GRIT) $< -o $@ -ftc -ff $(<:%.png=%.grit)
128
 	$(GRIT) $< -o $@ -ftc -ff $(<:%.png=%.grit)
129
 
129
 
130
 generated_image/%.c generated_image/%.h: $(AUTO_ASSET_ROOT)/%.png
130
 generated_image/%.c generated_image/%.h: $(AUTO_ASSET_ROOT)/%.png
131
-	@echo "\033[34mProcessing image $< (using directory grit file)\033[0m"
131
+	@printf "\e[1;33mProcessing image (using directory grit file)\e[0m $<\n"
132
 	$(shell mkdir -p $(dir $@))
132
 	$(shell mkdir -p $(dir $@))
133
 	$(GRIT) $< -o $@ -ftc -ff $(<D)/$(notdir $(<D)).grit
133
 	$(GRIT) $< -o $@ -ftc -ff $(<D)/$(notdir $(<D)).grit
134
 
134
 
136
 
136
 
137
 .PHONY: rom
137
 .PHONY: rom
138
 rom: main.asm $(MAIN_OBJ)
138
 rom: main.asm $(MAIN_OBJ)
139
-	@echo "\033[1;32mCreating ROM\033[0m"
139
+	@printf "\e[1;30;41mCreating ROM\e[0m\n"
140
 	$(ARS) $<
140
 	$(ARS) $<
141
 	$(NM) $(BLDPATH)/linked.o -n -g --defined-only | \
141
 	$(NM) $(BLDPATH)/linked.o -n -g --defined-only | \
142
 		sed -e '{s/^/0x/g};{/.*\sA\s.*/d};{s/\sT\s/ /g}' > $(OUTPATH)/__symbols.sym
142
 		sed -e '{s/^/0x/g};{/.*\sA\s.*/d};{s/\sT\s/ /g}' > $(OUTPATH)/__symbols.sym
145
 	
145
 	
146
 $(MAIN_OBJ): $(ALL_OBJ) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) #$(B_ENGINE)
146
 $(MAIN_OBJ): $(ALL_OBJ) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) #$(B_ENGINE)
147
 	$(MAKE) -f assets.makefile
147
 	$(MAKE) -f assets.makefile
148
-	@echo "\033[1;32mLinking ELF binary $@\033[0m"
148
+	@printf "\e[1;30;41mLinking ELF binary\e[0m $@\n"
149
 	@echo "INPUT($^)" > $(TMP_LD)
149
 	@echo "INPUT($^)" > $(TMP_LD)
150
 	$(LD) $(LDFLAGS) -T $(PAGB_LINK) -T linker.ld -T bpre.sym --whole-archive -r -o $@ --start-group -T $(TMP_LD) --end-group
150
 	$(LD) $(LDFLAGS) -T $(PAGB_LINK) -T linker.ld -T bpre.sym --whole-archive -r -o $@ --start-group -T $(TMP_LD) --end-group
151
 	$(LD) $(LDFLAGS) -T $(PAGB_LINK) -T linker.ld -T bpre.sym --whole-archive -o $@.dbg --start-group -T $(TMP_LD) --end-group
151
 	$(LD) $(LDFLAGS) -T $(PAGB_LINK) -T linker.ld -T bpre.sym --whole-archive -o $@.dbg --start-group -T $(TMP_LD) --end-group
153
 	@rm -f $(TMP_LD)
153
 	@rm -f $(TMP_LD)
154
 
154
 
155
 $(MAP_PROJ_S): $(MAP_PROJ)
155
 $(MAP_PROJ_S): $(MAP_PROJ)
156
-	@echo "\033[91mGenerating map project $<\033[0m"
156
+	@printf "\e[1;33mGenerating map project\e[0m $<\n"
157
 	$(PYPROJS) -b sovereign_banks -f sovereign_footer -o $@ $<
157
 	$(PYPROJS) -b sovereign_banks -f sovereign_footer -o $@ $<
158
 
158
 
159
 .PHONY: $(B_ENGINE)
159
 .PHONY: $(B_ENGINE)
191
 
191
 
192
 .PHONY: $(ASSETS)
192
 .PHONY: $(ASSETS)
193
 $(ASSETS):
193
 $(ASSETS):
194
-	@echo "\033[95mMaking Assets\033[0m"
194
+	@printf "\e[1;33mMaking Assets\e[0m\n"
195
 	$(MAKE) -f assets.makefile
195
 	$(MAKE) -f assets.makefile
196
 
196
 
197
 .PHONY: $(SPRITES)
197
 .PHONY: $(SPRITES)
198
 $(SPRITES):
198
 $(SPRITES):
199
-	@echo "\033[95mMaking Sprites\033[0m"
199
+	@printf "\e[1,33mMaking Sprites\e[0m\n"
200
 	$(MAKE) -f sprites.makefile
200
 	$(MAKE) -f sprites.makefile
201
 
201
 
202
 .PHONY: $(ICONS_AR)
202
 .PHONY: $(ICONS_AR)
203
 $(ICONS_AR):
203
 $(ICONS_AR):
204
-	@echo "\033[95mMaking Icons\033[0m"
204
+	@printf "\e[1,33mMaking Icons\e[0m\n"
205
 	$(MAKE) -f icons.makefile
205
 	$(MAKE) -f icons.makefile
206
 
206
 
207
 .PHONY: $(MUSIC_AR)
207
 .PHONY: $(MUSIC_AR)
208
 $(MUSIC_AR):
208
 $(MUSIC_AR):
209
-	@echo "\033[95mMaking Music\033[0m"
209
+	@printf "\e[1,32mMaking Music\e[0m\n"
210
 	$(MAKE) -C $(dir $@) all
210
 	$(MAKE) -C $(dir $@) all
211
 
211
 
212
 .PHONY: $(SMPL_AR)
212
 .PHONY: $(SMPL_AR)
213
 $(SMPL_AR):
213
 $(SMPL_AR):
214
-	@echo "\033[95mMaking Sampler\033[0m"
214
+	@printf "\e[1,32mMaking Sampler\e[0m\n"
215
 	$(MAKE) -C $(dir $@) all
215
 	$(MAKE) -C $(dir $@) all
216
 
216
 
217
 .PHONY: $(VOICE_AR)
217
 .PHONY: $(VOICE_AR)
218
 $(VOICE_AR):
218
 $(VOICE_AR):
219
-	@echo "\033[95mMaking Voice\033[0m"
219
+	@printf "\e[1,32mMaking Voice\e[0m\n"
220
 	$(MAKE) -C $(dir $@) all
220
 	$(MAKE) -C $(dir $@) all
221
 
221
 
222
 .PHONY: $(LIST_AR)
222
 .PHONY: $(LIST_AR)
223
 $(LIST_AR):
223
 $(LIST_AR):
224
-	@echo "\033[95mMaking Songlist\033[0m"
224
+	@printf "\e[1,32mMaking Songlist\e[0m\n"
225
 	$(MAKE) -C $(dir $@) all
225
 	$(MAKE) -C $(dir $@) all
226
 
226
 
227
 .PHONY: $(CRY_AR)
227
 .PHONY: $(CRY_AR)
228
 $(CRY_AR):
228
 $(CRY_AR):
229
-	@echo "\033[95mMaking Cries\033[0m"
229
+	@printf "\e[1,32mMaking Cries\e[0m\n"
230
 	$(MAKE) -C $(dir $@) all
230
 	$(MAKE) -C $(dir $@) all
231
 
231
 
232
 .PHONY: constants
232
 .PHONY: constants

+ 17
- 17
sprites.makefile View File

52
 
52
 
53
 
53
 
54
 $(SPRITES_BINARY): $(OW_OBJ) $(TS_OBJ) $(ITEM_OBJ)
54
 $(SPRITES_BINARY): $(OW_OBJ) $(TS_OBJ) $(ITEM_OBJ)
55
-	@echo "\033[1;32mLinking $@\033[0m"
55
+	@printf "\e[1;30;41mLinking\e[0m $@\n"
56
 	@echo "INPUT($^)" > $(TMP_LD)
56
 	@echo "INPUT($^)" > $(TMP_LD)
57
 	$(LD) -r -o $@ -T $(TMP_LD)
57
 	$(LD) -r -o $@ -T $(TMP_LD)
58
 
58
 
59
 # Item Targets
59
 # Item Targets
60
 $(GFX_BUILD_DIR)/item/%.o: $(GFX_BUILD_DIR)/item/%.s
60
 $(GFX_BUILD_DIR)/item/%.o: $(GFX_BUILD_DIR)/item/%.s
61
-	@echo "\033[32mAssembling $<\033[0m"
61
+	@printf "\e[1;31mAssembling\e[0m $<\n"
62
 	$(AS) -o $@ $<
62
 	$(AS) -o $@ $<
63
 
63
 
64
 .PRECIOUS: $(GFX_BUILD_DIR)/item/%.s
64
 .PRECIOUS: $(GFX_BUILD_DIR)/item/%.s
65
 $(GFX_BUILD_DIR)/item/%.s: $(ASSET_ROOT)/item_icons/%.png
65
 $(GFX_BUILD_DIR)/item/%.s: $(ASSET_ROOT)/item_icons/%.png
66
-	@echo "\033[34mProcessing image $<\033[0m"
66
+	@printf "\e[1;34mProcessing image\e[0m $<\n"
67
 	$(GRIT) $< -fts -fh! -gt -gB4 -gzl -p -pzl -m! -pu16 -o $@
67
 	$(GRIT) $< -fts -fh! -gt -gB4 -gzl -p -pzl -m! -pu16 -o $@
68
 
68
 
69
 # OW Targets
69
 # OW Targets
70
 $(GFX_BUILD_DIR)/overworlds/%.o: $(GFX_BUILD_DIR)/overworlds/%.s
70
 $(GFX_BUILD_DIR)/overworlds/%.o: $(GFX_BUILD_DIR)/overworlds/%.s
71
-	@echo "\033[32mAssembling $<\033[0m"
71
+	@printf "\e[1;31mAssembling\e[0m $<\n"
72
 	$(AS) -o $@ $<
72
 	$(AS) -o $@ $<
73
 
73
 
74
 .PRECIOUS: $(GFX_BUILD_DIR)/overworlds/%.s
74
 .PRECIOUS: $(GFX_BUILD_DIR)/overworlds/%.s
75
 $(GFX_BUILD_DIR)/overworlds/%.s: $(ASSET_ROOT)/overworld/%.png
75
 $(GFX_BUILD_DIR)/overworlds/%.s: $(ASSET_ROOT)/overworld/%.png
76
-	@echo "\033[34mProcessing image $<\033[0m"
76
+	@printf "\e[1;34mProcessing image\e[0m $<\n"
77
 	$(GRIT) $< -fts -fh! -gt -gB4 -gz! -p -pz! -m! -pu16 -o $@
77
 	$(GRIT) $< -fts -fh! -gt -gB4 -gz! -p -pz! -m! -pu16 -o $@
78
 
78
 
79
 # Trainer Sprite Targets
79
 # Trainer Sprite Targets
80
 $(GFX_BUILD_DIR)/trainer_sprites/%.o: $(GFX_BUILD_DIR)/trainer_sprites/%.s
80
 $(GFX_BUILD_DIR)/trainer_sprites/%.o: $(GFX_BUILD_DIR)/trainer_sprites/%.s
81
-	@echo "\033[32mAssembling $<\033[0m"
81
+	@printf "\e[1;31mAssembling\e[0m $<\n"
82
 	$(AS) -o $@ $<
82
 	$(AS) -o $@ $<
83
 
83
 
84
 $(GFX_BUILD_DIR)/trainer_sprites/%.s: $(ASSET_ROOT)/trainer_sprites/%.png
84
 $(GFX_BUILD_DIR)/trainer_sprites/%.s: $(ASSET_ROOT)/trainer_sprites/%.png
85
-	@echo "\033[34mProcessing image $<\033[0m"
85
+	@printf "\e[1;34mProcessing image\e[0m $<\n"
86
 	$(GRIT) $< -fts -fh! -gt -gB4 -gzl -p -pzl -m! -o $@
86
 	$(GRIT) $< -fts -fh! -gt -gB4 -gzl -p -pzl -m! -o $@
87
 
87
 
88
 # Normal Palette Targets
88
 # Normal Palette Targets
89
 $(GFX_BUILD_DIR)/sprites/normal_pal/%.o: $(GFX_BUILD_DIR)/sprites/normal_pal/%.s
89
 $(GFX_BUILD_DIR)/sprites/normal_pal/%.o: $(GFX_BUILD_DIR)/sprites/normal_pal/%.s
90
-	@echo "\033[32mAssembling $<\033[0m"
90
+	@printf "\e[1;31mAssembling\e[0m $<\n"
91
 	$(AS) -o $@ $<
91
 	$(AS) -o $@ $<
92
 
92
 
93
 $(GFX_BUILD_DIR)/sprites/normal_pal/%.s: $(ASSET_ROOT)/pkmn_sprites/%.png
93
 $(GFX_BUILD_DIR)/sprites/normal_pal/%.s: $(ASSET_ROOT)/pkmn_sprites/%.png
94
-	@echo "\033[34mProcessing palette $< (normal)\033[0m"
94
+	@printf "\e[1;34mProcessing palette (normal)\e[0m $<\n"
95
 	$(GRIT) $< -fts -fh! -g! -gB 4 -gt -m! -p -pzl -pu16 -pn 16 \
95
 	$(GRIT) $< -fts -fh! -g! -gB 4 -gt -m! -p -pzl -pu16 -pn 16 \
96
 		-s $(shell echo $(notdir $(basename $<)) | sed "s/normal_/n_p_/g") \
96
 		-s $(shell echo $(notdir $(basename $<)) | sed "s/normal_/n_p_/g") \
97
 		-o $@
97
 		-o $@
135
 
135
 
136
 # Misc hardcoded targets
136
 # Misc hardcoded targets
137
 $(NORMAL_CASTFORM_PAL_OBJ): $(NORMAL_CASTFORM_PAL_OBJ:.o=.s)
137
 $(NORMAL_CASTFORM_PAL_OBJ): $(NORMAL_CASTFORM_PAL_OBJ:.o=.s)
138
-	@echo "\033[32mAssembling $<\033[0m"
138
+	@printf "\e[1;31mAssembling\e[0m $<\n"
139
 	$(AS) -o $@ $<
139
 	$(AS) -o $@ $<
140
 
140
 
141
 $(NORMAL_CASTFORM_PAL_OBJ:.o=.s): $(CASTFORM_PNG)
141
 $(NORMAL_CASTFORM_PAL_OBJ:.o=.s): $(CASTFORM_PNG)
142
-	@echo "\033[34mProcessing palette $< (normal)\033[0m"
142
+	@printf "\e[34mProcessing palette (normal)\e[0m $<\n"
143
 	$(GRIT) $< -fts -fh! -g! -gB 4 -gt -m! -p -pzl -pu16 -pn 64 \
143
 	$(GRIT) $< -fts -fh! -g! -gB 4 -gt -m! -p -pzl -pu16 -pn 64 \
144
 		-s n_p_0385 -o $@
144
 		-s n_p_0385 -o $@
145
 
145
 
146
 
146
 
147
 $(SHINY_CASTFORM_PAL_OBJ): $(SHINY_CASTFORM_PAL_OBJ:.o=.s)
147
 $(SHINY_CASTFORM_PAL_OBJ): $(SHINY_CASTFORM_PAL_OBJ:.o=.s)
148
-	@echo "\033[32mAssembling $<\033[0m"
148
+	@printf "\e[1;31mAssembling\e[0m $<\n"
149
 	$(AS) -o $@ $<
149
 	$(AS) -o $@ $<
150
 
150
 
151
 $(SHINY_CASTFORM_PAL_OBJ:.o=.s): $(CASTFORM_PNG)
151
 $(SHINY_CASTFORM_PAL_OBJ:.o=.s): $(CASTFORM_PNG)
152
-	@echo "\033[34mProcessing palette $< (shiny)\033[0m"
152
+	@printf "\e[34mProcessing palette (shiny)\e[0m $<\n"
153
 	$(GRIT) $< -fts -fh! -g! -gB 4 -gt -m! -p -pzl -pu16 -pn 64 \
153
 	$(GRIT) $< -fts -fh! -g! -gB 4 -gt -m! -p -pzl -pu16 -pn 64 \
154
 		-s s_p_0385 -o $@
154
 		-s s_p_0385 -o $@
155
 
155
 
156
 
156
 
157
 $(CASTFORM_FRONT_OBJ): $(CASTFORM_FRONT_OBJ:.o=.s)
157
 $(CASTFORM_FRONT_OBJ): $(CASTFORM_FRONT_OBJ:.o=.s)
158
-	@echo "\033[32mAssembling $<\033[0m"
158
+	@printf "\e[1;31mAssembling\e[0m $<\n"
159
 	$(AS) -o $@ $<
159
 	$(AS) -o $@ $<
160
 
160
 
161
 $(CASTFORM_FRONT_OBJ:.o=.s): $(CASTFORM_PNG)
161
 $(CASTFORM_FRONT_OBJ:.o=.s): $(CASTFORM_PNG)
162
-	@echo "\033[34mProcessing sprite $< (front)\033[0m"
162
+	@printf "\e[34mProcessing sprite (front)\e[0m $<\n"
163
 	$(GRIT) $< -fts -fh! -g -gB 4 -gt -gzl -al 0 -aw 256 -ah 64 -m! -p! \
163
 	$(GRIT) $< -fts -fh! -g -gB 4 -gt -gzl -al 0 -aw 256 -ah 64 -m! -p! \
164
 		-s front_0385 -o $@
164
 		-s front_0385 -o $@
165
 
165
 
166
 
166
 
167
 $(CASTFORM_BACK_OBJ): $(CASTFORM_BACK_OBJ:.o=.s)
167
 $(CASTFORM_BACK_OBJ): $(CASTFORM_BACK_OBJ:.o=.s)
168
-	@echo "\033[32mAssembling $<\033[0m"
168
+	@printf "\e[1;31mAssembling\e[0m $<\n"
169
 	$(AS) -o $@ $<
169
 	$(AS) -o $@ $<
170
 
170
 
171
 $(CASTFORM_BACK_OBJ:.o=.s): $(CASTFORM_PNG)
171
 $(CASTFORM_BACK_OBJ:.o=.s): $(CASTFORM_PNG)
172
-	@echo "\033[34mProcessing sprite $< (back)\033[0m"
172
+	@printf "\e[34mProcessing sprite (back)\e[0m $<\n"
173
 	$(GRIT) $< -fts -fh! -g -gB 4 -gt -gzl -al 0 -aw 256 -at 64 -ah 64 -m! -p! \
173
 	$(GRIT) $< -fts -fh! -g -gB 4 -gt -gzl -al 0 -aw 256 -at 64 -ah 64 -m! -p! \
174
 		-s back_0385 -o $@
174
 		-s back_0385 -o $@
175
 
175