FreeCalypso > hg > freecalypso-sw
annotate 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 |
rev | line source |
---|---|
8
acaac9162574
loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 CC= gcc |
acaac9162574
loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 CFLAGS= -O2 |
42
5da0cbee2b89
fc-xram tool written, compiles, now needs to be debugged
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
35
diff
changeset
|
3 PROGS= fc-loadtool fc-sertool fc-xram |
46
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
4 LASRC= ../target-utils/loadagent |
30
af6d763badfb
loadtools: install target added
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
29
diff
changeset
|
5 SCRIPTS=scripts/pirelli.config scripts/pirelli.init |
af6d763badfb
loadtools: install target added
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
29
diff
changeset
|
6 INSTBIN=/usr/local/bin |
af6d763badfb
loadtools: install target added
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
29
diff
changeset
|
7 INSTSCR=/usr/local/share/freecalypso |
9
fea204bc7674
fc-sertool compiles
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
8
diff
changeset
|
8 |
17
24b88c119465
loadtools: hw parameter file reading implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
9
diff
changeset
|
9 SERTOOL_OBJS= defpath.o hexdecode.o hwparam.o romload.o sercomm.o sertool.o \ |
24b88c119465
loadtools: hw parameter file reading implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
9
diff
changeset
|
10 srecreader.o ttypassthru.o |
8
acaac9162574
loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 |
35
05af070c4b60
loadtool: preparations for dump2bin and dump2srec
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
30
diff
changeset
|
12 LOADTOOL_OBJS= crc32tab.o defpath.o hexdecode.o hwparam.o ltdispatch.o \ |
05af070c4b60
loadtool: preparations for dump2bin and dump2srec
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
30
diff
changeset
|
13 ltdump.o ltexit.o ltmain.o ltpassthru.o ltscript.o romload.o \ |
05af070c4b60
loadtool: preparations for dump2bin and dump2srec
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
30
diff
changeset
|
14 sercomm.o srecreader.o tpinterf.o tpinterf2.o |
21
67a39d8914a8
starting work on loadtool
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
17
diff
changeset
|
15 |
45
16315ed6401a
init-script logic implemented in fc-xram
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
42
diff
changeset
|
16 XRAM_OBJS= chainload.o clmain.o defpath.o hexdecode.o hwparam.o \ |
16315ed6401a
init-script logic implemented in fc-xram
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
42
diff
changeset
|
17 initscript.o romload.o sercomm.o srecreader.o tpinterf.o \ |
16315ed6401a
init-script logic implemented in fc-xram
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
42
diff
changeset
|
18 ttypassthru.o |
42
5da0cbee2b89
fc-xram tool written, compiles, now needs to be debugged
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
35
diff
changeset
|
19 |
23
aca1948e9713
loadtool: initial version compiles and links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
22
diff
changeset
|
20 all: ${PROGS} |
9
fea204bc7674
fc-sertool compiles
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
8
diff
changeset
|
21 |
fea204bc7674
fc-sertool compiles
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
8
diff
changeset
|
22 fc-sertool: ${SERTOOL_OBJS} |
fea204bc7674
fc-sertool compiles
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
8
diff
changeset
|
23 ${CC} -o $@ ${SERTOOL_OBJS} |
8
acaac9162574
loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
23
aca1948e9713
loadtool: initial version compiles and links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
22
diff
changeset
|
25 fc-loadtool: ${LOADTOOL_OBJS} |
aca1948e9713
loadtool: initial version compiles and links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
22
diff
changeset
|
26 ${CC} -o $@ ${LOADTOOL_OBJS} |
aca1948e9713
loadtool: initial version compiles and links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
22
diff
changeset
|
27 |
42
5da0cbee2b89
fc-xram tool written, compiles, now needs to be debugged
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
35
diff
changeset
|
28 fc-xram: ${XRAM_OBJS} |
5da0cbee2b89
fc-xram tool written, compiles, now needs to be debugged
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
35
diff
changeset
|
29 ${CC} -o $@ ${XRAM_OBJS} |
5da0cbee2b89
fc-xram tool written, compiles, now needs to be debugged
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
35
diff
changeset
|
30 |
46
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
31 # The loadagent.srec image needs to be installed in the "system" directory |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
32 # where fc-loadtool and fc-xram will find it. However, we have a dilemma: |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
33 # loadagent is built in the ../target-utils tree with the target cross-gcc, |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
34 # but the logical place to install it is here. The following hack is our |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
35 # workaround. |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
36 # |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
37 # It is also conceivable that after the FreeCalypso project matures, |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
38 # some people will want to flash images built by others, without setting up |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
39 # their own cross-gcc environments for the ARM7TDMI target. However, |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
40 # the loadtools subpackage is something that every user will need to build |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
41 # from source on his/her "loading" machine. The planned solution is to |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
42 # package a "release" of fc-loadtools which will be the present source |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
43 # directory with a prebuilt loadagent.srec included. |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
44 |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
45 loadagent.srec: |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
46 @if [ -r ${LASRC}/loadagent.srec ]; then \ |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
47 true; \ |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
48 else \ |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
49 echo "Error: I need to install loadagent.srec in ${INSTSCR},"; \ |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
50 echo "but I cannot find it: neither in . nor in ${LASRC}"; \ |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
51 false; \ |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
52 fi |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
53 ln -s ${LASRC}/loadagent.srec . |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
54 |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
55 install: ${PROGS} ${SCRIPTS} loadagent.srec |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
56 mkdir -p ${INSTBIN} |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
57 install -c ${PROGS} ${INSTBIN} |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
58 mkdir -p ${INSTSCR} |
eb97cfe5e31a
finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
45
diff
changeset
|
59 install -c loadagent.srec ${SCRIPTS} ${INSTSCR} |
30
af6d763badfb
loadtools: install target added
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
29
diff
changeset
|
60 |
8
acaac9162574
loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 clean: |
9
fea204bc7674
fc-sertool compiles
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
8
diff
changeset
|
62 rm -f *.o *.out *errs ${PROGS} |