diff options
Diffstat (limited to 'src/gcc.mk')
-rw-r--r-- | src/gcc.mk | 54 |
1 files changed, 1 insertions, 53 deletions
@@ -27,7 +27,7 @@ define $(PKG)_CONFIGURE mkdir '$(1).build' cd '$(1).build' && '$(1)/configure' \ --target='$(TARGET)' \ - --build="`config.guess`" \ + --build='$(BUILD)' \ --prefix='$(PREFIX)' \ --libdir='$(PREFIX)/lib' \ --enable-languages='c,c++,objc,fortran' \ @@ -51,60 +51,12 @@ define $(PKG)_CONFIGURE $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") endef -define $(PKG)_POST_BUILD - # create pkg-config script - (echo '#!/bin/sh'; \ - echo 'PKG_CONFIG_PATH="$(PREFIX)/$(TARGET)/qt5/lib/pkgconfig":"$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(PREFIX)/$(TARGET)/lib/pkgconfig'\'' exec pkg-config --static "$$@"') \ - > '$(PREFIX)/bin/$(TARGET)-pkg-config' - chmod 0755 '$(PREFIX)/bin/$(TARGET)-pkg-config' - - # create the CMake toolchain file - [ -d '$(dir $(CMAKE_TOOLCHAIN_FILE))' ] || mkdir -p '$(dir $(CMAKE_TOOLCHAIN_FILE))' - (echo 'set(CMAKE_SYSTEM_NAME Windows)'; \ - echo 'set(MSYS 1)'; \ - echo 'set(BUILD_SHARED_LIBS OFF)'; \ - echo 'set(CMAKE_BUILD_TYPE Release)'; \ - echo 'set(CMAKE_FIND_ROOT_PATH $(PREFIX)/$(TARGET))'; \ - echo 'set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)'; \ - echo 'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)'; \ - echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)'; \ - echo 'set(CMAKE_C_COMPILER $(PREFIX)/bin/$(TARGET)-gcc)'; \ - echo 'set(CMAKE_CXX_COMPILER $(PREFIX)/bin/$(TARGET)-g++)'; \ - echo 'set(CMAKE_Fortran_COMPILER $(PREFIX)/bin/$(TARGET)-gfortran)'; \ - echo 'set(CMAKE_RC_COMPILER $(PREFIX)/bin/$(TARGET)-windres)'; \ - echo 'set(HDF5_C_COMPILER_EXECUTABLE $(PREFIX)/bin/$(TARGET)-h5cc)'; \ - echo 'set(HDF5_CXX_COMPILER_EXECUTABLE $(PREFIX)/bin/$(TARGET)-h5c++)'; \ - echo 'set(PKG_CONFIG_EXECUTABLE $(PREFIX)/bin/$(TARGET)-pkg-config)'; \ - echo 'set(QT_QMAKE_EXECUTABLE $(PREFIX)/$(TARGET)/qt/bin/qmake)'; \ - echo 'set(CMAKE_INSTALL_PREFIX $(PREFIX)/$(TARGET) CACHE PATH "Installation Prefix")'; \ - echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")') \ - > '$(CMAKE_TOOLCHAIN_FILE)' -endef - -define $(PKG)_POST_BUILD_mingw32 - # create pkg-config files - $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' - (echo 'Name: gl'; \ - echo 'Version: 0'; \ - echo 'Description: OpenGL'; \ - echo 'Libs: -lopengl32';) \ - > '$(PREFIX)/$(TARGET)/lib/pkgconfig/gl.pc' - - (echo 'Name: glu'; \ - echo 'Version: 0'; \ - echo 'Description: OpenGL'; \ - echo 'Libs: -lglu32';) \ - > '$(PREFIX)/$(TARGET)/lib/pkgconfig/glu.pc' -endef - define $(PKG)_BUILD_i686-pc-mingw32 # build full cross gcc $($(PKG)_CONFIGURE) \ --disable-sjlj-exceptions $(MAKE) -C '$(1).build' -j '$(JOBS)' $(MAKE) -C '$(1).build' -j 1 install - $($(PKG)_POST_BUILD) - $($(PKG)_POST_BUILD_mingw32) endef define $(PKG)_BUILD_mingw-w64 @@ -127,9 +79,6 @@ define $(PKG)_BUILD_mingw-w64 cd '$(1).build' $(MAKE) -C '$(1).build' -j '$(JOBS)' $(MAKE) -C '$(1).build' -j 1 install - - $($(PKG)_POST_BUILD) - $($(PKG)_POST_BUILD_mingw32) endef $(PKG)_BUILD_x86_64-w64-mingw32 = $(subst mxe-config-opts,--disable-lib32,$($(PKG)_BUILD_mingw-w64)) @@ -139,5 +88,4 @@ define $(PKG)_BUILD_$(BUILD) for f in c++ cpp g++ gcc gcov; do \ ln -sf "`which $$f`" '$(PREFIX)/bin/$(TARGET)'-$$f ; \ done - $($(PKG)_POST_BUILD) endef |