forked from LoveRetro/NextUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile.native
More file actions
42 lines (34 loc) · 1.12 KB
/
makefile.native
File metadata and controls
42 lines (34 loc) · 1.12 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
# there is no reason to use this makefile manually
.PHONY: build clean
ifeq (,$(PLATFORM))
$(error please specify PLATFORM, eg. make PLATFORM=tg5040)
endif
.EXPORT_ALL_VARIABLES:
# pseudo toolchain
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
CROSS_COMPILE=/usr/bin/
PREFIX=/usr
endif
ifeq ($(UNAME_S),Darwin)
# TODO: brew installs gcc to e.g. /opt/homebrew/bin/gcc-14, but none of our makefiles support the suffix.
# For now, just manually symlink all the build tools to a suffix-less path: sudo ./workspace/desktop/macos_create_gcc_symlinks.sh
# and make with: make setup common PLATFORM=desktop
# From brew we need at least: brew install sdl2_image sdl2_ttf gcc make libsamplerate sqlite
CROSS_COMPILE=/usr/local/bin/
PREFIX=/opt/homebrew
endif
PREFIX_LOCAL=/var/tmp/nextui
UNION_PLATFORM=desktop
all:
clean:
cd workspace && make clean
build:
COMPILE_CORES=$(COMPILE_CORES) cd workspace && make
build-cores:
COMPILE_CORES=$(COMPILE_CORES) cd workspace && make cores
build-core:
ifndef CORE
$(error CORE is not set)
endif
COMPILE_CORES=$(COMPILE_CORES) CORE=$(CORE) cd workspace && make core