Support mxe build environment for windows cross builds
Override all tools with prefixed versions if the CROSS variable has been set. This is the recommended way to enable cross compilation using mxe without touching lots of environment variables first.
This commit is contained in:
parent
534ab2dfa9
commit
45898d3826
16
common.mk
16
common.mk
|
@ -1,9 +1,17 @@
|
|||
# makefile variables and rules shared by both gkrellm and gkrellmd
|
||||
|
||||
CC ?= gcc
|
||||
AR ?= ar
|
||||
PKG_CONFIG ?= pkg-config
|
||||
WINDRES ?= windres
|
||||
ifdef CROSS
|
||||
# enforce overriding tools for mxe cross builds (http://mxe.cc)
|
||||
CC = $(CROSS)gcc
|
||||
AR = $(CROSS)ar
|
||||
PKG_CONFIG = $(CROSS)pkg-config
|
||||
WINDRES = $(CROSS)windres
|
||||
else
|
||||
CC ?= gcc
|
||||
AR ?= ar
|
||||
PKG_CONFIG ?= pkg-config
|
||||
WINDRES ?= windres
|
||||
endif
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
INSTALLROOT ?= $(DESTDIR)$(PREFIX)
|
||||
|
|
Loading…
Reference in New Issue