mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -10:00
The compile matrix's stubs move into tools/platform_stubs and the matrix takes them from there. Where both trees had a header, the one left declares what both sets of users need: ctr/3ds/os.h the clock and the memory-region queries, ps3/ppu-lv2.h the scalar types and the lv2syscall1 macro. The libnx stub carries the pad, Joy-Con and rumble surface switch_joypad.c uses, and samples/input/switch_joypad builds against it instead of a copy of its own. Every compile-matrix lane gives the verdict it gave before.
33 lines
978 B
Makefile
33 lines
978 B
Makefile
# The Switch joypad driver (the libnx build), against the tree's libnx
|
|
# stubs, with the libnx calls defined by the test, which includes the
|
|
# driver's source itself.
|
|
TARGET := switch_joypad_test
|
|
|
|
RARCH_DIR := ../../..
|
|
LIBRETRO_COMM_DIR := $(RARCH_DIR)/libretro-common
|
|
|
|
CFLAGS += -Wall -std=gnu99 -g1 -O1 -DRARCH_INTERNAL -DSWITCH -DHAVE_LIBNX \
|
|
-I$(RARCH_DIR)/tools/platform_stubs/libnx -I$(RARCH_DIR) -I$(LIBRETRO_COMM_DIR)/include
|
|
|
|
ifneq ($(SANITIZER),)
|
|
CFLAGS := -fsanitize=$(SANITIZER) -fno-omit-frame-pointer $(CFLAGS)
|
|
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
|
|
endif
|
|
ifneq ($(SAN),)
|
|
CFLAGS := -fsanitize=$(SAN) -fno-omit-frame-pointer $(CFLAGS)
|
|
LDFLAGS := -fsanitize=$(SAN) $(LDFLAGS)
|
|
endif
|
|
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): switch_joypad_test.c $(RARCH_DIR)/input/drivers_joypad/switch_joypad.c
|
|
$(CC) $(CFLAGS) -o $@ switch_joypad_test.c $(LDFLAGS)
|
|
|
|
check: all
|
|
./$(TARGET)
|
|
|
|
clean:
|
|
rm -f $(TARGET) $(TARGET).exe
|
|
|
|
.PHONY: all check clean
|