Files
SRB2Kart-Saturn/src/win32/Makefile.cfg
T

135 lines
2.9 KiB
INI

#
# win32/Makefile.cfg for SRB2/Minwgw
#
#
#Mingw, if you don't know, that's Win32/Win64
#
ifdef MINGW64
HAVE_LIBGME=1
LIBGME_CFLAGS=-I../libs/gme/include
LIBGME_LDFLAGS=-L../libs/gme/win64 -lgme
ifdef HAVE_OPENMPT
LIBOPENMPT_CFLAGS?=-I../libs/libopenmpt/inc
LIBOPENMPT_LDFLAGS?=-L../libs/libopenmpt/lib/x86_64 -lopenmpt
endif
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
else
HAVE_LIBGME=1
LIBGME_CFLAGS=-I../libs/gme/include
LIBGME_LDFLAGS=-L../libs/gme/win32 -lgme
ifdef HAVE_OPENMPT
LIBOPENMPT_CFLAGS?=-I../libs/libopenmpt/inc
LIBOPENMPT_LDFLAGS?=-L../libs/libopenmpt/lib/x86 -lopenmpt
endif
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
ifndef NONET
ifndef MINGW64 #miniupnc is broken with MINGW64
HAVE_MINIUPNPC=1
endif
endif
ifndef NO_DISCORDRPC
HAVE_DISCORDRPC=1
endif
OPTS=-DSTDC_HEADERS
ifndef GCC44
#OPTS+=-mms-bitfields
endif
OPTS+=-D__USE_MINGW_ANSI_STDIO=0
LIBS+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
ifdef MINGW64
LIBS+=-lws2_32
else
ifdef NO_IPV6
LIBS+=-lwsock32
else
LIBS+=-lws2_32
endif
endif
ifndef MINGW64
CPPFLAGS+=-I../libs/drmingw/include
LDFLAGS+=-L../libs/drmingw/lib/win32
LIBS+=-lmgwhelp -lexchndl
endif
# name of the exefile
EXENAME?=srb2kart-saturn.exe
i_system_o+=$(OBJDIR)/SRB2.res
#i_main_o+=$(OBJDIR)/win_dbg.o
ifndef NOHW
OPTS+=-DUSE_WGL_SWAP
endif
ZLIB_CFLAGS?=-I../libs/zlib
ifdef MINGW64
ZLIB_LDFLAGS?=-L../libs/zlib/win32 -l:libz64.a
else
ZLIB_LDFLAGS?=-L../libs/zlib/win32 -l:libz32.a
endif
ifndef NOPNG
ifndef PNG_CONFIG
PNG_CFLAGS?=-I../libs/libpng-src
ifdef MINGW64
PNG_LDFLAGS?=-L../libs/libpng-src/projects -lpng64
else
PNG_LDFLAGS?=-L../libs/libpng-src/projects -lpng32
endif #MINGW64
endif #PNG_CONFIG
endif #NOPNG
ifdef HAVE_MINIUPNPC
CPPFLAGS+=-I../libs/ -DSTATIC_MINIUPNPC
ifdef MINGW64
LDFLAGS+=-L../libs/miniupnpc/mingw64
else
LDFLAGS+=-L../libs/miniupnpc/mingw32
endif #MINGW64
endif
ifndef NOCURL
CURL_CFLAGS+=-I../libs/curl/include
ifdef MINGW64
CURL_LDFLAGS+=-L../libs/curl/lib64 -lcurl
else
CURL_LDFLAGS+=-L../libs/curl/lib32 -lcurl
endif #MINGW64
endif
ifdef HAVE_DISCORDRPC
ifdef MINGW64
CPPFLAGS+=-I../libs/discord-rpc/win64-dynamic/include
LDFLAGS+=-L../libs/discord-rpc/win64-dynamic/lib
else
CPPFLAGS+=-I../libs/discord-rpc/win32-dynamic/include
LDFLAGS+=-L../libs/discord-rpc/win32-dynamic/lib
endif
LIBS+=-ldiscord-rpc
endif
ifndef MINGW64
LDFLAGS+=-Wl,--large-address-aware
endif
ifndef MINGW64
NOLIBBACKTRACE=1
endif
# disable dynamicbase if under msys2
ifdef MSYSTEM
LDFLAGS+=-Wl,--disable-dynamicbase
endif