summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoraliaspider2014-12-09 05:16:09 +0100
committeraliaspider2014-12-09 05:16:09 +0100
commitb69fee8b3139eb26405c20aa3adde166f9034b59 (patch)
tree99cd6453677178d02e28ed867c76a2d440fc6cbc /Makefile
parent3cc3944725700c957b006de6f5a2ee2944d2f525 (diff)
downloadpicogpsp-b69fee8b3139eb26405c20aa3adde166f9034b59.tar.gz
picogpsp-b69fee8b3139eb26405c20aa3adde166f9034b59.tar.bz2
picogpsp-b69fee8b3139eb26405c20aa3adde166f9034b59.zip
video output now works in statically linked builds.
core can't be used as a shared library yet due to the dynarec not working when compiled with -fPIC
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4228d97..0297ace 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
-TARGET := gpsp_libretro.so
+TARGET := gpsp_libretro
CC = gcc
AR = psp-ar
STATIC_LINKING = 0
-CFLAGS += -fPIC -Werror-implicit-function-declaration
+CFLAGS += -Werror-implicit-function-declaration
CFLAGS += -DPC_BUILD -Wall -m32
CFLAGS += -D__LIBRETRO__
@@ -33,14 +33,18 @@ OBJS += zip.o
OBJS += libretro.o
OBJS += libco/libco.o
-
+ifeq ($(STATIC_LINKING), 1)
+TARGET := $(TARGET).a
+else
+TARGET := $(TARGET).so
+CFLAGS += -fPIC
+endif
ASFLAGS = $(CFLAGS)
INCDIRS := -I.
LDFLAGS += -shared -m32 -Wl,--no-undefined -Wl,--version-script=link.T
LDLIBS += -lz
-
all: $(TARGET)
$(TARGET): $(OBJS)