Skip to content

Commit ea11018

Browse files
authored
Rebased dfu-discovery source on dfu-util-0.11 (#6)
The source code of dfu-util is now downloaded from the origin. The build for mac is not yer done.
1 parent 03691fc commit ea11018

File tree

8 files changed

+56
-732
lines changed

8 files changed

+56
-732
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
compile.sh
1+
compile.sh
2+
dfu-util-*/*
3+
dfu-discovery
4+
*.o

compile.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
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

dfu.h

Lines changed: 0 additions & 133 deletions
This file was deleted.

dfu_util.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

io.h

Whitespace-only changes.

0 commit comments

Comments
 (0)