Makefile.w32, Makefile.w64: made them a little bit more flexible by adding

CROSS_COMPILE and TARGET variables.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@280 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-08-17 19:30:35 +00:00
parent 8931642fac
commit 3e6760e6c5
2 changed files with 28 additions and 8 deletions

View File

@ -1,5 +1,5 @@
# GNU Makefile for cross-compiling quakespasm.exe (Win32 : MinGW)
# using cross-toolchains on a linux host / June 21, 2010.
# using cross-toolchains on a linux host / Aug. 17, 2010.
# "make DEBUG=1" builds debug client
# "make WINSOCK2=1" to use WinSock2 api when not using SDL_net. otherwise,
# WinSock 1.1 will be used.
@ -25,9 +25,19 @@ TOPDIR := $(shell pwd)
# Define some build variables
# ---------------------------------------
CC = i686-pc-mingw32-gcc
WINDRES = i686-pc-mingw32-windres
STRIP = i686-pc-mingw32-strip
TARGET=i686-pc-mingw32
CROSS_COMPILE=1
ifeq ($(CROSS_COMPILE),1)
TOOLCHAIN_PREFIX=$(TARGET)-
else
TOOLCHAIN_PREFIX=
endif
CC = $(TOOLCHAIN_PREFIX)gcc
WINDRES = $(TOOLCHAIN_PREFIX)windres
STRIP = $(TOOLCHAIN_PREFIX)strip
#CPUFLAGS= -mtune=i686
#CPUFLAGS= -march=pentium4

View File

@ -1,5 +1,5 @@
# GNU Makefile for cross-compiling quakespasm.exe (Win64 : MinGW-w64)
# using cross-toolchains on a linux host / June 21, 2010.
# using cross-toolchains on a linux host / Aug. 17, 2010.
# "make DEBUG=1" builds debug client
# "make WINSOCK2=0" to use the old WinSock 1.1 api when not using SDL_net.
# otherwise, WinSock2 api will be used.
@ -25,9 +25,19 @@ TOPDIR := $(shell pwd)
# Define some build variables
# ---------------------------------------
CC = x86_64-w64-mingw32-gcc
WINDRES = x86_64-w64-mingw32-windres
STRIP = x86_64-w64-mingw32-strip
TARGET=x86_64-w64-mingw32
CROSS_COMPILE=1
ifeq ($(CROSS_COMPILE),1)
TOOLCHAIN_PREFIX=$(TARGET)-
else
TOOLCHAIN_PREFIX=
endif
CC = $(TOOLCHAIN_PREFIX)gcc
WINDRES = $(TOOLCHAIN_PREFIX)windres
STRIP = $(TOOLCHAIN_PREFIX)strip
#CPUFLAGS= -mtune=k8
#CPUFLAGS= -march=atom