Commit Graph

213 Commits

Author SHA1 Message Date
Ben10do fc300ab0ee
Fix parallelisation issues in Makefile
Introduces a minor hack, in order to ensure that the tools are built before the Makefile attempts to use any of the tools, even when using ‘make -j’.
2017-06-10 18:21:38 +01:00
Ben10do 202cea9705
- Make the tools implicitly when making the ROM
- Add a clean target to the tools Makefile
- Run said clean target when cleaning the pokecrystal directory
2017-06-09 21:55:09 +01:00
yenatch 6001eeba40 makefile misc qol
- md5sum: no more --quiet. this flag is not standard and seeing "OK" is probably better
- saner use of $(roms)
2017-05-29 23:22:24 -04:00
yenatch 2f2aa10c9c Reorder the build targets for backwards compatibility with gmake 3.81. 2017-05-29 23:21:42 -04:00
yenatch e78034eb8c Use a separate makefile for tools
- Fix crystal11
- Fix a bug where the dependency checks would run regardless of target

Fixes 0bd74cdd73
2017-05-29 19:15:34 -04:00
yenatch d6bf2468a1 Add targets for the pokemon animation edge cases. 2017-05-28 23:23:11 -04:00
yenatch 0bd74cdd73 Fix crystal11 after clean 2017-05-28 15:53:30 -04:00
yenatch 1a549990da Accidentally deleted the pokemon palette rule 2017-05-28 15:53:06 -04:00
yenatch e9c1d24c31 Add Pokemon pic pngs.
Copies of the matching compressed files are kept, so files with a matching hash will use the matching compressed file instead.

This is the best that can be done until the compressor is fixed, which may never happen.
2017-05-28 14:03:13 -04:00
yenatch 22058020f4 Fix intermediate files once and for all.
GNU Make defaults to deleting all intermediate files unless .SECONDARY is defined.
2017-05-28 01:22:17 -04:00
yenatch 517136b0d9 Fix the graphics rules 2017-05-28 01:20:58 -04:00
yenatch caa94f8412 Fix the lzcomp rule. 2017-04-28 00:37:42 -04:00
yenatch f09a233eba Add rules previously covered by gfx.py. 2016-08-24 22:03:12 -04:00
yenatch 2ab468268a Add C build tools. 2016-08-24 21:56:07 -04:00
yenatch 05cffac744 Add a custom scan_includes.py. 2016-04-10 19:19:58 -04:00
dannye 8d1551ec9d Revert 85d30fa079 2016-03-24 11:27:02 -05:00
yenatch 85d30fa079 Fix make deleting files that aren't actually intermediate.
make was deciding that a couple .blk files were actually intermediate.
Still don't know what is causing that issue. This is a temporary fix
that will probably be forgotten about and become a permanent one.
2016-03-21 08:04:00 -04:00
yenatch 1f784700b9 Fix the symfile.
gnu make redefines $* to mean % in spite of posix.
2016-03-16 17:54:20 -04:00
yenatch 3810cefaa2 Suppress deletion of .1bpp files. 2016-03-03 00:06:09 -05:00
yenatch 13f5590abe Trim some whitespace in the makefile. 2016-03-01 23:39:01 -05:00
yenatch 370f84227b Suppress deletion of intermediate .2bpp files. 2016-03-01 23:38:36 -05:00
yenatch 0be6e6c910 Remove useless lines in the makefile.
The previous rules were composed this way but only because target-specific variables weren't used. As they are now, they actually do nothing.
2016-03-01 21:13:38 -05:00
yenatch e11ef2b8d5 Only generate dependencies for a target when it's invoked.
This means dependencies for unrelated targets aren't generated if you aren't building them. This makes "make clean" and building individual targets fast again.
2016-03-01 21:01:34 -05:00
yenatch 782cbc14d6 Only use suffixes needed for intermediate rules.
This is technically a hack, since keeping the .asm suffix was causing nonexistent rules to be evaluated as per the next commit. On the other hand, this is the intended purpose of .SUFFIXES.
2016-03-01 20:58:00 -05:00
yenatch 73a660bf2a Remove "make pngs". 2016-02-17 16:22:05 -05:00
yenatch 36f0bda0b3 Use static pattern rules to fix dependencies for objects in subdirs. 2016-02-10 00:31:32 -05:00
yenatch 08ac6dfd80 *_crystal.asm files are no longer needed to build crystal *.o. 2016-01-29 16:24:38 -05:00
yenatch 1176712cfe Use rgbasm -D instead of extra files for version differences. 2016-01-29 01:10:41 -05:00
IIMarckus 82e2fe78e1 Split common text into a separate object. 2015-12-18 00:59:03 -07:00
PikalaxALT 434c97a146 Makefile cleanup 2015-11-15 15:53:49 -05:00
IIMarckus 25c126c69b Revert bad merge.
"Merge pull request #317 from yenatch/pngs-kind-of"

