comparison Makefile.in @ 3209:360f71254066

for native builds, put build tools and installed packages in same diretory tree
author John W. Eaton <jwe@octave.org>
date Tue, 06 Aug 2013 14:04:11 -0400
parents 1080856f48c4
children ec7be25aaf74
comparison
equal deleted inserted replaced
3208:1080856f48c4 3209:360f71254066
68 endif 68 endif
69 69
70 # These can't be chosen arbitrarily. The way things are configured now, 70 # These can't be chosen arbitrarily. The way things are configured now,
71 # GCC expects to find cross-compiler include files in $(PREFIX)/$(TARGET). 71 # GCC expects to find cross-compiler include files in $(PREFIX)/$(TARGET).
72 # and it's not clear to me how to change that. 72 # and it's not clear to me how to change that.
73 #
74 # For native builds, dump everything all together in one directory tree.
73 BUILD_TOOLS_PREFIX := $(PWD)/usr 75 BUILD_TOOLS_PREFIX := $(PWD)/usr
74 HOST_PREFIX := $(PWD)/usr/$(TARGET) 76 ifeq ($(MXE_NATIVE_BUILD),yes)
77 HOST_PREFIX := $(PWD)/usr/$(TARGET)
78 else
79 HOST_PREFIX := $(BUILD_TOOLS_PREFIX)
80 endif
75 81
76 # At least one package uses --with instead of --enable. 82 # At least one package uses --with instead of --enable.
77 ifeq ($(BUILD_SHARED),yes) 83 ifeq ($(BUILD_SHARED),yes)
78 ifeq ($(BUILD_STATIC),yes) 84 ifeq ($(BUILD_STATIC),yes)
79 ENABLE_SHARED_OR_STATIC := --enable-shared --enable-static 85 ENABLE_SHARED_OR_STATIC := --enable-shared --enable-static
152 TMP_DIR = $(PWD)/tmp-$(1) 158 TMP_DIR = $(PWD)/tmp-$(1)
153 TOP_DIR := $(PWD) 159 TOP_DIR := $(PWD)
154 MAKEFILE := $(TOP_DIR)/Makefile 160 MAKEFILE := $(TOP_DIR)/Makefile
155 PKGS := $(filter-out $(ALL_BUILD_TOOLS), $(shell $(SED) -n 's/^.* id="\([^"]*\)-package">.*$$/\1/p' '$(TOP_DIR)/index.html')) 161 PKGS := $(filter-out $(ALL_BUILD_TOOLS), $(shell $(SED) -n 's/^.* id="\([^"]*\)-package">.*$$/\1/p' '$(TOP_DIR)/index.html'))
156 162
157 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
158 PATH := $(HOST_PREFIX)/bin:$(PATH)
159 endif
160 PATH := $(BUILD_TOOLS_PREFIX)/bin:$(PATH) 163 PATH := $(BUILD_TOOLS_PREFIX)/bin:$(PATH)
161 164
162 CONFIGURE_CPPFLAGS := CPPFLAGS='-I$(HOST_PREFIX)/include' 165 CONFIGURE_CPPFLAGS := CPPFLAGS='-I$(HOST_PREFIX)/include'
163 CONFIGURE_LDFLAGS := LDFLAGS='-L$(HOST_PREFIX)/lib' 166 CONFIGURE_LDFLAGS := LDFLAGS='-L$(HOST_PREFIX)/lib'
164 CONFIGURE_POST_HOOK := true 167 CONFIGURE_POST_HOOK := true
186 CC='$(MXE_CC)' CXX='$(MXE_CXX)' F77='$(MXE_F77)' DLLTOOL='$(MXE_DLLTOOL)' CCAS='$(MXE_CCAS)' \ 189 CC='$(MXE_CC)' CXX='$(MXE_CXX)' F77='$(MXE_F77)' DLLTOOL='$(MXE_DLLTOOL)' CCAS='$(MXE_CCAS)' \
187 CFLAGS='-O2' CXXFLAGS='-O2' ac_cv_f77_compiler_gnu=no RANLIB='$(MXE_RANLIB)' 190 CFLAGS='-O2' CXXFLAGS='-O2' ac_cv_f77_compiler_gnu=no RANLIB='$(MXE_RANLIB)'
188 # Use native paths for compiler flags. Note: at this point, we can't 191 # Use native paths for compiler flags. Note: at this point, we can't
189 # rely on the existence of HOST_PREFIX directory, so recompute the 192 # rely on the existence of HOST_PREFIX directory, so recompute the
190 # native path from $(PWD) instead. 193 # native path from $(PWD) instead.
191 HOST_PREFIX_NATIVE := $(shell cd $(PWD) && pwd -W)/usr/$(TARGET) 194 HOST_PREFIX_NATIVE := $(shell cd $(PWD) && pwd -W)/usr
192 CONFIGURE_CPPFLAGS := CPPFLAGS='-I$(HOST_PREFIX_NATIVE)/include' 195 CONFIGURE_CPPFLAGS := CPPFLAGS='-I$(HOST_PREFIX_NATIVE)/include'
193 CONFIGURE_LDFLAGS := LDFLAGS='-L$(HOST_PREFIX_NATIVE)/lib' 196 CONFIGURE_LDFLAGS := LDFLAGS='-L$(HOST_PREFIX_NATIVE)/lib'
194 else 197 else
195 MXE_AR := ar 198 MXE_AR := ar
196 MXE_RANLIB := ranlib 199 MXE_RANLIB := ranlib