# HG changeset patch # User Michael Spacefalcon # Date 1371624068 0 # Node ID eb97cfe5e31a671aaefc8f243ac2c5071c5821e7 # Parent 16315ed6401accf12cbbad1bab69c66646840fb9 finally, a real make install for loadtools and loadagent diff -r 16315ed6401a -r eb97cfe5e31a loadtools/Makefile --- a/loadtools/Makefile Mon Jun 17 08:15:30 2013 +0000 +++ b/loadtools/Makefile Wed Jun 19 06:41:08 2013 +0000 @@ -1,6 +1,7 @@ CC= gcc CFLAGS= -O2 PROGS= fc-loadtool fc-sertool fc-xram +LASRC= ../target-utils/loadagent SCRIPTS=scripts/pirelli.config scripts/pirelli.init INSTBIN=/usr/local/bin INSTSCR=/usr/local/share/freecalypso @@ -27,9 +28,35 @@ fc-xram: ${XRAM_OBJS} ${CC} -o $@ ${XRAM_OBJS} -install: - #install -c ${PROGS} ${INSTBIN} - install -c ${SCRIPTS} ${INSTSCR} +# The loadagent.srec image needs to be installed in the "system" directory +# where fc-loadtool and fc-xram will find it. However, we have a dilemma: +# loadagent is built in the ../target-utils tree with the target cross-gcc, +# but the logical place to install it is here. The following hack is our +# workaround. +# +# It is also conceivable that after the FreeCalypso project matures, +# some people will want to flash images built by others, without setting up +# their own cross-gcc environments for the ARM7TDMI target. However, +# the loadtools subpackage is something that every user will need to build +# from source on his/her "loading" machine. The planned solution is to +# package a "release" of fc-loadtools which will be the present source +# directory with a prebuilt loadagent.srec included. + +loadagent.srec: + @if [ -r ${LASRC}/loadagent.srec ]; then \ + true; \ + else \ + echo "Error: I need to install loadagent.srec in ${INSTSCR},"; \ + echo "but I cannot find it: neither in . nor in ${LASRC}"; \ + false; \ + fi + ln -s ${LASRC}/loadagent.srec . + +install: ${PROGS} ${SCRIPTS} loadagent.srec + mkdir -p ${INSTBIN} + install -c ${PROGS} ${INSTBIN} + mkdir -p ${INSTSCR} + install -c loadagent.srec ${SCRIPTS} ${INSTSCR} clean: rm -f *.o *.out *errs ${PROGS}