-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
78 lines (63 loc) · 1.69 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
CALLER=MASTER
# Build file resources by default, otherwise use win/palm resources.
ifneq ($(RESOURCE),DEFAULT)
RESOURCE=FILE
ifneq ($(FMT_JSON),TRUE)
FMT_ASN=TRUE
endif
endif
# Figure out what packages we can build based on platform limitations.
BUILD_PKG_ALL := pkg_sdl pkg_win16 pkg_win32 pkg_curses
# Palm not included by default as it requires MONO and RESOURCE=DEFAULT.
BUILD_PALM=0
# DOS not included by default as it requires CGA to be set.
BUILD_DOS=0
# xlib not included by default as it requires CGA to be set.
BUILD_XLIB=0
# WASM not included as it requires RESOURCE=DEFAULT.
BUILD_WASM=0
ifeq ($(DEPTH),MONO)
ifeq ($(RESOURCE),DEFAULT)
BUILD_PALM=1
BUILD_PKG_ALL += pkg_palm
endif
else ifeq ($(DEPTH),VGA)
ifeq ($(RESOURCE),DEFAULT)
BUILD_WASM=1
BUILD_PKG_ALL += pkg_wasm
endif
else
# DEPTH=VGA
BUILD_DOS=1
BUILD_PKG_ALL += pkg_dos
BUILD_XLIB=1
BUILD_PKG_ALL += pkg_xlib
ifeq ($(RESOURCE),DEFAULT)
BUILD_WASM=1
BUILD_PKG_ALL += pkg_wasm
endif
endif
.PHONY: clean $(BUILD_PKG_ALL)
all: $(BUILD_PKG_ALL)
# Include platform-specific Makefiles.
include Makefile.inc
include Makefile.sdl
include Makefile.win16
include Makefile.win32
include Makefile.curses
ifeq ($(BUILD_PALM),1)
include Makefile.palm
endif
ifeq ($(BUILD_DOS),1)
include Makefile.dos
endif
ifeq ($(BUILD_XLIB),1)
include Makefile.xlib
endif
ifeq ($(BUILD_WASM),1)
include Makefile.wasm
endif
# NDS makefile not currently included as it is broken on our system.
# ====== Clean ======
clean:
rm -rf data obj obj-* bin bin-* gen gen-* dep dep-* *.err .rsrc .finf gmon.out log*.txt packages pkgbuild dsdos prof_output* unimake test_unilayer dsekai.iso