This repository has been archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
78 lines (70 loc) · 3.54 KB
/
Makefile
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
#---------------------------------------------------------------------------------------------------------------------
# TARGET is the name of the output.
# BUILD is the directory where object files & intermediate files will be placed.
# LIBBUTANO is the main directory of butano library (https://github.com/GValiente/butano).
# PYTHON is the path to the python interpreter.
# SOURCES is a list of directories containing source code.
# INCLUDES is a list of directories containing extra header files.
# DATA is a list of directories containing binary data.
# GRAPHICS is a list of directories containing files to be processed by grit.
# AUDIO is a list of directories containing files to be processed by mmutil.
# DMGAUDIO is a list of directories containing files to be processed by mod2gbt and s3m2gbt.
# ROMTITLE is a uppercase ASCII, max 12 characters text string containing the output ROM title.
# ROMCODE is a uppercase ASCII, max 4 characters text string containing the output ROM code.
# USERFLAGS is a list of additional compiler flags:
# Pass -flto to enable link-time optimization.
# Pass -O0 to improve debugging.
# USERASFLAGS is a list of additional assembler flags.
# USERLDFLAGS is a list of additional linker flags:
# Pass -flto=auto -save-temps to enable parallel link-time optimization.
# USERLIBDIRS is a list of additional directories containing libraries.
# Each libraries directory must contains include and lib subdirectories.
# USERLIBS is a list of additional libraries to link with the project.
# USERBUILD is a list of additional directories to remove when cleaning the project.
# EXTTOOL is an optional command executed before processing audio, graphics and code files.
#
# All directories are specified relative to the project directory where the makefile is found.
#---------------------------------------------------------------------------------------------------------------------
ifndef LIBBUTANOBASE
LIBBUTANOBASE=/home/developer/Projects/GBA/butano
endif
LIBBUTANORELATIVE=$(shell realpath --relative-to $(PWD) $(LIBBUTANOBASE)/)
TARGET := out/$(notdir $(CURDIR))
BUILD := build
LIBBUTANO := $(LIBBUTANOBASE)/butano
PYTHON := python3
SOURCES := src $(LIBBUTANORELATIVE)/common/src
INCLUDES := include $(LIBBUTANORELATIVE)/common/include
DATA :=
GRAPHICS := graphics $(LIBBUTANORELATIVE)/common/graphics
AUDIO := audio $(LIBBUTANORELATIVE)/common/audio
DMGAUDIO := $(LIBBUTANORELATIVE)/common/dmg_audio
ROMTITLE := PONG II
ROMCODE := SBTP
USERFLAGS :=
USERASFLAGS :=
USERLDFLAGS :=
USERLIBDIRS :=
USERLIBS :=
USERBUILD :=
EXTTOOL :=
#---------------------------------------------------------------------------------------------------------------------
# Export absolute butano path:
#---------------------------------------------------------------------------------------------------------------------
export LIBBUTANOABS=$(LIBBUTANOBASE)/butano
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=/opt/devkitpro/devkitARM
#---------------------------------------------------------------------------------------------------------------------
# Include main makefile:
#---------------------------------------------------------------------------------------------------------------------
include $(LIBBUTANOABS)/butano.mak
.PHONY: run
run:
make && mgba-qt -4 out/$(notdir $(CURDIR)).gba
.PHONY: clean_build
clean_build:
rm -f $$(pwd)/build/*
# "act" required for that command (https://github.com/nektos/act)
.PHONY: test_workflow
test_workflow:
act --graph && act --dryrun