diff --git a/INSTALL.md b/INSTALL.md index 3fe8195942..041f6b8e99 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -64,7 +64,7 @@ cd ../pokeemerald ./build_tools.sh ``` -And build the ROM with `make -j4`. +And build the ROM with `make`. # Faster builds @@ -78,12 +78,12 @@ By default `make` only runs a single thread. You can tell `make` to run on multi The optimal value for `-j` is the number of logical cores on your machine. You can run `nproc` to see the exact number. - $ nproc - 8 +``` +$ nproc +8 +``` -If you have 8 cores, run: - - make -j8 +If you have 8 cores, run: `make -j8` `-j` on its own will spawn a new thread for each job. A clean build will have thousands of jobs, which will be slower than not using -j at all. @@ -91,5 +91,5 @@ If you have 8 cores, run: If you've only changed `.c` or `.s` files, you can turn off the dependency scanning temporarily. Changes to any other files will be ignored, and the build will either fail or not reflect those changes. - make NODEP=1 +`make NODEP=1` diff --git a/Makefile b/Makefile index 58a93bb55c..9637d98a80 100644 --- a/Makefile +++ b/Makefile @@ -31,14 +31,7 @@ LDFLAGS = -Map ../../$(MAP) LIB := -L ../../tools/agbcc/lib -lgcc -lc -ifeq ($(OS),Windows_NT) - SHA1 := sha1sum -c -else ifeq ($(shell uname -s),Darwin) - SHA1 := shasum -c -else - SHA1 := sha1sum -c -endif - +SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c GFX := tools/gbagfx/gbagfx AIF := tools/aif2pcm/aif2pcm MID := $(abspath tools/mid2agb/mid2agb)