-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.game
50 lines (37 loc) · 1.54 KB
/
Makefile.game
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
# This Makefile should be run from the game base directory
# Do not modify this Makefile, use it as is! If you want to add new targets
# or rules, add them to Makefile.custom in your game directory, and they
# will be automatically included from this Makefile
.SILENT:
# You can pin any RAGE1 tag or commit here so that your game always will be
# built with a given RAGE1 version. By default use master
RAGE1_TAG = master
# setup some config vars
# no need to change these
GAMEDIR := $(shell pwd)
RAGE1DIR := $(shell realpath "$(GAMEDIR)/../rage1")
RAGE1REPO = https://github.com/jorgegv/rage1.git
# game targets
info:
echo "Game Directory: $(GAMEDIR)"
echo "RAGE1 Directory: $(RAGE1DIR)"
echo "RAGE1 Tag: $(RAGE1_TAG)"
rage1-clone:
if [ ! -d "$(RAGE1DIR)" ]; then git clone "$(RAGE1REPO)" "$(RAGE1DIR)" ]; fi
cd "$(RAGE1DIR)" && git checkout master && git pull --all
rage1-checkout: rage1-clone
bash -c "( cd '$(RAGE1DIR)' && git co $(RAGE1_TAG) >/dev/null 2>&1 ) || echo 'Git: error checking out $(RAGE1_TAG)'"
build: info rage1-checkout
set -o pipefail && bash -c "cd $(RAGE1DIR) && make build target_game=$(GAMEDIR)" | tee build.log
cp "$(RAGE1DIR)/game.tap" .
build-debug: info rage1-checkout
set -o pipefail && bash -c "cd $(RAGE1DIR) && make build-debug target_game=$(GAMEDIR)" | tee build.log
cp "$(RAGE1DIR)/game.tap" .
run:
bash -c "cd $(RAGE1DIR) && make run"
mem:
bash -c "cd $(RAGE1DIR) && make mem"
mem-128:
bash -c "cd $(RAGE1DIR) && make mem-128"
# include additional rules specified in the game, if any
include Makefile.custom