From 9087b367b6bc57d997532cc04e8e7f037f2099cb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 5 Sep 2017 00:06:07 +0200 Subject: [PATCH] Start adding D3D8 rules --- Makefile.common | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/Makefile.common b/Makefile.common index f6c4233ca8..bf078b88a8 100644 --- a/Makefile.common +++ b/Makefile.common @@ -628,7 +628,6 @@ ifeq ($(HAVE_RSOUND), 1) endif ifeq ($(HAVE_DSOUND), 1) - HAVE_DIRECTX=1 OBJ += audio/drivers/dsound.o DEFINES += -DHAVE_DSOUND LIBS += -ldxguid -ldsound @@ -855,7 +854,6 @@ endif ifeq ($(HAVE_DINPUT), 1) LIBS += -ldinput8 -ldxguid -lole32 - HAVE_DIRECTX=1 DEFINES += -DHAVE_DINPUT OBJ += input/drivers/dinput.o \ input/drivers_joypad/dinput_joypad.o @@ -1236,22 +1234,39 @@ ifeq ($(HAVE_CG), 1) endif ifeq ($(HAVE_D3D9), 1) - OBJ += gfx/drivers/d3d.o \ - gfx/common/d3d_common.o \ - gfx/drivers_font/d3d_w32_font.o \ - gfx/drivers_context/d3d_ctx.o - HAVE_DIRECTX=1 - DEFINES += -DHAVE_D3D -DHAVE_D3D9 + HAVE_D3D_COMMON = 1 + DEFINES += -DHAVE_D3D9 LIBS += -ld3d9 -ld3dx9 -ldxguid - ifeq ($(HAVE_MENU_COMMON), 1) - OBJ += menu/drivers_display/menu_display_d3d.o - endif - ifeq ($(HAVE_CG), 1) LIBS += -lcgD3D9 OBJ += gfx/drivers_renderchain/d3d9_cg_renderchain.o endif + + ifeq ($(HAVE_HLSL), 1) + LIBS += -lcgD3D9 + OBJ += gfx/drivers_renderchain/d3d9_hlsl_renderchain.o + endif +endif + +ifeq ($(HAVE_D3D8), 1) + HAVE_D3D_COMMON = 1 + DEFINES += -DHAVE_D3D8 + LIBS += -ld3d8 -ld3dx8 -ldxguid + + OBJ += gfx/drivers_renderchain/d3d8_renderchain.o +endif + +ifeq $(HAVE_D3D_COMMON), 1) + DEFINES += -DHAVE_D3D + OBJ += gfx/drivers/d3d.o \ + gfx/common/d3d_common.o \ + gfx/drivers_font/d3d_w32_font.o \ + gfx/drivers_context/d3d_ctx.o + + ifeq ($(HAVE_MENU_COMMON), 1) + OBJ += menu/drivers_display/menu_display_d3d.o + endif endif #ifeq ($(HAVE_LIBXML2), 1) @@ -1493,10 +1508,6 @@ ifeq ($(HAVE_COMPRESSION), 1) OBJ += tasks/task_decompress.o endif -#ifeq ($(HAVE_DIRECTX), 1) - #$DEFINES += -I"$(DXSDK_DIR)/Include" -#endif - ifeq ($(HAVE_COCOA),1) DEFINES += -DHAVE_MAIN OBJ += input/drivers/cocoa_input.o \