From: Joseph C. Lehner Date: Mon, 11 May 2020 14:20:26 +0000 (+0200) Subject: Merge pull request #37 from real-dam/cross-pkg-config X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7d901d078fa189e8a1e7736ec2eb0ed8e4cd7b94;p=oweals%2Fnmrpflash.git Merge pull request #37 from real-dam/cross-pkg-config Improve cross-building by honoring PKG_CONFIG from environment --- 7d901d078fa189e8a1e7736ec2eb0ed8e4cd7b94 diff --cc Makefile index 04ad2d5,640d7cd..daa4c5d --- a/Makefile +++ b/Makefile @@@ -1,6 -1,7 +1,7 @@@ CC ?= gcc + PKG_CONFIG ?= pkg-config PREFIX ?= /usr/local -VERSION = $(shell git describe --always | tail -c +2) +VERSION := $(shell if [ -d .git ] && which git 2>&1 > /dev/null; then git describe --always | tail -c +2; else echo $$STANDALONE_VERSION; fi) LIBS = -lpcap CFLAGS += -Wall -g -DNMRPFLASH_VERSION=\"$(VERSION)\" LDFLAGS += $(LIBS)