Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
550 lines (408 loc) · 16.8 KB
/
Copy pathMakefile
File metadata and controls
550 lines (408 loc) · 16.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# Makefile
ROMNAME = rom.nds
BUILDROM = test.nds
define n
endef
# Check if user cloned git repository correctly first thing to prevent excessive user enquiries
# add an exception for the path to hg-engine that is normally in the docker container
ifneq ($(shell pwd),/hg-engine)
ifneq ($(shell git rev-parse --is-inside-work-tree 2>/dev/null), true)
$(error Current directory is not a git repository. Please follow the instructions in the README: https://github.com/BluRosie/hg-engine)
endif
endif
ifneq ($(shell pwd | grep -i 'onedrive'),)
$(error "Do not put files into OneDrive. Please clone the repository in a different folder." )
endif
DESIRED_GAMECODE := IPKE
GAMECODE = $(shell dd bs=1 skip=12 count=4 if=$(ROMNAME) status=none)
VALID_GAMECODE = $(shell echo $(GAMECODE) | grep -i -q $(DESIRED_GAMECODE); echo $$?)
ifneq ($(VALID_GAMECODE), 0)
# invalid rom detected based on gamecode. this primarily catches other-language roms
$(error ROM Code read from $(ROMNAME) ($(GAMECODE)) does not match valid ROM Code ($(DESIRED_GAMECODE)).$(n)Please use a valid US HeartGold ROM.$(n)hg-engine does not work with non-USA ROM files)
endif
MAC = $(shell uname -s | grep -i -q 'darwin'; echo $$?)
ifneq ($(MAC), 0)
# see if on msys2, but only if not on mac because /proc/version doesn't exist there
MSYS2 = $(shell grep -i -q 'msys' /proc/version; echo $$?)
else
MSYS2 = 1
endif
# environment setting
# get rid of devkitpro: if devkitpro is installed, can still use it. otherwise, default to arm-none-eabi tools
ifeq ($(shell echo $$DEVKITARM),)
ifeq ($(MSYS2), 0)
PREFIX = /mingw64/bin/arm-none-eabi-
else
PREFIX = arm-none-eabi-
endif
else
# support legacy devkitpro instructions
PREFIX = $(DEVKITARM)/bin/arm-none-eabi-
endif
AS = $(PREFIX)gcc -x assembler-with-cpp
CC = $(PREFIX)gcc
LD = $(PREFIX)ld
OBJCOPY = $(PREFIX)objcopy
PYTHON_NO_VENV = python3
VENV = .venv
PYTHON_VENV_VERSION := $(shell $(PYTHON_NO_VENV) -m ensurepip 2>&1 | grep -i -q 'No module named'; echo $$?)
ifneq ($(PYTHON_VENV_VERSION), 0)
# we can use a virtual environment because ensurepip is packaged with the python install
VENV_ACTIVATE = $(VENV)/bin/activate
PYTHON = . $(VENV_ACTIVATE); $(PYTHON_NO_VENV)
REQUIREMENTS = requirements.txt
else
# there is no need to use a virtual environment because python does not have the requirements installed
PYTHON = $(PYTHON_NO_VENV)
VENV_ACTIVATE =
endif
.PHONY: clean all dumprom move_narc
move_narc clean restore: NOSCAN = 1
NOSCAN ?= 0
default: all
ifneq ($(PYTHON_VENV_VERSION), 0)
# only set up venv if we need to
venv: $(VENV_ACTIVATE)
# divorce this python3 from venv so that it works
$(VENV_ACTIVATE):
$(PYTHON_NO_VENV) -m venv $(VENV)
ifeq ($(MSYS2), 0)
$(PYTHON) -m pip install ndspy==4.1.0
else
$(PYTHON) -m pip install -r $(REQUIREMENTS)
endif
endif
####################### Tools #######################
ADPCMXQ := tools/adpcm-xq
ARMIPS := tools/armips
BLZ := tools/blz
BTX := tools/btx
ENCODEPWIMG := tools/ENCODE_IMG
GFX := tools/nitrogfx
MSGENC := tools/msgenc
MOVEDATAGEN := tools/movedatagen
POKEDEXDATAGEN := tools/pokedexdatagen
SPECIESDATAGEN := tools/speciesdatagen
TRAINERDATAGEN := tools/trainerdatagen
NARCHIVE := $(PYTHON) tools/narcpy.py
NDSTOOL := tools/ndstool
NTRWAVTOOL := $(PYTHON) tools/ntrWavTool.py
O2NARC := tools/o2narc
SDATTOOL := $(PYTHON) tools/SDATTool.py
# Compiler/Assembler/Linker settings
LDFLAGS = rom.ld -T $(C_SUBDIR)/linker.ld
ASFLAGS = -I"$(shell pwd)/asm/include" -I"$(shell pwd)/include" -mthumb -mcpu=arm946e-s -mtune=arm946e-s
CFLAGS = -I"$(shell pwd)/include" -mthumb -mno-thumb-interwork -mcpu=arm946e-s -mtune=arm946e-s -mno-long-calls -Wall -Wextra -Wno-builtin-declaration-mismatch -Wno-sequence-point -Wno-address-of-packed-member -Os -fira-loop-pressure -fipa-pta
ARMIPS_FLAGS = -equ DEBUG_BATTLE_SCENARIOS 0
ifeq ($(AUTO_TEST),Y)
CFLAGS += -DDEBUG_BATTLE_SCENARIOS -DDEBUG_AUTO_CONTINUE_GAME -Werror
ARMIPS_FLAGS = -equ DEBUG_BATTLE_SCENARIOS 1
endif
####################### Output #######################
C_SUBDIR = src
ASM_SUBDIR = asm
INCLUDE_SUBDIR = include
BUILD := build
BUILD_NARC := $(BUILD)/narc
BASE := base
FILESYS := $(BASE)/root
LINK = $(BUILD)/linked.o
OUTPUT = $(BUILD)/output.bin
INCLUDE_SRCS := $(wildcard $(INCLUDE_SUBDIR)/*.h)
C_SRCS := $(wildcard $(C_SUBDIR)/*.c)
ALL_C_SRCS += $(C_SRCS)
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(BUILD)/%.o,$(C_SRCS))
ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
ALL_ASM_SRCS += $(ASM_SRCS)
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(BUILD)/%.o,$(ASM_SRCS))
OBJS := $(C_OBJS) $(ASM_OBJS)
REQUIRED_DIRECTORIES += $(BASE) $(BUILD) $(BUILD_NARC)
## includes
include data/graphics/pokegra.mk
include data/graphics/itemgra.mk
include data/itemdata/itemdata.mk
include data/codetables.mk
include narcs.mk
include overlays.mk
include dump.mk
####################### Build Tools #######################
MSGENC_SOURCES := $(wildcard tools/source/msgenc/*.cpp) $(wildcard tools/source/msgenc/*.h)
$(MSGENC): tools/source/msgenc/*
cd tools/source/msgenc ; $(MAKE)
mv tools/source/msgenc/msgenc tools/msgenc
TOOLS += $(MSGENC)
$(NDSTOOL):
ifeq (,$(wildcard $(NDSTOOL)))
rm -r -f tools/source/ndstool
cd tools/source ; git clone https://github.com/devkitPro/ndstool.git
cd tools/source/ndstool ; git checkout fa6b6d01881363eb2cd6e31d794f51440791f336
@# do not need to account for subdirectories here because ndstool does not have any .sh in subdirs
cd tools/source/ndstool ; chmod +x *.sh
cd tools/source/ndstool ; ./autogen.sh
cd tools/source/ndstool ; ./configure && $(MAKE)
mv tools/source/ndstool/ndstool tools/ndstool
rm -r -f tools/source/ndstool
endif
TOOLS += $(NDSTOOL)
$(ARMIPS):
ifeq (,$(wildcard $(ARMIPS)))
rm -r -f tools/source/armips
cd tools/source ; git clone --recursive https://github.com/BluRosie/armips.git
mkdir -p tools/source/armips/build
cd tools/source/armips/build; cmake .. -DCMAKE_BUILD_TYPE=Release ..
cd tools/source/armips/build; $(MAKE)
mv tools/source/armips/build/armips tools/armips
rm -r -f tools/source/armips
endif
TOOLS += $(ARMIPS)
$(ADPCMXQ):
ifeq (,$(wildcard $(ADPCMXQ)))
rm -r -f tools/source/adpcm-xq
cd tools/source ; git clone https://github.com/dbry/adpcm-xq.git
cd tools/source/adpcm-xq ; gcc -O2 *.c -o adpcm-xq -lm
mv tools/source/adpcm-xq/adpcm-xq $(ADPCMXQ)
rm -r -f tools/source/adpcm-xq
endif
TOOLS += $(ADPCMXQ)
tools/ntrWavTool.py:
ifeq (,$(wildcard tools/ntrWavTool.py))
rm -r -f tools/source/ntrWavTool
cd tools/source ; git clone https://github.com/turtleisaac/ntrWavTool.git
mv tools/source/ntrWavTool/ntrWavTool.py tools/ntrWavTool.py
rm -r -f tools/source/ntrWavTool
endif
TOOLS += tools/ntrWavTool.py
NITROGFX_SOURCES := $(wildcard tools/source/nitrogfx/*.c) $(wildcard tools/source/nitrogfx/*.h)
$(GFX): $(NITROGFX_SOURCES)
cd tools/source/nitrogfx ; $(MAKE)
mv tools/source/nitrogfx/nitrogfx $(GFX)
TOOLS += $(GFX)
$(MOVEDATAGEN): $(wildcard tools/source/movedatagen/*.c) data/Moves.c include/move_data.h include/config.h
cd tools/source/movedatagen ; $(MAKE)
TOOLS += $(MOVEDATAGEN)
$(POKEDEXDATAGEN): $(wildcard tools/source/pokedexdatagen/*.c) data/PokedexSort.c data/PokedexArea.c include/pokedex_archive_data.h include/constants/pokedex.h
cd tools/source/pokedexdatagen ; $(MAKE)
TOOLS += $(POKEDEXDATAGEN)
$(SPECIESDATAGEN): $(wildcard tools/source/speciesdatagen/*.c) data/Species.c include/species_data.h include/config.h
cd tools/source/speciesdatagen ; $(MAKE)
TOOLS += $(SPECIESDATAGEN)
$(TRAINERDATAGEN): $(wildcard tools/source/trainerdatagen/*.c) data/Trainers.c include/trainer_data.h include/constants/trainerclass.h include/constants/pokemon.h
cd tools/source/trainerdatagen ; $(MAKE)
TOOLS += $(TRAINERDATAGEN)
$(O2NARC): $(wildcard tools/source/o2narc/*.cpp) $(wildcard tools/source/o2narc/*.h)
cd tools/source/o2narc ; $(MAKE)
mv tools/source/o2narc/o2narc $(O2NARC)
TOOLS += $(O2NARC)
$(ENCODEPWIMG):
cd tools/source/DECODEIMG ; $(MAKE)
mv tools/source/DECODEIMG/ENCODE_IMG $(ENCODEPWIMG)
TOOLS += $(ENCODEPWIMG)
$(BTX):
cd tools/source/btx ; $(MAKE)
mv tools/source/btx/btx $(BTX)
TOOLS += $(BTX)
####################### Build #######################
$(BUILD)/rom_gen.ld:$(LINK) $(OUTPUT) rom.ld
cp rom.ld $(BUILD)/rom_gen.ld
$(PYTHON) scripts/generate_ld.py $(BUILD)/rom_gen.ld $(LINK)
# create output folders if they do not exist
$(CODE_BUILD_DIRS):
mkdir -p $@
# generate .d dependency files that are included as part of compiling if it does not exist
define SRC_OBJ_INC_DEFINE
# this generates the objects as part of generating the dependency list which will just be massive files of rules
$1: $2 $(LEARNSETS_HEADER) $(BATTLETESTS_HEADER) | $(dir $1)
$(CC) -MMD -MF $(basename $1).d $(CFLAGS) -c $2 -o $1
@#printf "\t$(CC) $(CFLAGS) -c $2 -o $1" >> $(basename $1).d
-include $(basename $1).d
endef
ifneq (1,$(NOSCAN))
$(foreach src, $(ALL_C_SRCS), $(eval $(call SRC_OBJ_INC_DEFINE,$(patsubst $(C_SUBDIR)/%.c,$(BUILD)/%.o, $(src)),$(src))))
endif
define ASM_OBJ_INC_DEFINE
# these should have similar dependency scanning, but we do not currently use them in a way conducive to it
$1: $2 | $(dir $1)
$(AS) $(ASFLAGS) -c $2 -o $1
endef
ifneq (1,$(NOSCAN))
$(foreach src, $(ALL_ASM_SRCS), $(eval $(call ASM_OBJ_INC_DEFINE,$(patsubst $(ASM_SUBDIR)/%.s,$(BUILD)/%.o, $(src)),$(src))))
endif
$(LINK):$(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS)
$(OUTPUT):$(LINK)
$(OBJCOPY) -O binary $< $@
# only reextract from the rom if the romname is newer than the extracted arm9.bin
$(BASE)/arm9.bin: $(ROMNAME) $(NDSTOOL) $(VENV_ACTIVATE)
rm -rf $(BASE)
@mkdir -p $(REQUIRED_DIRECTORIES)
$(NDSTOOL) -x $(ROMNAME) -9 $(BASE)/arm9.bin -7 $(BASE)/arm7.bin -y9 $(BASE)/overarm9.bin -y7 $(BASE)/overarm7.bin -d $(FILESYS) -y $(BASE)/overlay -t $(BASE)/banner.bin -h $(BASE)/header.bin
$(NARCHIVE) extract $(FILESYS)/a/0/2/8 -o $(BUILD)/a028/ -nf
all: $(OUTPUT) $(OVERLAY_OUTPUTS) $(TOOLS) $(BASE)/arm9.bin
@# find and delete macOS and windows files
find . \( -name "*.DS_Store" -o -name "*:Zone.Identifier" \) -delete
$(PYTHON) scripts/make.py $(CFLAGS)
# TODO: find a convenient way to not have this be a separate $(MAKE)
$(MAKE) move_narc
$(ARMIPS) armips/global.s $(ARMIPS_FLAGS)
$(NARCHIVE) create $(FILESYS)/a/0/2/8 $(BUILD)/a028/ -nf
@echo "Making ROM..."
$(NDSTOOL) -c $(BUILDROM) -9 $(BASE)/arm9.bin -7 $(BASE)/arm7.bin -y9 $(BASE)/overarm9.bin -y7 $(BASE)/overarm7.bin -d $(FILESYS) -y $(BASE)/overlay -t $(BASE)/banner.bin -h $(BASE)/header.bin
@echo "Done. See output $(BUILDROM)."
####################### Restore clean base ################
NEWFILE = romOld-`date +%d%b%y`.nds
CLEANROM = romClean.nds
restore:
mv $(ROMNAME) $(NEWFILE)
cp $(CLEANROM) $(ROMNAME)
####################### Restore and build ################
restore_build: | restore all
####################### Clean #######################
clean:
rm -rf $(BUILD) $(BASE) $(BUILD)/rom_gen.ld $(BUILD)/rom_gen_battle.ld
rm -rf $(shell find . -type d -name "generated")
@echo "Build artifacts removed."
clean_tools:
rm -rf $(TOOLS) $(VENV)
ALL_CODE_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(BUILD)/%.o,$(ALL_C_SRCS)) \
$(patsubst $(ASM_SUBDIR)/%.s,$(BUILD)/%.o,$(ALL_ASM_SRCS)) \
$(patsubst $(C_SUBDIR)/%.c,$(BUILD)/%.d,$(ALL_C_SRCS))
clean_code:
rm -f $(ALL_CODE_OBJS) $(LINKED_OUTPUTS) $(OUTPUT) $(OVERLAY_OUTPUTS) $(BUILD)/rom_gen.ld $(BUILD)/rom_gen_battle.ld
####################### Final ROM Build #######################
CODE_ADDON_ARTIFACTS := $(wildcard $(BUILD)/a028/9_*) $(wildcard $(BUILD)/a028/8_1*) $(wildcard build/$(BUILD)/8_2*) $(BUILD)/a028/8_07 $(BUILD)/a028/8_08 $(BUILD)/a028/8_09
CODE_ADDON_ARTIFACTS := $(filter-out $(BUILD)/a028/8_1 $(BUILD)/a028/8_2 $(BUILD)/a028/8_3 $(BUILD)/a028/8_4 $(BUILD)/a028/8_5 $(BUILD)/a028/8_6, $(CODE_ADDON_ARTIFACTS))
move_narc: $(NARC_FILES)
@echo "battle hud layout:"
cp $(BATTLEHUD_NARC) $(BATTLEHUD_TARGET)
@echo "move data:"
cp $(MOVEDATA_NARC) $(MOVEDATA_TARGET)
@echo "move particles:"
cp $(MOVEPARTICLES_NARC) $(MOVEPARTICLES_TARGET)
@echo "item data files:"
cp $(ITEMDATA_NARC) $(ITEMDATA_TARGET)
@echo "mon sprite data:"
cp $(POKEGRA_NARC) $(POKEGRA_TARGET)
cp $(POKEGRA_NARC) $(PBR_POKEGRA_TARGET)
@echo "opening demo files:"
cp $(OPENDEMO_NARC) $(OPENDEMO_TARGET)
@echo "mon personal data:"
cp $(MONDATA_NARC) $(MONDATA_TARGET)
@echo "sprite offsets:"
cp $(SPRITEOFFSETS_NARC) $(SPRITEOFFSETS_TARGET)
@echo "mon height offsets (a005):"
cp $(HEIGHT_NARC) $(HEIGHT_TARGET)
@echo "dex area data:"
cp $(DEXAREA_NARC) $(DEXAREA_TARGET)
@echo "pokedex sort lists:"
cp $(DEXSORT_NARC) $(DEXSORT_TARGET)
@echo "evolution data:"
cp $(EVOS_NARC) $(EVOS_TARGET)
@echo "regional dex order:"
cp $(REGIONALDEX_NARC) $(REGIONALDEX_TARGET)
@echo "trainer data:"
cp $(TRAINERDATA_NARC) $(TRAINERDATA_TARGET)
cp $(TRAINERDATA_NARC_2) $(TRAINERDATA_TARGET_2)
@echo "trainer text:"
cp $(TRAINERTEXT_NARC) $(TRAINERTEXT_TARGET)
cp $(TRAINERTEXT_NARC_2) $(TRAINERTEXT_TARGET_2)
@echo "footprints:"
cp $(FOOTPRINTS_NARC) $(FOOTPRINTS_TARGET)
@echo "move anims:"
cp $(MOVEANIM_NARC) $(MOVEANIM_TARGET)
@echo "move sub animations:"
cp $(MOVESUBANIM_NARC) $(MOVESUBANIM_TARGET)
@echo "move battle scripts:"
cp $(MOVE_SEQ_NARC) $(MOVE_SEQ_TARGET)
@echo "move battle scripts:"
cp $(BATTLE_EFF_NARC) $(BATTLE_EFF_TARGET)
@echo "battle sub effects:"
cp $(BATTLE_SUB_NARC) $(BATTLE_SUB_TARGET)
@echo "bag gfx:"
cp $(BAGGFX_NARC) $(BAGGFX_TARGET)
@echo "item gfx:"
cp $(ITEMGFX_NARC) $(ITEMGFX_TARGET)
@echo "dex gfx for fairy:"
cp $(DEXGFX_NARC) $(DEXGFX_TARGET)
@echo "battle gfx for fairy:"
cp $(BATTLEGFX_NARC) $(BATTLEGFX_TARGET)
@echo "otherpoke gfx for fairy:"
cp $(OTHERPOKE_NARC) $(OTHERPOKE_TARGET)
@echo "pokemon icons:"
cp $(ICONGFX_NARC) $(ICONGFX_TARGET)
@echo "wild encounters:"
cp $(ENCOUNTER_NARC) $(ENCOUNTER_TARGET)
@echo "safari zone encounters:"
cp $(SAFARI_ENCOUNTER_NARC) $(SAFARI_ENCOUNTER_TARGET)
@echo "pokemon overworlds:"
cp $(OVERWORLDS_NARC) $(OVERWORLDS_TARGET)
@echo "pokemon overworld data:"
cp $(OVERWORLD_DATA_NARC) $(OVERWORLD_DATA_TARGET)
@echo "move an updated gs_sound_data.sdat:"
cp $(SDAT_BUILD) $(SDAT_TARGET)
@echo "text data:"
cp $(MSGDATA_NARC) $(MSGDATA_TARGET)
@echo "ball spa files:"
cp $(BALL_SPA_NARC) $(BALL_SPA_TARGET)
@echo "pokewalker sprites:"
cp $(PW_POKEGRA_NARC) $(PW_POKEGRA_TARGET)
@echo "pokewalker icons:"
cp $(PW_POKEICON_NARC) $(PW_POKEICON_TARGET)
@echo "font:"
if [ $$(grep -i -c "//#define IMPLEMENT_TRANSPARENT_TEXTBOXES" $(INCLUDE_SUBDIR)/config.h) -eq 0 ]; then cp $(FONT_NARC) $(FONT_TARGET); fi
@echo "textbox:"
if [ $$(grep -i -c "//#define IMPLEMENT_TRANSPARENT_TEXTBOXES" $(INCLUDE_SUBDIR)/config.h) -eq 0 ]; then cp $(TEXTBOX_NARC) $(TEXTBOX_TARGET); fi
@echo "scripts:"
cp $(SCR_SEQ_NARC) $(SCR_SEQ_TARGET)
@echo "headbutt trees:"
cp $(HEADBUTT_NARC) $(HEADBUTT_TARGET)
@echo "trainer gfx:"
cp $(TRAINER_GFX_NARC) $(TRAINER_GFX_TARGET)
@echo "trainer back gfx:"
cp $(TRAINER_GFX_BACK_NARC) $(TRAINER_GFX_BACK_TARGET)
@echo "levelup learnset:"
cp $(LEVELUPLEARNSET_NARC) $(LEVELUPLEARNSET_TARGET)
@echo "egg moves:"
cp $(EGGLEARNSET_NARC) $(EGGLEARNSET_TARGET)
@echo "baby mons:"
cp $(BABYMONS_BIN) $(BABYMONS_TARGET)
@if test -s build/a028/8_00; then \
rm -rf build/a028/8_0 build/a028/8_1 build/a028/8_2 build/a028/8_3 build/a028/8_4 build/a028/8_5 build/a028/8_6 build/a028/8_7 build/a028/8_8 build/a028/8_9; \
fi
@if test -s build/a028/8_7; then \
rm -rf build/a028/8_7 build/a028/8_8 build/a028/8_9; \
fi
@rm -rf $(CODE_ADDON_ARTIFACTS)
@echo "hidden ability table:"
cp $(HIDDEN_ABILITY_TABLE_BIN) $(HIDDEN_ABILITY_TABLE_TARGET)
@echo "base experience table:"
cp $(BASE_EXPERIENCE_TABLE_BIN) $(BASE_EXPERIENCE_TABLE_TARGET)
@echo "icon palette table:"
cp $(ICON_PALETTE_TABLE_BIN) $(ICON_PALETTE_TABLE_TARGET)
@echo "species to ow female table:"
cp $(SPECIES_TO_OW_FEMALE_BIN) $(SPECIES_TO_OW_FEMALE_TARGET)
@echo "form data table:"
cp $(POKEFORMDATATBL_BIN) $(POKEFORMDATATBL_TARGET)
@echo "form to species mapping table:"
cp $(FORMTOSPECIES_BIN) $(FORMTOSPECIES_TARGET)
@echo "form reversion mapping table:"
cp $(FORMREVERSION_BIN) $(FORMREVERSION_TARGET)
@echo "machine moves:"
cp $(MACHINELEARNSET_BIN) $(MACHINELEARNSET_TARGET)
@echo "tutor moves:"
cp $(TUTORLEARNSET_BIN) $(TUTORLEARNSET_TARGET)
@echo "battle tests:"
cp $(BATTLETESTS_BIN) $(BATTLETESTS_TARGET)
@echo "background gfx ids:"
cp $(BACKGROUND_GFX_IDS_BIN) $(BACKGROUND_GFX_IDS_TARGET)
@echo "hidden item params:"
cp $(HIDDEN_ITEM_PARAMS_BIN) $(HIDDEN_ITEM_PARAMS_TARGET)
@echo "ability flag params:"
cp $(ABILITY_FLAG_PARAMS_BIN) $(ABILITY_FLAG_PARAMS_TARGET)
update_machine_moves: $(VENV_ACTIVATE)
$(PYTHON) scripts/update_machine_moves.py --descriptions --sprites
@echo "Updated item descriptions and sprites. Double check formatting"
# needed to keep the $(SDAT_OBJ_DIR)/WAVE_ARC_PV%/00.swav from being detected as an intermediate file
.SECONDARY:
####################### Debug #######################
print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true
contents-% : ; $(info $($*)) @true