This reverts commit 25025d1b6c, reversing
changes made to 0d17d4a758.
2015-11-01 16:06:15 -07:00
yenatch b8da3874bb Add an `init` makefile target to prevent data that can't be reasonably reproduced from being rebuilt.
This is only meant to be run once.
2015-09-01 00:20:31 -04:00
yenatch f0af75e8d2 Fix touching in make pngs. 2015-08-29 11:02:56 -07:00
yenatch 9c4fb6a6a4 Add a script to convert project-specific graphics.
This is an alternative to terrible hacks like filename metadata, and might combat submodule bloat.
2015-06-28 23:53:49 -07:00
yenatch 07b9c4b030 Fix the make pngs target. 2015-06-26 10:47:13 -07:00
yenatch 82317a7a23 Preemptively get rid of graphics queues while they're still not used.
Nip this in the bud, so it doesn't turn out like pokered. When the time comes, use make -j16 for faster builds.
2015-04-13 22:34:41 -07:00
yenatch a09903a2a4 make compare 2015-03-11 22:37:36 -07:00
yenatch 967977b7af baserom.gbc is no longer required to build 2015-03-11 22:25:54 -07:00
U-Daniel-PC\Daniel 370ffcfd8d Fix make clean
no more .tx files
remove rgbds generated files, .map and .sym
2015-02-14 10:14:58 -05:00
IIMarckus 828d6b92f0 Add the ability to build Crystal 1.1. 2015-02-14 01:51:34 -07:00
yenatch 8583cc4724 Stop using the preprocessor. 2015-01-20 00:01:23 -08:00
yenatch 1a2784d414 Recombine the event engine objects.
They must be in the same bank to work, and defining sections with static banks should only be used to produce an identical rom.

They were only split in the first place to minimize the amount of code tahat needed to be rebuilt based on a single constant, which in retrospect was meaningless.
2014-12-29 08:08:03 -08:00
IIMarckus c28be21260 Use a path argument for find as required by POSIX. 2014-09-23 22:20:27 -06:00
yenatch f244e4483e Makefile: Use lower-case variables and graphics conversion queues.
This is mostly to make it more like pokered.

Queues are an order of magnitude faster than invoking a new python instance for each file.
2014-06-15 16:20:40 -07:00
yenatch 99fbe3147b Rename directory stats -> data. 2014-05-31 22:57:00 -07:00
yenatch c7938cc7d3 Split the mobile adapter library into another object file. 2014-04-30 03:03:20 -04:00
yenatch 6122490cc3 Simple graphics handling in the makefile.
Two-way conversion invokes circular dependency warnings, and is outside the scope of the build.
Now it's one-way.
2014-03-31 21:20:42 -04:00
yenatch 8e24af1f22 Clean up variable usage in the makefile. 2014-02-01 20:36:44 -05:00
yenatch 7f0f21b1fc Get rid of globals.asm
This breaks the build until labels are exported again!
2014-02-01 13:55:48 -05:00
yenatch 4a40c26f6c Makefile: pokemontools variable 2013-12-21 00:46:31 -05:00
yenatch 6ef1028b31 Makefile: image handling
todo: queue targets
2013-12-21 00:40:29 -05:00
yenatch 34d579d9f9 use pokemontools scan_includes.py
It might look the same as before, but this new name is much better! Well done!
2013-12-20 02:44:44 -05:00
yenatch 62020e32aa rewrite makefile for speed and better dependency handling 2013-12-10 02:02:16 -05:00
yenatch aaf26de8ed Makefile: %.bin and %.pal targets 2013-12-02 23:29:38 -05:00
yenatch cf3fd4e13b Makefile: empty targets for %.asm and baserom.gbc
so make stops wasting time trying to find implicit rules
2013-12-02 16:25:03 -05:00
yenatch cc95304912 Makefile: clean doesnt need object dependencies 2013-12-02 15:31:58 -05:00
yenatch d7bf70f3c9 home.o 2013-11-29 02:30:08 -05:00
yenatch 2ec12a22af gfx/pics.o 2013-11-29 02:11:40 -05:00
yenatch c2889215a8 audio.o and misc/crystal_misc.o 2013-11-29 01:51:27 -05:00
yenatch ac65a8b821 engine/credits_crystal.o 2013-11-28 01:38:49 -05:00
yenatch 41f149c7f1 maps.o and stats/pokedex/entries.o 2013-11-27 14:45:42 -05:00
yenatch bb68a76330 Makefile: more readable object list 2013-11-23 02:54:02 -05:00
yenatch cf6295cb9f objects for event handling and scripting 2013-11-23 02:51:48 -05:00
yenatch 94188ee0f7 version-sensitive objects for egg moves and evos/attacks
this way main.o and wram.o are version-neutral
2013-11-22 00:14:55 -05:00
yenatch 02e8b4c7b6 version-neutral build targets
pokecrystal will probably never build gold/silver, but who knows
2013-11-21 21:15:37 -05:00
yenatch f6706ecb09 finally compile multiple objects
pokecrystal.asm doesnt really make sense now so its gone

