mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
(Libretro test) Add linux-portable target
This commit is contained in:
parent
3aaf7b8368
commit
40f12007aa
@ -17,11 +17,18 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
TARGET_NAME := test
|
TARGET_NAME := test
|
||||||
|
LIBM = -lm
|
||||||
|
|
||||||
ifeq ($(platform), unix)
|
ifeq ($(platform), unix)
|
||||||
TARGET := $(TARGET_NAME)_libretro.so
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
|
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
|
||||||
|
else ifeq ($(platform), linux-portable)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
|
fpic := -fPIC -nostdlib
|
||||||
|
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
|
||||||
|
LIBM :=
|
||||||
|
LDFLAGS += -L. -lmusl
|
||||||
else ifeq ($(platform), osx)
|
else ifeq ($(platform), osx)
|
||||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
@ -46,6 +53,8 @@ else
|
|||||||
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=link.T -Wl,--no-undefined
|
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=link.T -Wl,--no-undefined
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LDFLAGS += $(LIBM)
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
CFLAGS += -O0 -g
|
CFLAGS += -O0 -g
|
||||||
else
|
else
|
||||||
@ -64,7 +73,7 @@ endif
|
|||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
$(CC) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJECTS) -lm
|
$(CC) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -c -o $@ $<
|
$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
Loading…
x
Reference in New Issue
Block a user