mxe/src/liblaxjson.mk

37 lines
1.2 KiB
Makefile
Raw Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2015-02-10 06:58:33 +00:00
PKG := liblaxjson
$(PKG)_WEBSITE := https://github.com/andrewrk/liblaxjson
2015-02-10 06:58:33 +00:00
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.0.5
$(PKG)_CHECKSUM := ffc495b5837e703b13af3f5a5790365dc3a6794f12f0fa93fb8593b162b0b762
2015-02-10 06:58:33 +00:00
$(PKG)_SUBDIR := liblaxjson-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/andrewrk/liblaxjson/archive/$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS := cc
2015-02-10 06:58:33 +00:00
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://github.com/andrewrk/liblaxjson/releases' | \
$(SED) -n 's,.*/archive/\([0-9][^>]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
mkdir '$(1).build'
cd '$(1).build' && '$(TARGET)-cmake' '$(1)'
2015-02-10 06:58:33 +00:00
'$(TARGET)-cmake' --build '$(1).build' -- -j '$(JOBS)'
'$(TARGET)-cmake' \
-DCMAKE_INSTALL_COMPONENT=$(if $(BUILD_STATIC),static,shared)-lib \
-P '$(1).build/cmake_install.cmake'
'$(TARGET)-cmake' \
-DCMAKE_INSTALL_COMPONENT=header \
-P '$(1).build/cmake_install.cmake'
2015-02-10 06:58:33 +00:00
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic -std=c99 \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-liblaxjson.exe' \
2015-02-10 06:58:33 +00:00
-llaxjson
endef