add includes.asm so objects have a standard include set
2013-11-20 06:35:10 -05:00
yenatch 549591ab0e convert pngs to 1bpp too 2013-11-18 21:07:07 -05:00
yenatch 7fba45f668 fix a typo in Makefile
we want to link more than one object!
2013-09-11 20:27:16 -04:00
yenatch e2aa3d7ea5 consolidate labels across objects into globals.asm
this is required for objects to share labels
2013-09-11 20:26:09 -04:00
yenatch 74f8d746db abstract make targets are now phony 2013-09-11 01:26:51 -04:00
yenatch 84ba0ffc31 rename lzs make target to gfx 2013-09-11 01:25:39 -04:00
yenatch c195276073 rename make variables for graphics files 2013-09-11 01:24:20 -04:00
yenatch 6a21963799 scan source files for Makefile dependencies
preprocessing should work with multiple object files now
2013-09-11 01:23:01 -04:00
yenatch 4db0e3c186 rewrite Makefile to handle multiple rgbasm objects
for now, any new files to preprocess will trigger the targets for all objects.
this isn't a problem yet since there's still only one object.
2013-09-10 19:30:31 -04:00
yenatch 3e9e7663ec preprocess everything
it makes more sense this way
2013-09-10 02:05:33 -04:00
yenatch 6e6514c2c9 no need to use python if baserom.gbc doesn't exist
this part is only reached if baserom.gbc doesn't exist,
so it's pointless to check if it does
2013-09-10 00:09:43 -04:00
yenatch 2b38b9ba21 suppress .tx handling in Makefile
there are too many .tx files for the commands to be meaningful

better to just look at the makefile to see what's going on
2013-09-09 23:47:44 -04:00
Sanky 03af68dc41 define PYTHON in Makefile for simpler local changes 2013-09-06 22:25:42 +02:00
yenatch 90e63a8e06 makefile: files in constants/ dont all end in 'constants' anymore
any non-constants asm files shouldn't be in constants/ anyway
2013-09-04 21:57:44 -04:00
Bryan Bishop 9da5768b34 fix baserom.gbc check in Makefile 2013-08-29 11:56:20 -05:00
Bryan Bishop 53d208ce4c fail fast when the baserom.gbc file doesn't exist
One day this will not be required. But until then, waiting one or more
seconds for the build to fail just to learn that you forgot baserom.gbc
is really silly.

This makes failure almost instantaneous compared to before, which would
take between one and ten seconds depending on system performance.

fixes #167
2013-08-28 16:22:50 -05:00
Bryan Bishop 3453879756 Merge branch 'master' into remove-extras 2013-08-27 10:51:30 -05:00
yenatch dbe8f750fe generate a mapfile and symfile on compile
the symfile is convenient and the mapfile is a better source for labels.json
2013-08-16 13:43:04 -04:00
Bryan Bishop 36b7935bed Merge branch 'master' into remove-extras-fix-make-gfx 2013-08-03 21:40:45 -05:00
Bryan Bishop daa0760e26 fix gfx/pics/%/front.lz make target
The parameter order was wrong, causing make to always try to make
front.lz files every run.
2013-08-03 21:29:49 -05:00
Bryan Bishop 268a2d28fd probably fix the pngs target for make
Update the submodule to a version where gfx.py is able to handle the
current paths.

