1 diff '--color=auto' -rupN libretro-blastem.orig/Makefile libretro-blastem/Makefile
2 --- libretro-blastem.orig/Makefile 2021-11-14 09:30:18.467211593 +0100
3 +++ libretro-blastem/Makefile 2021-11-14 09:37:57.666454954 +0100
4 @@ -6,6 +6,9 @@ OS:=$(shell uname -s)
11 BUNDLED_LIBZ:=zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/gzclose.o zlib/gzlib.o zlib/gzread.o\
12 zlib/gzwrite.o zlib/infback.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
14 @@ -31,8 +34,8 @@ SDL2_PREFIX:="sdl/x86_64-w64-mingw32"
17 GLEW32S_LIB:=$(GLEW_PREFIX)/lib/Release/$(GLUDIR)/glew32s.lib
18 -CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wpointer-arith -Werror=pointer-arith
19 -LDFLAGS:=-lm -lmingw32 -lws2_32 -mwindows
20 +CFLAGS+= -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wpointer-arith -Werror=pointer-arith
21 +LDFLAGS+= -lm -lmingw32 -lws2_32 -mwindows
22 ifneq ($(MAKECMDGOALS),libblastem.dll)
23 CFLAGS+= -I"$(SDL2_PREFIX)/include/SDL2" -I"$(GLEW_PREFIX)/include" -DGLEW_STATIC
24 LDFLAGS+= $(GLEW32S_LIB) -L"$(SDL2_PREFIX)/lib" -lSDL2main -lSDL2 -lopengl32 -lglu32
25 @@ -47,7 +50,7 @@ NET:=net.o
28 HAS_PROC:=$(shell if [ -d /proc ]; then /bin/echo -e -DHAS_PROC; fi)
29 -CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wpointer-arith -Werror=pointer-arith $(HAS_PROC) -DHAVE_UNISTD_H
30 +CFLAGS+= -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wpointer-arith -Werror=pointer-arith $(HAS_PROC) -DHAVE_UNISTD_H
34 @@ -89,10 +92,10 @@ ifdef USE_GLES
36 GLES_LIB:=$(shell pkg-config --libs glesv2)
38 -LDFLAGS:=-lm $(GLES_LIB)
39 +LDFLAGS+= -lm $(GLES_LIB)
41 CFLAGS+= -DGLEW_STATIC -Iglew/include
42 -LDFLAGS:=-lm glew/lib/libGLEW.a
43 +LDFLAGS+= -lm glew/lib/libGLEW.a
47 @@ -111,10 +114,10 @@ CFLAGS+= -I$(SDL_INCLUDE_PATH)
50 ifeq ($(MAKECMDGOALS),libblastem.$(SO))
54 CFLAGS:=$(shell pkg-config --cflags-only-I $(LIBS)) $(CFLAGS)
55 -LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS))
56 +LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS)) $(LDFLAGS)