aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile57
1 files changed, 54 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 186d36a..fb4bb75 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,8 @@ ifeq ($(shell uname -p),powerpc)
endif
else ifneq ($(findstring MINGW,$(shell uname -a)),)
platform = win
+else ifneq ($(findstring SunOS,$(shell uname -a)),)
+ platform = sun
endif
endif
@@ -45,7 +47,13 @@ ifneq ($(GIT_VERSION)," unknown")
endif
DEFS :=
+ifneq (,$(findstring msvc,$(platform)))
+LIBM :=
+else
LIBM := -lm
+endif
+LDFLAGS :=
+LIBS :=
ifeq ($(platform), unix)
TARGET := $(TARGET_NAME)_libretro.so
@@ -58,6 +66,12 @@ else ifeq ($(platform), linux-portable)
SHARED := -shared -Wl,--version-script=link.T
CFLAGS += -fno-builtin -fno-exceptions -ffunction-sections
LIBM :=
+else ifeq ($(platform),sun)
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ SHARED := -shared -z defs
+ CFLAGS += -fno-builtin -fno-exceptions -ffunction-sections
+ CC = gcc
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC
@@ -209,6 +223,12 @@ else ifeq ($(platform), gcw0)
LIBM :=
LOAD_FROM_MEMORY_TEST = 0
CFLAGS += -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
+#Nintendo Classics (Hakchi)
+else ifeq ($(platform), nintendoc)
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
+ CFLAGS += -fno-builtin -fno-exceptions -ffunction-sections -DARM -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
# Windows MSVC 2010 x86
else ifeq ($(platform), windows_msvc2010_x86)
@@ -230,6 +250,28 @@ TARGET := $(TARGET_NAME)_libretro.dll
PSS_STYLE :=2
LDFLAGS += -DLL
OLD_GCC = 1
+
+# Windows MSVC 2003 x86
+else ifeq ($(platform), windows_msvc2003_x86)
+ CC = cl.exe
+ CXX = cl.exe
+
+PATH := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin"):$(PATH)
+PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../IDE")
+INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/include")
+LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS71COMNTOOLS)../../Vc7/lib")
+BIN := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin")
+
+WindowsSdkDir := $(INETSDK)
+
+export INCLUDE := $(INCLUDE);$(INETSDK)/Include;libretro-common/include/compat/msvc
+export LIB := $(LIB);$(WindowsSdkDir);$(INETSDK)/Lib
+TARGET := $(TARGET_NAME)_libretro.dll
+PSS_STYLE :=2
+LDFLAGS += -DLL
+CFLAGS += -D_CRT_SECURE_NO_DEPRECATE
+NO_GCC = 1
+
else
TARGET := $(TARGET_NAME)_libretro.dll
CC = gcc
@@ -309,7 +351,6 @@ endif
%.o: %.c
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
-
ifeq ($(platform), theos_ios)
COMMON_FLAGS := -DIOS $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error
$(LIBRARY_NAME)_CFLAGS += $(COMMON_FLAGS) $(CFLAGS)
@@ -321,11 +362,21 @@ $(TARGET): $(OBJECTS)
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJECTS)
else
- $(CC) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS)
+ $(CC) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS) $(LIBS)
endif
+ifeq ($(platform),nintendoc)
+ @echo "** BUILDING HAKCHI HMOD PACKAGE **"
+ mkdir -p hakchi/etc/libretro/core/ hakchi/etc/libretro/info/ hakchi/etc/preinit.d/
+ rm -f hakchi/etc/libretro/info/*
+ cp $(TARGET_NAME)_libretro.so hakchi/etc/libretro/core/
+ cd hakchi/etc/libretro/info/; wget https://buildbot.libretro.com/assets/frontend/info/$(TARGET_NAME)_libretro.info
+ cd hakchi/; tar -czvf "CORE_$(TARGET_NAME).hmod" *
+endif
+
+
clean:
- rm -f $(TARGET) $(OBJECTS)
+ rm -f $(TARGET) $(OBJECTS) hakchi/CORE_$(TARGET_NAME).hmod
.PHONY: clean
endif