2014-03-15 16:59:03 +00:00
|
|
|
#
|
|
|
|
# win32/Makefile.cfg for SRB2/Minwgw
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
#Mingw, if you don't know, that's Win32/Win64
|
|
|
|
#
|
|
|
|
|
|
|
|
ifdef MINGW64
|
2018-11-20 01:44:22 +00:00
|
|
|
HAVE_LIBGME=1
|
|
|
|
LIBGME_CFLAGS=-I../libs/gme/include
|
|
|
|
LIBGME_LDFLAGS=-L../libs/gme/win64 -lgme
|
2019-01-02 07:37:48 +00:00
|
|
|
ifdef HAVE_OPENMPT
|
2018-09-18 16:31:47 +00:00
|
|
|
LIBOPENMPT_CFLAGS?=-I../libs/libopenmpt/inc
|
2019-01-03 19:54:22 +00:00
|
|
|
LIBOPENMPT_LDFLAGS?=-L../libs/libopenmpt/lib/x86_64/mingw -lopenmpt
|
2018-09-20 03:03:35 +00:00
|
|
|
endif
|
2019-08-04 11:03:57 +00:00
|
|
|
ifndef NOMIXERX
|
|
|
|
HAVE_MIXERX=1
|
|
|
|
SDL_CFLAGS?=-I../libs/SDL2/x86_64-w64-mingw32/include/SDL2 -I../libs/SDLMixerX/x86_64-w64-mingw32/include/SDL2 -Dmain=SDL_main
|
|
|
|
SDL_LDFLAGS?=-L../libs/SDL2/x86_64-w64-mingw32/lib -L../libs/SDLMixerX/x86_64-w64-mingw32/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
|
|
|
|
else
|
2016-05-19 15:51:05 +00:00
|
|
|
SDL_CFLAGS?=-I../libs/SDL2/x86_64-w64-mingw32/include/SDL2 -I../libs/SDL2_mixer/x86_64-w64-mingw32/include/SDL2 -Dmain=SDL_main
|
|
|
|
SDL_LDFLAGS?=-L../libs/SDL2/x86_64-w64-mingw32/lib -L../libs/SDL2_mixer/x86_64-w64-mingw32/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
|
2019-08-04 11:03:57 +00:00
|
|
|
endif
|
2014-03-15 16:59:03 +00:00
|
|
|
else
|
|
|
|
HAVE_LIBGME=1
|
|
|
|
LIBGME_CFLAGS=-I../libs/gme/include
|
|
|
|
LIBGME_LDFLAGS=-L../libs/gme/win32 -lgme
|
2019-01-02 07:37:48 +00:00
|
|
|
ifdef HAVE_OPENMPT
|
2018-09-18 16:31:47 +00:00
|
|
|
LIBOPENMPT_CFLAGS?=-I../libs/libopenmpt/inc
|
2019-01-03 19:54:22 +00:00
|
|
|
LIBOPENMPT_LDFLAGS?=-L../libs/libopenmpt/lib/x86/mingw -lopenmpt
|
2018-09-20 03:03:35 +00:00
|
|
|
endif
|
2019-08-04 11:03:57 +00:00
|
|
|
ifndef NOMIXERX
|
|
|
|
HAVE_MIXERX=1
|
|
|
|
SDL_CFLAGS?=-I../libs/SDL2/i686-w64-mingw32/include/SDL2 -I../libs/SDLMixerX/i686-w64-mingw32/include/SDL2 -Dmain=SDL_main
|
|
|
|
SDL_LDFLAGS?=-L../libs/SDL2/i686-w64-mingw32/lib -L../libs/SDLMixerX/i686-w64-mingw32/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
|
|
|
|
else
|
2018-08-26 18:35:22 +00:00
|
|
|
SDL_CFLAGS?=-I../libs/SDL2/i686-w64-mingw32/include/SDL2 -I../libs/SDL2_mixer/i686-w64-mingw32/include/SDL2 -Dmain=SDL_main
|
|
|
|
SDL_LDFLAGS?=-L../libs/SDL2/i686-w64-mingw32/lib -L../libs/SDL2_mixer/i686-w64-mingw32/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
|
|
|
|
endif
|
2019-08-04 11:03:57 +00:00
|
|
|
endif
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
ifndef NOASM
|
|
|
|
USEASM=1
|
|
|
|
endif
|
|
|
|
|
2019-04-16 19:05:09 +00:00
|
|
|
ifndef NONET
|
2018-11-15 02:01:04 +00:00
|
|
|
ifndef MINGW64 #miniupnc is broken with MINGW64
|
2014-03-15 16:59:03 +00:00
|
|
|
HAVE_MINIUPNPC=1
|
2019-04-16 19:05:09 +00:00
|
|
|
endif
|
2018-11-14 01:32:18 +00:00
|
|
|
endif
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
OPTS=-DSTDC_HEADERS
|
|
|
|
|
|
|
|
ifndef GCC44
|
|
|
|
#OPTS+=-mms-bitfields
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef SDL
|
|
|
|
OPTS+=-D_WINDOWS
|
|
|
|
endif
|
|
|
|
OPTS+=-D__USE_MINGW_ANSI_STDIO=0
|
|
|
|
|
|
|
|
ifndef SDL
|
|
|
|
LIBS+=-lmingw32 -mwindows -ldinput -ldxguid -lgdi32 -lwinmm
|
|
|
|
endif
|
|
|
|
|
|
|
|
LIBS+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
|
|
|
|
ifdef MINGW64
|
|
|
|
LIBS+=-lws2_32
|
|
|
|
else
|
|
|
|
ifdef NO_IPV6
|
|
|
|
LIBS+=-lwsock32
|
|
|
|
else
|
|
|
|
LIBS+=-lws2_32
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# name of the exefile
|
|
|
|
ifdef SDL
|
|
|
|
EXENAME?=srb2win.exe
|
2014-11-12 00:55:07 +00:00
|
|
|
else
|
|
|
|
EXENAME?=srb2dd.exe
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SDL
|
|
|
|
i_system_o+=$(OBJDIR)/SRB2.res
|
2017-12-27 01:24:08 +00:00
|
|
|
#i_main_o+=$(OBJDIR)/win_dbg.o
|
2014-03-15 16:59:03 +00:00
|
|
|
ifndef NOHW
|
|
|
|
OPTS+=-DUSE_WGL_SWAP
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
D_FILES+=$(D_DIR)/fmodex.dll
|
|
|
|
CFLAGS+=-I../libs/fmodex/inc
|
|
|
|
LDFLAGS+=-L../libs/fmodex/lib
|
|
|
|
ifdef MINGW64
|
|
|
|
LIBS+=-lfmodex64_vc
|
|
|
|
else
|
|
|
|
LIBS+=-lfmodex_vc
|
|
|
|
endif
|
|
|
|
i_cdmus_o=$(OBJDIR)/win_cd.o
|
|
|
|
i_net_o=$(OBJDIR)/win_net.o
|
|
|
|
i_system_o=$(OBJDIR)/win_sys.o $(OBJDIR)/SRB2.res
|
|
|
|
i_sound_o=$(OBJDIR)/win_snd.o
|
2017-12-27 01:42:37 +00:00
|
|
|
i_main_o=$(OBJDIR)/win_main.o
|
|
|
|
#i_main_o+=$(OBJDIR)/win_dbg.o
|
2014-03-15 16:59:03 +00:00
|
|
|
OBJS=$(OBJDIR)/dx_error.o $(OBJDIR)/fabdxlib.o $(OBJDIR)/win_vid.o $(OBJDIR)/win_dll.o
|
|
|
|
endif
|
|
|
|
|
2016-11-06 20:11:02 +00:00
|
|
|
|
|
|
|
ZLIB_CFLAGS?=-I../libs/zlib
|
|
|
|
ifdef MINGW64
|
|
|
|
ZLIB_LDFLAGS?=-L../libs/zlib/win32 -lz64
|
|
|
|
else
|
|
|
|
ZLIB_LDFLAGS?=-L../libs/zlib/win32 -lz32
|
|
|
|
endif
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
ifndef NOPNG
|
|
|
|
ifndef PNG_CONFIG
|
2019-12-05 17:33:18 +00:00
|
|
|
PNG_CFLAGS?=-I../libs/libpng-src
|
2014-03-15 16:59:03 +00:00
|
|
|
ifdef MINGW64
|
2016-11-06 20:11:02 +00:00
|
|
|
PNG_LDFLAGS?=-L../libs/libpng-src/projects -lpng64
|
2014-03-15 16:59:03 +00:00
|
|
|
else
|
2016-11-06 20:11:02 +00:00
|
|
|
PNG_LDFLAGS?=-L../libs/libpng-src/projects -lpng32
|
2014-03-15 16:59:03 +00:00
|
|
|
endif #MINGW64
|
|
|
|
endif #PNG_CONFIG
|
|
|
|
endif #NOPNG
|
|
|
|
|
|
|
|
ifdef GETTEXT
|
|
|
|
ifndef CCBS
|
|
|
|
MSGFMT?=../libs/gettext/bin32/msgfmt.exe
|
|
|
|
endif
|
|
|
|
ifdef MINGW64
|
|
|
|
CPPFLAGS+=-I../libs/gettext/include64
|
|
|
|
LDFLAGS+=-L../libs/gettext/lib64
|
|
|
|
LIBS+=-lmingwex
|
|
|
|
else
|
|
|
|
CPPFLAGS+=-I../libs/gettext/include32
|
|
|
|
LDFLAGS+=-L../libs/gettext/lib32
|
|
|
|
STATIC_GETTEXT=1
|
|
|
|
endif #MINGW64
|
|
|
|
ifdef STATIC_GETTEXT
|
|
|
|
LIBS+=-lasprintf -lintl
|
|
|
|
else
|
|
|
|
LIBS+=-lintl.dll
|
|
|
|
endif #STATIC_GETTEXT
|
|
|
|
endif #GETTEXT
|
|
|
|
|
|
|
|
ifdef HAVE_MINIUPNPC
|
|
|
|
CPPFLAGS+=-I../libs/ -DSTATIC_MINIUPNPC
|
|
|
|
ifdef MINGW64
|
|
|
|
LDFLAGS+=-L../libs/miniupnpc/mingw64
|
|
|
|
else
|
|
|
|
LDFLAGS+=-L../libs/miniupnpc/mingw32
|
|
|
|
endif #MINGW64
|
|
|
|
endif
|