mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 21:31:04 +00:00
160 lines
3.4 KiB
INI
160 lines
3.4 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
|
|
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
|
|
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 NOASM
|
|
USEASM=1
|
|
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
|
|
|
|
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?=srb2kart.exe
|
|
else
|
|
EXENAME?=srb2kartdd.exe
|
|
endif
|
|
|
|
ifdef SDL
|
|
i_system_o+=$(OBJDIR)/SRB2.res
|
|
#i_main_o+=$(OBJDIR)/win_dbg.o
|
|
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
|
|
i_main_o=$(OBJDIR)/win_main.o
|
|
#i_main_o+=$(OBJDIR)/win_dbg.o
|
|
OBJS=$(OBJDIR)/dx_error.o $(OBJDIR)/fabdxlib.o $(OBJDIR)/win_vid.o $(OBJDIR)/win_dll.o
|
|
endif
|
|
|
|
|
|
ZLIB_CFLAGS?=-I../libs/zlib
|
|
ifdef MINGW64
|
|
ZLIB_LDFLAGS?=-L../libs/zlib/win32 -lz64
|
|
else
|
|
ZLIB_LDFLAGS?=-L../libs/zlib/win32 -lz32
|
|
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 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
|
|
|
|
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
|