view src/libgomp.mk @ 3903:385f5f4412b7

of-nurbs: fix cross compile, install libgomp's omp.h * src/of-nurbs.mk: make nurbs dependant on libgomp * src/of-nurbs-1-fixes.patch: update patch to use cross mkoctfile * src/libgomp.mk: update version to match gcc, install omp.h to HOST_INCDIR
author John Donoghue
date Tue, 14 Apr 2015 13:51:09 -0400
parents ed7c61a97068
children c7e31c07c915
line wrap: on
line source

# This file is part of MXE.
# See index.html for further information.

PKG             := libgomp
$(PKG)_IGNORE    = $(build-gcc_IGNORE)
$(PKG)_VERSION  := $(build-gcc_VERSION)
$(PKG)_CHECKSUM  = $(build-gcc_CHECKSUM)
$(PKG)_SUBDIR    = $(build-gcc_SUBDIR)
$(PKG)_FILE      = $(build-gcc_FILE)
$(PKG)_URL       = $(build-gcc_URL)
$(PKG)_URL_2     = $(build-gcc_URL_2)
$(PKG)_DEPS     := pthreads

define $(PKG)_UPDATE
    echo $(build-gcc_VERSION)
endef

ifeq ($(MXE_WINDOWS_BUILD),yes)
  $(PKG)_SYSDEP_CONFIGURE_OPTIONS := LIBS='-lws2_32'
endif

define $(PKG)_BUILD
    mkdir -p '$(1)/build/$(TARGET)/libgomp'
    cd       '$(1)/build/$(TARGET)/libgomp' && '$(1)/libgomp/configure' \
        $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
        --target='$(TARGET)' \
        --prefix='$(HOST_PREFIX)' \
        --enable-version-specific-runtime-libs \
        --disable-multilib \
        --with-gnu-ld \
        $(ENABLE_SHARED_OR_STATIC) \
        $($(PKG)_SYSDEP_CONFIGURE_OPTIONS)
    $(MAKE) -C '$(1)/build/$(TARGET)/libgomp' -j '$(JOBS)'
    $(MAKE) -C '$(1)/build/$(TARGET)/libgomp' -j '1' install DESTDIR='$(3)'

    # also copy omp.h to where other programs will see it
    $(INSTALL) -d "$(3)$(HOST_INCDIR)" 
    $(INSTALL) -m644 '$(1)/build/$(TARGET)/libgomp/omp.h' '$(3)$(HOST_INCDIR)/'

    #'$(MXE_CC)' \
    #    -W -Wall -Werror -ansi -pedantic \
    #    '$(2).c' -o '$(HOST_BINDIR)/test-libgomp.exe' \
    #    -fopenmp
endef