@fmertz:
https://github.com/fmertz/fbled
The code was updated again: This is a (very) minor code update, no new executables were created.
The source code now checks that the host system is x86. It compiles the LED code if it is, otherwise, it compiles with the emulator (the text "debug" version). This is for completeness, and the fun of having code compiling on all platforms where the OS runs. I have tested Linux/eglibc with ARM, SPARC, PowerPC and MIPS. It should compile and run on non x86 FreeBSD as well, but I don't have anything available to test with. Again, fairly pointless, but fun nonetheless. A Linux SPARC build session goes like this:
fcm@NetraX1B:~$ git clone git://github.com/fmertz/fbled.git
Cloning into fbled...
remote: Counting objects: 83, done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 83 (delta 44), reused 13 (delta 5)
Receiving objects: 100% (83/83), 108.40 KiB, done.
Resolving deltas: 100% (44/44), done.
fcm@NetraX1B:~$ cd fbled/
fcm@NetraX1B:~/fbled$ ./autogen.sh
**Warning**: I am going to run `configure' with no arguments.
If you wish to pass any to it, please specify them on the
`./autogen.sh' command line.
processing .
Running aclocal ...
Running autoheader...
Running automake --gnu ...
configure.ac:9: installing `./install-sh'
configure.ac:9: installing `./missing'
Makefile.am: installing `./depcomp'
Running autoconf ...
Running ./configure --enable-maintainer-mode ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
checking for struct if_data.ifi_opackets... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
Now type `make' to compile.
fcm@NetraX1B:~/fbled$ make
make all-am
make[1]: Entering directory `/home/fcm/fbled'
CC fbled.o
CCLD fbled
make[1]: Leaving directory `/home/fcm/fbled'
fcm@NetraX1B:~/fbled$ uname -a
Linux NetraX1B 2.6.32-5-sparc64 #1 Tue Jun 14 11:30:39 UTC 2011 sparc64 GNU/Linux
fcm@NetraX1B:~/fbled$ ./fbled
fbled 0.1.3.2
S[..*.....] L[........] T[........] 3[........]
A FreeBSD session goes like this:
[fcm@BSDDev ~]$ git clone git://github.com/fmertz/fbled.git
Cloning into fbled...
remote: Counting objects: 83, done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 83 (delta 44), reused 13 (delta 5)
Receiving objects: 100% (83/83), 108.40 KiB | 36 KiB/s, done.
Resolving deltas: 100% (44/44), done.
[fcm@BSDDev ~]$ cd fbled/
[fcm@BSDDev ~/fbled]$ ./autogen.sh
**Warning**: I am going to run `configure' with no arguments.
If you wish to pass any to it, please specify them on the
`./autogen.sh' command line.
processing .
Running aclocal ...
Running autoheader...
Running automake --gnu ...
configure.ac:9: installing `./install-sh'
configure.ac:9: installing `./missing'
Makefile.am: installing `./depcomp'
Running autoconf ...
Running ./configure --enable-maintainer-mode ...
checking for a BSD-compatible install... /usr/bin/install -c
...
checking for struct if_data.ifi_opackets... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
Now type `make' to compile.
[fcm@BSDDev ~/fbled]$ make
make all-am
CC fbled.o
CCLD fbled
[fcm@BSDDev ~/fbled]$ uname -a
FreeBSD BSDDev 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386