mirror of
https://github.com/libretro/libretro-prboom.git
synced 2024-11-30 11:40:23 +00:00
Update Makefile
This commit is contained in:
parent
0885abb6e8
commit
54167b0a3a
68
Makefile
68
Makefile
@ -239,7 +239,53 @@ else ifeq ($(platform), gcw0)
|
||||
fpic := -fPIC
|
||||
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,-no-undefined
|
||||
CFLAGS += -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
|
||||
# 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
|
||||
else
|
||||
EXT?=dll
|
||||
TARGET := $(TARGET_NAME)_libretro.$(EXT)
|
||||
@ -279,20 +325,34 @@ DEFINES = $(COREDEFINES)
|
||||
ifeq ($(platform), sncps3)
|
||||
WARNINGS_DEFINES =
|
||||
CODE_DEFINES =
|
||||
else ifneq (,$(findstring msvc,$(platform)))
|
||||
WARNINGS_DEFINES =
|
||||
CODE_DEFINES =
|
||||
else
|
||||
WARNINGS_DEFINES = -Wall -W -Wno-unused-parameter
|
||||
CODE_DEFINES = -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
COMMON_DEFINES += $(CODE_DEFINES) $(WARNINGS_DEFINES) $(fpic)
|
||||
COMMON_DEFINES += $(CODE_DEFINES) $(WARNINGS_DEFINES) $(fpic) $(INCFLAGS) $(INCFLAGS_PLATFORM)
|
||||
|
||||
CFLAGS += $(DEFINES) $(COMMON_DEFINES)
|
||||
|
||||
OBJOUT = -o
|
||||
LINKOUT = -o
|
||||
|
||||
ifneq (,$(findstring msvc,$(platform)))
|
||||
OBJOUT = -Fo
|
||||
LINKOUT = -out:
|
||||
LD = link.exe
|
||||
else
|
||||
LD = $(CC)
|
||||
endif
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(INCFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
ifeq ($(platform), theos_ios)
|
||||
COMMON_FLAGS := -DIOS $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error
|
||||
COMMON_FLAGS := -DIOS $(COMMON_DEFINES) -I$(THEOS_INCLUDE_PATH) -Wno-error
|
||||
$(LIBRARY_NAME)_CFLAGS += $(COMMON_FLAGS) $(CFLAGS)
|
||||
${LIBRARY_NAME}_FILES = $(SOURCES_C)
|
||||
include $(THEOS_MAKE_PATH)/library.mk
|
||||
@ -303,7 +363,7 @@ $(TARGET): $(OBJECTS)
|
||||
ifeq ($(STATIC_LINKING), 1)
|
||||
$(AR) rcs $@ $(OBJECTS)
|
||||
else
|
||||
$(CC) $(fpic) $(SHARED) $(INCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
$(LD) $(fpic) $(SHARED) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user