Commit e85de25f authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Fix build for Windows

parent d4d1c4ec
...@@ -372,8 +372,7 @@ else ifeq ($(platform), emscripten) ...@@ -372,8 +372,7 @@ else ifeq ($(platform), emscripten)
else else
EXT ?= dll EXT ?= dll
TARGET := $(TARGET_NAME)_libretro.$(EXT) TARGET := $(TARGET_NAME)_libretro.$(EXT)
SHARED := -shared -shared -static-libgcc -static-libstdc++ -Wl,--version-script=link.T LDFLAGS += -shared -static-libgcc -static-libstdc++ -Wl,--version-script=link.T -lwinmm -lgdi32
LDFLAGS += -lwinmm -lgdi32
GL_LIB := -lopengl32 GL_LIB := -lopengl32
PLATFORM_EXT := win32 PLATFORM_EXT := win32
CC = gcc CC = gcc
...@@ -440,6 +439,8 @@ ifeq ($(FORCE_GLES),1) ...@@ -440,6 +439,8 @@ ifeq ($(FORCE_GLES),1)
else ifneq (,$(findstring gles,$(platform))) else ifneq (,$(findstring gles,$(platform)))
GLES = 1 GLES = 1
GL_LIB := -lGLESv2 GL_LIB := -lGLESv2
else ifeq ($(platform), win)
GL_LIB := -lopengl32
else else
GL_LIB := -lGL GL_LIB := -lGL
endif endif
...@@ -557,12 +558,20 @@ LDFLAGS += $(fpic) ...@@ -557,12 +558,20 @@ LDFLAGS += $(fpic)
OBJECTS := $(SOURCES_CXX:.cpp=.o) $(SOURCES_C:.c=.o) $(SOURCES_ASM:.S=.o) OBJECTS := $(SOURCES_CXX:.cpp=.o) $(SOURCES_C:.c=.o) $(SOURCES_ASM:.S=.o)
ifneq (,$(findstring msvc,$(platform)))
OBJOUT = -Fo
LINKOUT = -out:
LD = link.exe
else
LD = $(CXX)
endif
all: $(TARGET) all: $(TARGET)
$(TARGET): $(OBJECTS) $(TARGET): $(OBJECTS)
ifeq ($(STATIC_LINKING), 1) ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJECTS) $(AR) rcs $@ $(OBJECTS)
else else
$(CXX) $(MFLAGS) $(fpic) $(SHARED) $(LDFLAGS) $(OBJECTS) $(LIBS) $(GL_LIB) -o $@ $(LD) $(MFLAGS) $(fpic) $(SHARED) $(LDFLAGS) $(OBJECTS) $(GL_LIB) $(LIBS) -o $@
endif endif
%.o: %.cpp %.o: %.cpp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment