-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathswitch.mk
38 lines (31 loc) · 924 Bytes
/
switch.mk
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
# SDL2 Nintendo Switch
SOURCE_ROOT := .
BUILD_DIR := $(SOURCE_ROOT)/build/
ifeq ($(strip $(LIBTRANSISTOR_HOME)),)
$(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=<path to libtransistor>")
endif
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
SDL2: $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR)
$(MAKE) -C $(BUILD_DIR) install
# "LDFLAGS=-L$(LIBTRANSISTOR_HOME)/build/newlib/aarch64-none-switch/newlib/ -lc -lm" \
$(BUILD_DIR)/Makefile:
mkdir -p $(@D)
cd $(@D); $(realpath $(SOURCE_ROOT))/configure \
"CFLAGS=$(CFLAGS)" \
"CC=$(CC)" "AR=$(AR)" \
"RANLIB=$(RANLIB)" \
--host=aarch64-none-switch \
--disable-audio \
--disable-joystick \
--disable-power \
--disable-filesystem \
--disable-threads \
--disable-cpuinfo \
--enable-timers \
--enable-video \
--disable-shared \
--enable-static \
--prefix=$(LIBTRANSISTOR_HOME)
clean:
rm -rf $(BUILD_DIR)