libnice: cleanup makefile

This commit is contained in:
Martin Müllenhaupt 2016-10-28 08:18:21 +02:00 committed by Boris Nagaev
parent f78fa903af
commit 28905fe12a
1 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,4 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := libnice
$(PKG)_IGNORE :=
@ -11,16 +10,22 @@ $(PKG)_URL := https://nice.freedesktop.org/releases/$($(PKG)_FILE)
$(PKG)_DEPS := gcc glib
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://cgit.freedesktop.org/libnice/libnice/refs/tags' | \
grep '<a href=' | \
$(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*\.[^<]*\)<.*,\1,p' | \
$(SORT) -Vr | \
head -1
endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS) \
PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' \
PKG_CONFIG='$(TARGET)-pkg-config' \
GLIB_COMPILE_SCHEMAS='$(PREFIX)/$(TARGET)/bin/glib-compile-schemas' \
MAKE=$(MAKE)
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(TARGET)-gcc \
'$(1)/examples/simple-example.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS)
$(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_PROGRAMS)
$(TARGET)-gcc \
'$(SOURCE_DIR)/examples/simple-example.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`$(TARGET)-pkg-config nice --cflags --libs`
endef