Merge pull request #28 from ZeroChaos-/patch-1

allow override of cc and cflags/ldflags
This commit is contained in:
Serge Vakulenko 2019-09-18 22:12:28 -07:00 committed by GitHub
commit df2d411402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
CC = gcc
CC ?= gcc
VERSION = $(shell git describe --tags --abbrev=0)
GITCOUNT = $(shell git rev-list HEAD --count)
@ -6,10 +6,11 @@ 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 dm1801.o
LDFLAGS = -g
LIBS = $(shell pkg-config --libs --static libusb-1.0)
CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"' \
CFLAGS ?= -g -O -Wall -Werror
CFLAGS += -DVERSION='"$(VERSION).$(GITCOUNT)"' \
$(shell pkg-config --cflags libusb-1.0)
LDFLAGS ?= -g
LIBS = $(shell pkg-config --libs --static libusb-1.0)
#
# Make sure pkg-config is installed.