-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (48 loc) · 1.49 KB
/
Copy pathMakefile
File metadata and controls
57 lines (48 loc) · 1.49 KB
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
.PHONY: setup reconfigure build clean install fresh macos-deployment-target
# Detect OS
UNAME_S := $(shell uname -s)
SUPPORT_OPUS_FILES ?= auto
DARWIN_DEPLOYMENT_FILE := build/macos-deployment-target.ini
# Default target
all: setup build
macos-deployment-target:
mkdir -p $(dir $(DARWIN_DEPLOYMENT_FILE))
node scripts/macos_deployment_target.js --support-opus-files $(SUPPORT_OPUS_FILES) > $(DARWIN_DEPLOYMENT_FILE)
# Setup build directory with platform-specific configuration
ifeq ($(UNAME_S),Darwin)
setup: macos-deployment-target
meson setup build/ \
--native-file misc/cross/common.ini \
--native-file misc/cross/darwin-crappy-sdl3-hack.ini \
--native-file misc/cross/arm64-darwin.ini \
--native-file $(DARWIN_DEPLOYMENT_FILE) \
-Dsupport_opus_files=$(SUPPORT_OPUS_FILES)
else
setup:
meson setup build/ \
--native-file misc/cross/common.ini
endif
ifeq ($(UNAME_S),Darwin)
reconfigure: macos-deployment-target
meson setup build/ --reconfigure \
--native-file misc/cross/common.ini \
--native-file misc/cross/darwin-crappy-sdl3-hack.ini \
--native-file misc/cross/arm64-darwin.ini \
--native-file $(DARWIN_DEPLOYMENT_FILE) \
-Dsupport_opus_files=$(SUPPORT_OPUS_FILES)
else
reconfigure:
meson setup build/ --reconfigure \
--native-file misc/cross/common.ini
endif
# Build the project
build:
meson compile -C build/
# Clean build directory
clean:
rm -rf build/
# Install the project
install:
meson install -C build/
# Fresh build (clean + setup + build)
fresh: clean setup build