libmpsse icon indicating copy to clipboard operation
libmpsse copied to clipboard

fix: examples build Makefile

Open yogggoy opened this issue 7 years ago • 3 comments

Build examples with libftdi1, for disable - change in Makefile LIBFTDI1=1 to LIBFTDI1=0

yogggoy avatar Sep 14 '18 10:09 yogggoy

Are you sure the examples need such a flag for building?

l29ah avatar Sep 14 '18 14:09 l29ah

os: CentOS 7
uname -a: Linux 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)

i'am build libftdi1, and never install libftdi2xx (official src). Without fix have errors: for lib:

gcc -Wall -fPIC -fno-strict-aliasing -g -O2 -lftdi1  -DLIBFTDI1=1 -c support.c
gcc -Wall -fPIC -fno-strict-aliasing -g -O2 -lftdi1  -DLIBFTDI1=1 -c mpsse.c
gcc -Wall -fPIC -fno-strict-aliasing -g -O2 -lftdi1  -c fast.c
In file included from fast.c:10:0:
mpsse.h:9:18: fatal error: ftdi.h: No such file or directory
 #include <ftdi.h>
                  ^
compilation terminated.
make: *** [fast.o] Error 1

and for examples:

$ make example-code
make -C examples
make[1]: Entering directory `/..../libmpsse/src/examples'
cc  spiflash.c -o spiflash -lmpsse
In file included from spiflash.c:3:0:
/usr/local/include/mpsse.h:9:18: fatal error: ftdi.h: No such file or directory
 #include <ftdi.h>
                  ^
compilation terminated.
make[1]: *** [spiflash] Error 1
make[1]: Leaving directory `/.../libmpsse_my/src/examples'
make: *** [example-code] Error 2

yogggoy avatar Sep 14 '18 17:09 yogggoy

Okay, thanks, should be fixed in my repo.

l29ah avatar Sep 14 '18 17:09 l29ah