diff options
Diffstat (limited to 'extra/usb_updater/Makefile')
-rw-r--r-- | extra/usb_updater/Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/extra/usb_updater/Makefile b/extra/usb_updater/Makefile index b4c208f4af..2173e464d9 100644 --- a/extra/usb_updater/Makefile +++ b/extra/usb_updater/Makefile @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +CC ?= gcc +PKG_CONFIG ?= pkg-config PROGRAM := usb_updater SOURCE := $(PROGRAM).c LIBS := @@ -22,15 +24,15 @@ CFLAGS := -std=gnu99 \ # # Add libusb-1.0 required flags # -LIBS += $(shell pkg-config --libs libusb-1.0) -lcrypto -CFLAGS += $(shell pkg-config --cflags libusb-1.0) +LIBS += $(shell $(PKG_CONFIG) --libs libusb-1.0 libcrypto) +CFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0 libcrypto) # NOTE: This may be board-specific BOARD ?= cr50 CFLAGS += -I../../include -I../../board/$(BOARD) -I ../../chip/g -I../../util $(PROGRAM): $(SOURCE) Makefile - gcc $(CFLAGS) $(SOURCE) $(LFLAGS) $(LIBS) -o $@ + $(CC) $(CFLAGS) $(SOURCE) $(LFLAGS) $(LIBS) -o $@ .PHONY: clean |