summaryrefslogtreecommitdiff
blob: c6e3b767394b8bd27d0b472df5a031ff01d9a6cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
respect env build settings

--- a/releases/smdk-tools-v0.20/dltool/Makefile
+++ b/releases/smdk-tools-v0.20/dltool/Makefile
@@ -7,8 +7,13 @@
 
 .PHONY:	clean
 
-dltool:	dltool.c
-	$(CC) -O2 -Wall -g -lusb -o smdk-usbdl dltool.c
+CFLAGS ?= -O2 -g
+CFLAGS += -Wall
+PKG_CONFIG ?= pkg-config
+CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb)
+LDLIBS = $(shell $(PKG_CONFIG) --libs libusb)
+
+all: dltool
 
 clean:
 	-rm smdk-usbdl