File tree Expand file tree Collapse file tree 8 files changed +56
-732
lines changed Expand file tree Collapse file tree 8 files changed +56
-732
lines changed Original file line number Diff line number Diff line change 1
- compile.sh
1
+ compile.sh
2
+ dfu-util- * /*
3
+ dfu-discovery
4
+ * .o
Original file line number Diff line number Diff line change 1
- g++ main.cpp -I/usr/include/libusb-1.0 -lusb-1.0 -fpermissive -o discoverer
1
+ DFU_UTIL=dfu-util-0.11
2
+
3
+ if [ -d " $DFU_UTIL " ];
4
+ then
5
+ echo " $DFU_UTIL already downloaded (directory exists)."
6
+ else
7
+ echo " Downloading $DFU_UTIL ..."
8
+ curl https://dfu-util.sourceforge.net/releases/$DFU_UTIL .tar.gz -s | tar xz
9
+ fi
10
+
11
+ DEFINES=" -DHAVE_UNISTD_H -DHAVE_NANOSLEEP"
12
+ INCLUDES=" -I. -Idfu-util-0.11/src -I/usr/include/libusb-1.0"
13
+ gcc -c dfu-util-0.11/src/dfuse_mem.c $INCLUDES $DEFINES
14
+ gcc -c dfu-util-0.11/src/dfu_util.c $INCLUDES $DEFINES
15
+ gcc -c dfu-util-0.11/src/quirks.c $INCLUDES $DEFINES
16
+ g++ -c main.cpp $INCLUDES $DEFINES
17
+ g++ dfu_util.o quirks.o dfuse_mem.o main.o -lusb-1.0 -o dfu-discovery
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments