diff options
author | Guenter Knauf <lists@gknw.net> | 2014-11-19 12:39:20 +0100 |
---|---|---|
committer | Guenter Knauf <lists@gknw.net> | 2014-11-19 12:39:20 +0100 |
commit | cf510ad7817d33a0d6730f39e05e277dc23a9966 (patch) | |
tree | f66dfc0d723570b733b9f173ff1038c21d473c9d | |
parent | 140ca2dcc28ae201c7fd6deb393dc4bd7c80a051 (diff) |
build: in Makefile.m32 moved target autodetection.
Moved target autodetection block after defining CC macro.
-rw-r--r-- | lib/Makefile.m32 | 20 | ||||
-rw-r--r-- | src/Makefile.m32 | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32 index 2ce597320..de44c66ea 100644 --- a/lib/Makefile.m32 +++ b/lib/Makefile.m32 @@ -54,16 +54,6 @@ ifndef LIBCARES_PATH LIBCARES_PATH = $(PROOT)/ares endif -# Set environment var ARCH to your architecture to override autodetection. -ifndef ARCH -TARGET := $(shell $(CC) -dumpmachine) -ifeq ($(findstring x86_64,$(TARGET)),x86_64) -ARCH = w64 -else -ARCH = w32 -endif -endif - CC = $(CROSSPREFIX)gcc CFLAGS = -g -O2 -Wall CFLAGS += -fno-strict-aliasing @@ -75,6 +65,16 @@ RC = $(CROSSPREFIX)windres RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF STRIP = $(CROSSPREFIX)strip -g +# Set environment var ARCH to your architecture to override autodetection. +ifndef ARCH +TARGET := $(shell $(CC) -dumpmachine) +ifeq ($(findstring x86_64,$(TARGET)),x86_64) +ARCH = w64 +else +ARCH = w32 +endif +endif + ifeq ($(ARCH),w64) CFLAGS += -D_AMD64_ RCFLAGS += -F pe-x86-64 diff --git a/src/Makefile.m32 b/src/Makefile.m32 index 707b5bc2a..4f1c99bdd 100644 --- a/src/Makefile.m32 +++ b/src/Makefile.m32 @@ -66,16 +66,6 @@ ifndef LIBCARES_PATH LIBCARES_PATH = $(PROOT)/ares endif -# Set environment var ARCH to your architecture to override autodetection. -ifndef ARCH -TARGET := $(shell $(CC) -dumpmachine) -ifeq ($(findstring x86_64,$(TARGET)),x86_64) -ARCH = w64 -else -ARCH = w32 -endif -endif - CC = $(CROSSPREFIX)gcc CFLAGS = -g -O2 -Wall CFLAGS += -fno-strict-aliasing @@ -90,6 +80,16 @@ STRIP = $(CROSSPREFIX)strip -g # PERL = perl # NROFF = nroff +# Set environment var ARCH to your architecture to override autodetection. +ifndef ARCH +TARGET := $(shell $(CC) -dumpmachine) +ifeq ($(findstring x86_64,$(TARGET)),x86_64) +ARCH = w64 +else +ARCH = w32 +endif +endif + ifeq ($(ARCH),w64) CFLAGS += -D_AMD64_ RCFLAGS += -F pe-x86-64 |