News:

Registered a URL and setup a forum as the IPCam stuff really needed its own site vs my irregular blog posts about IPCam hacking at http://www.computersolutions.cn/blog

Author Topic: Build Script tip  (Read 2662 times)

  • No avatar
  • *****
February 08, 2011, 08:47:04 pm
Adding code to the uClinux folders can be a hassle.  Sometimes you just want to compile something quickly, without having to go to all the pain of adding Makefile defines all over the place just so you can compile.

Here's a quick tip to assist you with that

Code: [Select]
## set ARM folders (assumes we use the arm-elf-gcc 3.0 defaults)
ROOT=/usr/local/arm_tools
LIB1=$ROOT/arm-elf/lib
LIB2=$ROOT/lib/gcc-lib/arm-elf/3.0
INC=$ROOT/arm-elf/inc
CC="arm-elf-gcc"
CFLAGS="-Wall -I$INC"
LDLIBS="-lc -lgcc -lcrypt -L$LIB1 -L$LIB2"
UCFLAGS="-Wl,-elf2flt "

export CC CFLAGS LDLIBS UCFLAGS DEVICE

With that in place, we can run make in a folder and generate a binary fairly painlessly.
(assuming that the people haven't hard coded things in the Makefile)