Settings can be changed by editing the values after the " = ". Spaces are allowed, special characters are not. No quotes are needed. To reference other variables, wrap them like $(THIS) and use their exact name.
Unless you know what you're doing, only edit this section (marked by ===) in the
Makefile.1 If you do know what you're doing, consider making a fork of the template!
The name of your project or sprite. This will be used to name the final Scratch file2.
Spaces are allowed.
Must be either project3 or sprite4, in lowercase.
This number can be found in the URLs related to the project. For example: https://scratch.mit.edu/projects/`1105131011`/editor If the project is not "shared", you need to be logged in as the author to see it. If other users find your project ID, they will not be able to tell that there even is a project with this ID unless you have "shared" it. 5
This section reflects your project's directory structure. If you modify the values, make sure your actual directories match these names, and vice versa. These paths are relative to the place from where you run the make commands.
If you want to point to subdirectories, use / to separate them, for example: directory/subdirectory. Do not include a leading / or ./ or a trailing /.
Where the source files are stored. This is where your project.json or sprite.json file will be.
Where the asset files, i.e. sounds and costumes are stored.6.
Where the output files are stored. This is where the final scratch file2 will be created.
This is the directory where the final scratch file2 will be created. If you want it to be directly in the project root, set it to .. If you change this to be outside of the OUT_DIR, make sure to add your custom location to the .gitignore file, so that it doesn't get committed to the repository. If there are other files in this directory, that you do want in your repository, you need to add the exact file path to the .gitignore file, as defined by OUT_FILE.
Base URL of the Scratch website.
URL of the project page on the Scratch website.
This is based on the external specification of the Scratch file format7.
Where the asset files are stored after building the project. This is where the final asset files will be copied to. This will be reflected in the final scratch file2.
Base name of the JSON file that will be created in the $(OUT_DIR) directory. It will be named project.json or sprite.json depending on the value of TYPE.
The file extension of the final Scratch file2. This changes depending on the value of TYPE: sb37 for projects and sprite38 for sprites.
The path (including the file name) of the final scratch file2.
The algorithm used to calculate the hashes of asset files.
The command used to format the project.json or sprite.json file. To run this for every commit, remove the # before format in .githooks/pre-commit.
The command used to open the project in the browser. This can be any command that takes a URL as its only argument.
The command used to run the Makefile.
The command used to invoke the hash algorithm6 to calculate the hash of asset files.
The command used to remove extra slases from the path of a given URL.
Footnotes
-
You may also modify any lines starting with
#, since they're just comments. ↩