Make some other fixes to Makefile to call gfx.py correctly.
2013-08-03 20:13:37 -05:00
Bryan Bishop a94257c7f8 update Makefile for the new gfx.py path
Why isn't the build breaking?
2013-08-03 18:40:02 -05:00
Bryan Bishop bb8990dc3c Merge pull request #157 from yenatch/overworld
overworld loop and movement
2013-07-12 19:16:49 -07:00
yenatch 425b727784 make: check wram/constants 2013-07-10 19:17:02 -04:00
Bryan Bishop 7da503ac33 use rm -f in Makefile 2013-06-25 23:48:28 -05:00
yenatch 01954388ea make: don't recompile if it's not necessary
the preprocessor queue was preventing files from being recognized as out-of-date

this highlights similar errors with graphics targets, which need to be fixed anyway
2013-06-21 23:23:22 -04:00
yenatch e733c4234c preprocess asm files individually
this fixes a lot of previous hacks

first off, rgbds requires that labels from includes be marked as globals.
instead, 3626ddeb stuffed includes into the parent file in the preprocessor.
this meant one huge file got preprocessed every time, adding an additional
ten seconds to compile time.

running the preprocessor once for each file would create too much overhead,
so a list is fed into prequeue.py, which then makes calls to preprocessor.py.

this paves the way for compiling source files separately some day.

next, compiling previously required `make clean` to be executed first.
f3340de6 touched main.asm to force a fresh compile instead. this behavior
has been reverted. now, `make all` will only attempt to recompile if a
source file has changed.

preprocessor.py has some marginal changes. prequeue.py is created to keep
the original functionality of preprocessor.py intact. so many files are
preprocessed on first compile (1951 as of this commit) that the prequeue
call has been hidden.

compile time is reduced to 15-30 seconds on first compile, and 5-10 seconds
subsequently. the majority of this time is spent in rgbasm.
2013-06-21 16:12:40 -04:00
yenatch f3340de6dc make clean is no longer required to compile 2013-06-18 22:39:13 -04:00
yenatch 2df19fef15 remove makefile clutter 2013-05-28 17:19:37 -04:00
yenatch ca22f95db0 get rid of windows build components
who needs those anyway?
2013-05-18 04:46:52 -04:00
yenatch 40946fd525 confident enough in lz make target to include it in general compile 2013-05-18 04:46:52 -04:00
yenatch b5e0efc118 Working lz make target 2013-05-18 04:46:52 -04:00
yenatch f076f14b98 double-colon rules for .png overrides 2013-04-04 22:50:02 -04:00
yenatch b6c874d4d4 windows-specific make targets
compiles properly on windows now
2013-04-04 22:45:37 -04:00
yenatch b570c4d6e6 fix path handling in png make target
lz files were being decompressed to the top directory (gfx/)
2013-03-18 16:36:30 -04:00
yenatch 59f6291afb Split common text out of main.asm 2013-02-17 02:19:49 -05:00
yenatch ad0578fda0 Fix png export orientation
A quirk of the Decompressed class dissociated the orientation from
the output attribute.

The makefile no longer suppresses output since it's still relevant.
2013-02-12 03:31:35 -05:00
yenatch 8b8f7200a9 Clean up the makefile a bit
Simplifies/explains png import
2013-02-11 17:59:54 -05:00
yenatch 0b8c5ef75b Finish off make target for png generation
Now any existing lz files are converted to 2bpp, and all 2bpp files
are converted to png.
2013-02-11 17:59:43 -05:00
yenatch d1172e1fb6 Add build target to mass-generate pngs from 2bpp files 2013-02-11 04:13:36 -05:00
yenatch 0b05325e07 Allow png->lz compression in the build process
To enable, append '${IMGFILES}' to line 22:
pokecrystal.o: pokecrystal.asm constants.asm wram.asm ${TEXTFILES} ${IMGFILES}

Also append '${LZFILES}' to line 48:
	rm -f main.tx pokecrystal.o pokecrystal.gbc ${TEXTFILES} ${LZFILES}
2013-02-09 05:23:39 -05:00
IIMarckus 4ee88cd762 Add lots of phone call texts. 2013-01-13 15:40:23 -07:00
Bryan Bishop 802c7780ac use rgbfix to fix the header bytes 2012-05-30 14:13:14 -05:00
IIMarckus 11ed9511cc Add the unused, unreferenced Sweet Honey text. 2012-05-22 21:56:20 -06:00
Bryan Bishop 849c0d132d rename textpre.py -> preprocessor.py 2012-04-26 16:58:20 -05:00
IIMarckus 93902a38bd Add code for the Extremespeed Dratini. 2012-03-20 22:23:40 -06:00
IIMarckus d5fe70b03b Use textpre.py instead of textpre.awk. 2012-03-05 00:05:36 -07:00
Bryan Bishop 7dc495b3c9 initial commit 2012-03-04 21:31:27 -06:00