Commit 5eab61b5 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Create linux-portable target (works)

parent 1455fdd6
......@@ -17,12 +17,20 @@ endif
endif
TARGET_NAME := 2048
LIBM := -lm
fpic=
ifeq ($(platform), unix)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared -Wl,--no-undefined
else ifeq ($(platform), linux-portable)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC -nostdlib
SHARED := -shared -Wl,--no-undefined
LIBM :=
LDFLAGS += -L. -lmusl
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC
......@@ -83,7 +91,7 @@ CFLAGS += -Wall -pedantic $(fpic) $(PLATFORM_DEFINES)
CFLAGS +=
LFLAGS :=
LIBS := -lm
LDFLAGS += $(LIBM)
ifeq ($(platform), qnx)
CFLAGS += -Wc,-std=gnu99
......@@ -115,7 +123,7 @@ $(TARGET): $(OBJECTS)
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJECTS)
else
$(CC) $(fpic) $(SHARED) $(INCLUDES) $(LFLAGS) -o $@ $(OBJECTS) $(LIBS)
$(CC) $(fpic) $(SHARED) $(INCLUDES) $(LFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
endif
%.o: %.c
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment