mirror of
https://github.com/libretro/gambatte-libretro.git
synced 2024-11-23 07:49:48 +00:00
Update Makefiles
This commit is contained in:
parent
6509a8adca
commit
b37c58351f
@ -231,7 +231,52 @@ else ifeq ($(platform), gcw0)
|
|||||||
PLATFORM_DEFINES := -DCC_RESAMPLER -DCC_RESAMPLER_NO_HIGHPASS
|
PLATFORM_DEFINES := -DCC_RESAMPLER -DCC_RESAMPLER_NO_HIGHPASS
|
||||||
CFLAGS += -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
|
CFLAGS += -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
|
||||||
CXXFLAGS += $(CFLAGS)
|
CXXFLAGS += $(CFLAGS)
|
||||||
|
# Windows MSVC 2010 x64
|
||||||
|
else ifeq ($(platform), windows_msvc2010_x64)
|
||||||
|
CC = cl.exe
|
||||||
|
CXX = cl.exe
|
||||||
|
|
||||||
|
PATH := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/bin/amd64"):$(PATH)
|
||||||
|
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE")
|
||||||
|
LIB := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/lib/amd64")
|
||||||
|
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/include")
|
||||||
|
|
||||||
|
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib/x64
|
||||||
|
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib/x64
|
||||||
|
|
||||||
|
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
|
||||||
|
PSS_STYLE :=2
|
||||||
|
LDFLAGS += -DLL
|
||||||
|
# Windows MSVC 2010 x86
|
||||||
|
else ifeq ($(platform), windows_msvc2010_x86)
|
||||||
|
CC = cl.exe
|
||||||
|
CXX = cl.exe
|
||||||
|
|
||||||
|
PATH := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/bin"):$(PATH)
|
||||||
|
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE")
|
||||||
|
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/lib")
|
||||||
|
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/include")
|
||||||
|
|
||||||
|
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
|
||||||
|
PSS_STYLE :=2
|
||||||
|
LDFLAGS += -DLL
|
||||||
# Windows
|
# Windows
|
||||||
else
|
else
|
||||||
TARGET := $(TARGET_NAME)_libretro.dll
|
TARGET := $(TARGET_NAME)_libretro.dll
|
||||||
@ -275,11 +320,16 @@ CXXFLAGS += $(fpic) $(DEFINES)
|
|||||||
|
|
||||||
LIBS :=
|
LIBS :=
|
||||||
|
|
||||||
%.o: %.cpp
|
OBJOUT = -o
|
||||||
$(CXX) -c -o $@ $< $(CPPFLAGS) $(CXXFLAGS) $(INCFLAGS)
|
LINKOUT = -o
|
||||||
|
|
||||||
%.o: %.c
|
ifneq (,$(findstring msvc,$(platform)))
|
||||||
$(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS) $(INCFLAGS)
|
OBJOUT = -Fo
|
||||||
|
LINKOUT = -out:
|
||||||
|
LD = link.exe
|
||||||
|
else
|
||||||
|
LD = $(CC)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(platform), theos_ios)
|
ifeq ($(platform), theos_ios)
|
||||||
COMMON_FLAGS := -DIOS $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error
|
COMMON_FLAGS := -DIOS $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error
|
||||||
@ -302,9 +352,14 @@ $(TARGET): $(OBJS)
|
|||||||
ifeq ($(STATIC_LINKING), 1)
|
ifeq ($(STATIC_LINKING), 1)
|
||||||
$(AR) rcs $@ $(OBJS)
|
$(AR) rcs $@ $(OBJS)
|
||||||
else
|
else
|
||||||
$(CXX) -o $@ $(SHARED) $(OBJS) $(LDFLAGS) $(LIBS)
|
$(LD) $(LINKOUT)$@ $(SHARED) $(OBJS) $(LDFLAGS) $(LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
%.o: %.cpp
|
||||||
|
$(CXX) -c $(OBJOUT)$@ $< $(CPPFLAGS) $(CXXFLAGS) $(INCFLAGS)
|
||||||
|
|
||||||
|
%.o: %.c
|
||||||
|
$(CC) -c $(OBJOUT)$@ $< $(CPPFLAGS) $(CFLAGS) $(INCFLAGS)
|
||||||
|
|
||||||
clean-objs:
|
clean-objs:
|
||||||
rm -f $(OBJS)
|
rm -f $(OBJS)
|
||||||
|
Loading…
Reference in New Issue
Block a user