Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Rubberduckycooly
GitHub Repository: Rubberduckycooly/RSDKv5-Decompilation
Path: blob/master/makefiles/Windows.cfg
773 views
# this is gonna assume MINGW
STATIC = 0
RSDK_SUFFIX = .exe
GAME_SUFFIX = .dll

RSDK_CFLAGS += -mwindows  -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive 
RSDK_LDFLAGS += -static -static-libgcc -static-libstdc++

SUBSYSTEM ?= DX9

ifeq ($(SUBSYSTEM),OGL) 
	# VIDEO: OGL
	# INPUTS: Keyboard and GLFW
	# AUDIO: XAudio
	RSDK_SOURCES += dependencies/ogl/glad/src/glad
	RSDK_LIBS += -lglfw
	RSDK_INCLUDES += -I./dependencies/ogl/glad/include

	RSDK_CFLAGS += `$(PKGCONFIG) --cflags --static sdl2 ogg theora`
	RSDK_LIBS += `$(PKGCONFIG) --libs --static sdl2 ogg theora` -lxaudio2_8 
endif

ifeq ($(SUBSYSTEM),DX9)
	# actually do we need to do anything here????
	# VIDEO: DX9
	# INPUTS: Keyboard, XInput, RawInput
	# AUDIO: XAudio
	RSDK_CFLAGS += `$(PKGCONFIG) --cflags --static ogg theora`
	RSDK_LIBS += `$(PKGCONFIG) --libs --static ogg theora` -ld3d9 -lxinput -lcomctl32 -lgdi32 -lWinmm -lole32 -lxaudio2_8 -ld3dcompiler -lksuser
endif

ifeq ($(SUBSYSTEM),SDL2)
	# EVERYTHING: SDL2
	RSDK_CFLAGS += `$(PKGCONFIG) --cflags --static sdl2 ogg theora`
	RSDK_LIBS += `$(PKGCONFIG) --libs --static sdl2 ogg theora`
endif 


RSDK_PRELINK := win-res

ifeq ($(RSDK_REVISION),3)
RSDK_LIBS += RSDKv5U/RSDKv5U.res
win-res:
	@windres -i RSDKv5U/RSDKv5U.rc -o RSDKv5U/RSDKv5U.res -O coff 
else
RSDK_LIBS += RSDKv5/RSDKv5.res
win-res:
	@windres -i RSDKv5/RSDKv5.rc -o RSDKv5/RSDKv5.res -O coff 
endif