aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortwinaphex2018-12-27 23:18:55 +0100
committertwinaphex2018-12-27 23:18:55 +0100
commit4fd103734b789f5b68df0ca7ebed3d36aba59477 (patch)
tree1ae1e876c06de8a2869961f85026d979d4942a35 /Makefile
parent09e85e3e49feb9c0f7b95c5f53ca1a72989a94f2 (diff)
downloadsnesemu-4fd103734b789f5b68df0ca7ebed3d36aba59477.tar.gz
snesemu-4fd103734b789f5b68df0ca7ebed3d36aba59477.tar.bz2
snesemu-4fd103734b789f5b68df0ca7ebed3d36aba59477.zip
Buildfixes for MSVC + add MSVC 2008
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 29 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ca4e440..c23f4f4 100644
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,6 @@ LIBM :=
else
LIBM := -lm
endif
-LDFLAGS :=
LIBS :=
ifeq ($(platform), unix)
@@ -275,6 +274,10 @@ BIN := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/bin")
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib
+WindowsSdkDirInc := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
+WindowsSdkDirInc ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
+
+INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)"
export INCLUDE := $(INCLUDE)
export LIB := $(LIB);$(WindowsSdkDir)
TARGET := $(TARGET_NAME)_libretro.dll
@@ -282,6 +285,27 @@ PSS_STYLE :=2
LDFLAGS += -DLL
OLD_GCC = 1
+# Windows MSVC 2005 x86
+else ifeq ($(platform), windows_msvc2005_x86)
+ CC = cl.exe
+ CXX = cl.exe
+
+PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH)
+PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")
+INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/include")
+LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/lib")
+BIN := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/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
+
# Windows MSVC 2003 x86
else ifeq ($(platform), windows_msvc2003_x86)
CC = cl.exe
@@ -352,13 +376,15 @@ ifeq ($(LAGFIX),1)
FLAGS += -DLAGFIX
endif
+FLAGS += $(INCFLAGS_PLATFORM)
+
ifeq ($(platform), psp1)
INCFLAGS += -I$(shell psp-config --pspsdk-path)/include
endif
OBJECTS := $(SOURCES_C:.c=.o)
-LDFLAGS += $(fpic) $(SHARED)
+LDFLAGS += $(fpic)
FLAGS += $(fpic)
@@ -394,9 +420,8 @@ $(TARGET): $(OBJECTS)
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJECTS)
else
- $(CC) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS) $(LIBS)
+ $(LD) $(LINKOUT)$@ $(SHARED) $(OBJECTS) $(LDFLAGS) $(LIBS)
endif
- @echo "** BUILD SUCCESSFUL! GG NO RE **"
clean:
rm -f $(TARGET) $(OBJECTS)