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
|
|
|
|
NOASM=1
|
|
|
|
NONX86=1
|
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
|
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
|
2016-05-19 15:51:05 +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
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef NOASM
|
|
|
|
USEASM=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
HAVE_MINIUPNPC=1
|
|
|
|
|
|
|
|
OPTS=-DSTDC_HEADERS
|
|
|
|
|
|
|
|
ifndef GCC44
|
|
|
|
#OPTS+=-mms-bitfields
|
|
|
|
endif
|
|
|
|
|
2014-04-07 13:58:02 +00:00
|
|
|
ifndef MINGW64
|
|
|
|
OPTS+=-gdwarf-2
|
|
|
|
endif
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
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
|
2016-11-06 20:11:02 +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
|