gcc options and mingw: move a gcc options detection from a makefile to the configure

+ define XCC and XAR if mingw32 defined
    + use XCC and XAR in lib/Makefile if defined
    Try "./configure --enable-mingw32; make". This must work
This commit is contained in:
seyko
2015-03-04 11:47:52 +03:00
parent 76af948623
commit 48d12e42ad
3 changed files with 20 additions and 18 deletions

View File

@@ -60,15 +60,15 @@ CFLAGS := $(filter-out -fstack-protector-strong,$(CFLAGS))
ifeq "$(TARGET)" "i386-win"
OBJ = $(addprefix $(DIR)/,$(WIN32_O))
TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE
XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
XAR = $(DIR)/tiny_libmaker$(EXESUF)
XCC ?= $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
XAR ?= $(DIR)/tiny_libmaker$(EXESUF)
PICFLAGS =
else
ifeq "$(TARGET)" "x86_64-win"
OBJ = $(addprefix $(DIR)/,$(WIN64_O))
TGT = -DTCC_TARGET_X86_64 -DTCC_TARGET_PE
XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
XAR = $(DIR)/tiny_libmaker$(EXESUF)
XAR ?= $(DIR)/tiny_libmaker$(EXESUF)
PICFLAGS =
else
ifeq "$(TARGET)" "i386"