FreeCalypso > hg > freecalypso-sw
comparison loadtools/Makefile @ 46:eb97cfe5e31a
finally, a real make install for loadtools and loadagent
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Wed, 19 Jun 2013 06:41:08 +0000 |
parents | 16315ed6401a |
children | 38664e0b7c32 |
comparison
equal
deleted
inserted
replaced
45:16315ed6401a | 46:eb97cfe5e31a |
---|---|
1 CC= gcc | 1 CC= gcc |
2 CFLAGS= -O2 | 2 CFLAGS= -O2 |
3 PROGS= fc-loadtool fc-sertool fc-xram | 3 PROGS= fc-loadtool fc-sertool fc-xram |
4 LASRC= ../target-utils/loadagent | |
4 SCRIPTS=scripts/pirelli.config scripts/pirelli.init | 5 SCRIPTS=scripts/pirelli.config scripts/pirelli.init |
5 INSTBIN=/usr/local/bin | 6 INSTBIN=/usr/local/bin |
6 INSTSCR=/usr/local/share/freecalypso | 7 INSTSCR=/usr/local/share/freecalypso |
7 | 8 |
8 SERTOOL_OBJS= defpath.o hexdecode.o hwparam.o romload.o sercomm.o sertool.o \ | 9 SERTOOL_OBJS= defpath.o hexdecode.o hwparam.o romload.o sercomm.o sertool.o \ |
25 ${CC} -o $@ ${LOADTOOL_OBJS} | 26 ${CC} -o $@ ${LOADTOOL_OBJS} |
26 | 27 |
27 fc-xram: ${XRAM_OBJS} | 28 fc-xram: ${XRAM_OBJS} |
28 ${CC} -o $@ ${XRAM_OBJS} | 29 ${CC} -o $@ ${XRAM_OBJS} |
29 | 30 |
30 install: | 31 # The loadagent.srec image needs to be installed in the "system" directory |
31 #install -c ${PROGS} ${INSTBIN} | 32 # where fc-loadtool and fc-xram will find it. However, we have a dilemma: |
32 install -c ${SCRIPTS} ${INSTSCR} | 33 # loadagent is built in the ../target-utils tree with the target cross-gcc, |
34 # but the logical place to install it is here. The following hack is our | |
35 # workaround. | |
36 # | |
37 # It is also conceivable that after the FreeCalypso project matures, | |
38 # some people will want to flash images built by others, without setting up | |
39 # their own cross-gcc environments for the ARM7TDMI target. However, | |
40 # the loadtools subpackage is something that every user will need to build | |
41 # from source on his/her "loading" machine. The planned solution is to | |
42 # package a "release" of fc-loadtools which will be the present source | |
43 # directory with a prebuilt loadagent.srec included. | |
44 | |
45 loadagent.srec: | |
46 @if [ -r ${LASRC}/loadagent.srec ]; then \ | |
47 true; \ | |
48 else \ | |
49 echo "Error: I need to install loadagent.srec in ${INSTSCR},"; \ | |
50 echo "but I cannot find it: neither in . nor in ${LASRC}"; \ | |
51 false; \ | |
52 fi | |
53 ln -s ${LASRC}/loadagent.srec . | |
54 | |
55 install: ${PROGS} ${SCRIPTS} loadagent.srec | |
56 mkdir -p ${INSTBIN} | |
57 install -c ${PROGS} ${INSTBIN} | |
58 mkdir -p ${INSTSCR} | |
59 install -c loadagent.srec ${SCRIPTS} ${INSTSCR} | |
33 | 60 |
34 clean: | 61 clean: |
35 rm -f *.o *.out *errs ${PROGS} | 62 rm -f *.o *.out *errs ${PROGS} |