From dd79598084fcd156b605802a5e2d1f35e0f5514a Mon Sep 17 00:00:00 2001 From: Serge Vakulenko Date: Thu, 25 Jul 2019 13:28:02 -0700 Subject: [PATCH] Makefile: make sure pkg-config is installed. --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3a22c79..1cf19a2 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,18 @@ GITCOUNT = $(shell git rev-list HEAD --count) UNAME = $(shell uname) OBJS = main.o util.o radio.o dfu-libusb.o uv380.o md380.o rd5r.o gd77.o hid.o serial.o d868uv.o -LIBS = $(shell pkg-config --libs --static libusb-1.0) LDFLAGS = -g +LIBS = $(shell pkg-config --libs --static libusb-1.0) CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"' \ $(shell pkg-config --cflags libusb-1.0) +# +# Make sure pkg-config is installed. +# +ifeq ($(shell pkg-config --version),) + $(error Fatal error: pkg-config is not installed) +endif + # # Linux # @@ -48,10 +55,6 @@ clean: install: dmrconfig install -c -s dmrconfig /usr/local/bin/dmrconfig -dmrconfig.linux: dmrconfig - cp -p $< $@ - strip $@ - ### d868uv.o: d868uv.c radio.h util.h d868uv-map.h dfu-libusb.o: dfu-libusb.c util.h