annotate src/gcc.mk @ 3012:100e618349f7

Improve handling of prefix directories by defining HOST_PREFIX and BUILD_TOOLS_PREFIX variables in top-level Makefile.
author John W. Eaton <jwe@octave.org>
date Sun, 02 Jun 2013 10:31:04 -0400
parents 4f9b72cf7ee7
children bcc26ffe9a0f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 2329
diff changeset
1 # This file is part of MXE.
2353
99516e73b368 Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents: 2349
diff changeset
2 # See index.html for further information.
414
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 408
diff changeset
3
306
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 266
diff changeset
4 PKG := gcc
938
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
5 $(PKG)_IGNORE :=
2769
072676f75749 update package gcc
Mark Brand <mabrand@mabrand.nl>
parents: 2731
diff changeset
6 $(PKG)_CHECKSUM := a464ba0f26eef24c29bcd1e7489421117fb9ee35
504
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
7 $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION)
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
8 $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
9 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
2769
072676f75749 update package gcc
Mark Brand <mabrand@mabrand.nl>
parents: 2731
diff changeset
10 $(PKG)_URL_2 := ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
11 ifeq ($(USE_SYSTEM_GCC),yes)
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
12 $(PKG)_DEPS :=
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
13 else
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
14 ifeq ($(MXE_NATIVE_BUILD),yes)
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
15 $(PKG)_DEPS := binutils
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
16 else
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
17 ifeq ($(MXE_SYSTEM),mingw)
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
18 $(PKG)_DEPS := mingwrt w32api binutils
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
19 endif
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
20 endif
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
21 endif
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
22
2855
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
23 ifneq ($(BUILD_SHARED),yes)
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
24 $(PKG)_STATIC_FLAG := --static
2855
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
25 endif
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
26
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
27 ifeq ($(MXE_SYSTEM),mingw)
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
28 $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
29 --disable-sjlj-exceptions \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
30 --disable-win32-registry \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
31 --enable-threads=win32
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
32 endif
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
33
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
34
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
35 define $(PKG)_UPDATE
2525
4d0f3a9da57e all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents: 2365
diff changeset
36 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \
605
96fa8fada1dc improved speed of version recognition for package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 504
diff changeset
37 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \
1799
53a080f97374 package gcc: fix update macro
Mark Brand <mabrand@mabrand.nl>
parents: 1759
diff changeset
38 grep -v '^4\.[543]\.' | \
504
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
39 head -1
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
40 endef
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
41
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
42 ifeq ($(USE_SYSTEM_GCC),yes)
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
43 define $(PKG)_BUILD
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
44 # create the CMake toolchain file
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
45 [ -d '$(dir $(CMAKE_TOOLCHAIN_FILE))' ] || mkdir -p '$(dir $(CMAKE_TOOLCHAIN_FILE))'
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
46 (if [ $(MXE_SYSTEM) = mingw ]; then \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
47 echo 'set(CMAKE_SYSTEM_NAME Windows)'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
48 echo 'set(MSYS 1)'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
49 fi; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
50 if [ $(BUILD_SHARED) = yes ]; then \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
51 echo 'set(BUILD_SHARED_LIBS ON)'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
52 else \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
53 echo 'set(BUILD_SHARED_LIBS OFF)'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
54 fi; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
55 if [ $(BUILD_STATIC) = yes ]; then \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
56 echo 'set(BUILD_STATIC_LIBS ON)'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
57 else \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
58 echo 'set(BUILD_STATIC_LIBS OFF)'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
59 fi; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
60 echo 'set(CMAKE_BUILD_TYPE Release)'; \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
61 echo 'set(CMAKE_FIND_ROOT_PATH $(HOST_PREFIX))'; \
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
62 echo 'set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
63 echo 'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
64 echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
65 echo 'set(CMAKE_C_COMPILER $(MXE_CC))'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
66 echo 'set(CMAKE_CXX_COMPILER $(MXE_CXX))'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
67 echo 'set(CMAKE_Fortran_COMPILER $(MXE_F77))'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
68 echo 'set(CMAKE_RC_COMPILER $(MXE_WINDRES))'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
69 echo 'set(PKG_CONFIG_EXECUTABLE $(MXE_PKG_CONFIG))'; \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
70 echo 'set(QT_QMAKE_EXECUTABLE $(MXE_QMAKE))'; \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
71 echo 'set(CMAKE_INSTALL_PREFIX $(HOST_PREFIX) CACHE PATH "Installation Prefix")'; \
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
72 echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")') \
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
73 > '$(CMAKE_TOOLCHAIN_FILE)'
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
74 endef
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
75 else
938
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
76 define $(PKG)_BUILD
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
77 cd '$(1)' && ./contrib/download_prerequisites
1066
c7b2a7ef1bf9 use a build directory separate from the source directory in package gcc (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 1060
diff changeset
78 mkdir '$(1).build'
c7b2a7ef1bf9 use a build directory separate from the source directory in package gcc (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 1060
diff changeset
79 cd '$(1).build' && '$(1)/configure' \
444
c828215f90ae enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents: 426
diff changeset
80 --target='$(TARGET)' \
2153
e4c83fa61a5b replaced $(BUILD) with a more direct and less brittle construct
Volker Grabsch <vog@notjusthosting.com>
parents: 2151
diff changeset
81 --build="`config.guess`" \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
82 --prefix='$(BUILD_TOOLS_PREFIX)' \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
83 --libdir='$(BUILD_TOOLS_PREFIX)/lib' \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
84 --enable-languages='c,c++,fortran' \
444
c828215f90ae enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents: 426
diff changeset
85 --enable-version-specific-runtime-libs \
c828215f90ae enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents: 426
diff changeset
86 --with-gcc \
c828215f90ae enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents: 426
diff changeset
87 --with-gnu-ld \
c828215f90ae enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents: 426
diff changeset
88 --with-gnu-as \
c828215f90ae enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents: 426
diff changeset
89 --disable-nls \
2855
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
90 $(ENABLE_SHARED_OR_STATIC) \
444
c828215f90ae enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents: 426
diff changeset
91 --without-x \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
92 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \
943
bc40d4f60207 provide GCC OpenMP functionality as extra package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 942
diff changeset
93 --disable-libgomp \
2010
7419a81ea558 update package gcc-mpfr
Mark Brand <mabrand@mabrand.nl>
parents: 1965
diff changeset
94 --disable-libmudflap \
2731
7dece766f419 package gcc: fix for OSX ASLR issues with pre-compiled headers
Tony Theodore <tonyt@logyst.com>
parents: 2707
diff changeset
95 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'")
1066
c7b2a7ef1bf9 use a build directory separate from the source directory in package gcc (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 1060
diff changeset
96 $(MAKE) -C '$(1).build' -j '$(JOBS)'
c7b2a7ef1bf9 use a build directory separate from the source directory in package gcc (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 1060
diff changeset
97 $(MAKE) -C '$(1).build' -j 1 install
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
98 mkdir -p $(TOP_DIR)/cross-tools/$(MXE_BINDIR)
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
99 $(MAKE) -C '$(1).build' -j 1 DESTDIR=$(TOP_DIR)/cross-tools install
695
b930f92b1f77 use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents: 650
diff changeset
100
b930f92b1f77 use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents: 650
diff changeset
101 # create pkg-config script
b930f92b1f77 use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents: 650
diff changeset
102 (echo '#!/bin/sh'; \
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
103 echo 'PKG_CONFIG_PATH="$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(MXE_LIBDIR)/pkgconfig'\'' exec pkg-config $($(PKG)_STATIC_FLAG) "$$@"') \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
104 > '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-pkg-config'
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
105 chmod 0755 '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-pkg-config'
2329
466e77a78672 Fix annoying whitespaces at EOL
Volker Grabsch <vog@notjusthosting.com>
parents: 2296
diff changeset
106
1663
9577f70222f8 add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents: 1524
diff changeset
107 # create the CMake toolchain file
9577f70222f8 add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents: 1524
diff changeset
108 [ -d '$(dir $(CMAKE_TOOLCHAIN_FILE))' ] || mkdir -p '$(dir $(CMAKE_TOOLCHAIN_FILE))'
2707
4c2874e00f0c Move CMAKE_BUILD_TYPE into toolchain file
Volker Grabsch <vog@notjusthosting.com>
parents: 2706
diff changeset
109 (echo 'set(CMAKE_SYSTEM_NAME Windows)'; \
1965
2a749f1c6756 additional variable for the cmake toolchain file
Zach Thibeau <zachary.thibeau@gmail.com>
parents: 1950
diff changeset
110 echo 'set(MSYS 1)'; \
2855
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
111 if [ $(BUILD_SHARED) = yes ]; then \
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
112 echo 'set(BUILD_SHARED_LIBS ON)'; \
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
113 else \
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
114 echo 'set(BUILD_SHARED_LIBS OFF)'; \
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
115 fi; \
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
116 if [ $(BUILD_STATIC) = yes ]; then \
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
117 echo 'set(BUILD_STATIC_LIBS ON)'; \
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
118 else \
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
119 echo 'set(BUILD_STATIC_LIBS OFF)'; \
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2769
diff changeset
120 fi; \
2707
4c2874e00f0c Move CMAKE_BUILD_TYPE into toolchain file
Volker Grabsch <vog@notjusthosting.com>
parents: 2706
diff changeset
121 echo 'set(CMAKE_BUILD_TYPE Release)'; \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
122 echo 'set(CMAKE_FIND_ROOT_PATH $(HOST_PREFIX))'; \
1663
9577f70222f8 add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents: 1524
diff changeset
123 echo 'set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)'; \
9577f70222f8 add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents: 1524
diff changeset
124 echo 'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)'; \
9577f70222f8 add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents: 1524
diff changeset
125 echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)'; \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
126 echo 'set(CMAKE_C_COMPILER $(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-gcc)'; \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
127 echo 'set(CMAKE_CXX_COMPILER $(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-g++)'; \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
128 echo 'set(CMAKE_Fortran_COMPILER $(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-gfortran)'; \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
129 echo 'set(CMAKE_RC_COMPILER $(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-windres)'; \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
130 echo 'set(PKG_CONFIG_EXECUTABLE $(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-pkg-config)'; \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
131 echo 'set(QT_QMAKE_EXECUTABLE $(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-qmake)'; \
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
132 echo 'set(CMAKE_INSTALL_PREFIX $(HOST_PREFIX) CACHE PATH "Installation Prefix")'; \
1663
9577f70222f8 add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents: 1524
diff changeset
133 echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")') \
9577f70222f8 add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents: 1524
diff changeset
134 > '$(CMAKE_TOOLCHAIN_FILE)'
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
135 endef
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2920
diff changeset
136 endif