Mercurial > hg > dmlib
view Makefile.cross-mingw @ 2592:70b589a22495
Sync some changes from th-libs/th_args.c
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 30 Dec 2022 10:24:20 +0200 |
parents | 8ab923fe23ef |
children | 669b71e8b868 |
line wrap: on
line source
### ### For Win32/Win64 version cross-compilation via MinGW ### compiler suite under Linux/Unix ### # # This Makefile assumes that you have MinGW installed under /usr # the way Debian MinGW packages do. It also assumes that you have # built/installed libogg, Tremor, libpng16, SDL2 ad SDL2_ttf under # __ /usr/local __ (not /usr!) in similar fashion. # # For differing configurations you will have to either edit this # file or alternatively provide make parameters, e.g. # # make -f Makefile.cross-mingw MINGW=64 BINTOOL_PREFIX=foo-bar-zoo # # NOTE! If you want to define the default path for C64 chargen # ROM image file, you can set it with this define and/or Make # parameter. Do take note of the somewhat peculiar quotation and # escape of backlash '\'. Example: (notice the single quotes) # # make -f Makefile.cross-mingw CHARGEN='C:\\VICE-3.5\\C64\\chargen' # ifneq ($(CHARGEN),) CFLAGS += -DDM_DEF_CHARGEN='"$(CHARGEN)"' else CFLAGS += -DDM_DEF_CHARGEN='"C:\\VICE-3.5\\C64\\chargen"' endif ifeq ($(MINGW),64) BINTOOL_PREFIX ?= x86_64-w64-mingw32- MINGW_SYS_PATH ?= /usr/x86_64-w64-mingw32 MINGW_LOCAL_PATH ?= /usr/local/x86_64-w64-mingw32 OBJPATH ?= ./obj/win64/ else BINTOOL_PREFIX ?= i686-w64-mingw32- MINGW_SYS_PATH ?= /usr/i686-w64-mingw32 MINGW_LOCAL_PATH ?= /usr/local/i686-w64-mingw32 OBJPATH ?= ./obj/win32/ endif DMLIB ?= ./ BINPATH ?= ./exe/ BINEXT ?= .exe CC = $(BINTOOL_PREFIX)gcc AR = $(BINTOOL_PREFIX)ar RANLIB = $(BINTOOL_PREFIX)ranlib RM ?= rm SDL_CFLAGS ?= $(shell $(MINGW_LOCAL_PATH)/bin/sdl2-config --cflags) SDL_LDFLAGS ?= $(shell $(MINGW_LOCAL_PATH)/bin/sdl2-config --libs) SDL_TTF_CFLAGS ?= SDL_TTF_LDFLAGS ?= -lSDL2_ttf TREMOR_CFLAGS ?= -I$(MINGW_LOCAL_PATH)/include/tremor TREMOR_LDFLAGS ?= $(MINGW_LOCAL_PATH)/lib/libvorbisidec.a $(MINGW_LOCAL_PATH)/lib/libogg.a LIBPNG_CFLAGS ?= -I$(MINGW_LOCAL_PATH)/include LIBPNG_LDFLAGS ?= $(MINGW_LOCAL_PATH)/lib/libpng.a ZLIB_CFLAGS ?= #ZLIB_LDFLAGS ?= $(MINGW_LOCAL_PATH)/lib/libz.a ZLIB_LDFLAGS ?= $(MINGW_SYS_PATH)/lib/libz.a TOOL_LDFLAGS ?= -mconsole -lmingw32 include $(DMLIB)Makefile.gen