annotate Makefile @ 472:368ffb8a08e5

CHANGES: CC= and CFLAGS= override-ability documented
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 12 Feb 2019 00:30:37 +0000
parents 8f3fe2d1fda5
children 90d7c360a614
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
471
8f3fe2d1fda5 Makefile hierarchy: allow CC and CFLAGS to be overridden from the top
Mychaela Falconia <falcon@freecalypso.org>
parents: 343
diff changeset
1 CC= gcc
8f3fe2d1fda5 Makefile hierarchy: allow CC and CFLAGS to be overridden from the top
Mychaela Falconia <falcon@freecalypso.org>
parents: 343
diff changeset
2 CFLAGS= -O2
340
88fb194b4b61 top Makefile: uptools subdirectory added
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
3 PROGDIR=ffstools loadtools miscutil ringtools rvinterf uptools
284
556bb8c860fa librftab added to top Makefile as dependency for ffstools and rvinterf
Mychaela Falconia <falcon@freecalypso.org>
parents: 249
diff changeset
4 LIBDIR= librftab libserial
249
d0a4c05d98dc libserial hooked into the top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents: 219
diff changeset
5 SUBDIR= ${PROGDIR} ${LIBDIR}
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 all: ${SUBDIR}
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
284
556bb8c860fa librftab added to top Makefile as dependency for ffstools and rvinterf
Mychaela Falconia <falcon@freecalypso.org>
parents: 249
diff changeset
9 ffstools: librftab
249
d0a4c05d98dc libserial hooked into the top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents: 219
diff changeset
10 loadtools: libserial
d0a4c05d98dc libserial hooked into the top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents: 219
diff changeset
11 miscutil: libserial
284
556bb8c860fa librftab added to top Makefile as dependency for ffstools and rvinterf
Mychaela Falconia <falcon@freecalypso.org>
parents: 249
diff changeset
12 rvinterf: librftab libserial
343
940ab98efefd top Makefile: uptools need libserial for atinterf
Mychaela Falconia <falcon@freecalypso.org>
parents: 340
diff changeset
13 uptools: libserial
249
d0a4c05d98dc libserial hooked into the top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents: 219
diff changeset
14
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 ${SUBDIR}: FRC
471
8f3fe2d1fda5 Makefile hierarchy: allow CC and CFLAGS to be overridden from the top
Mychaela Falconia <falcon@freecalypso.org>
parents: 343
diff changeset
16 cd $@; ${MAKE} ${MFLAGS} CC=${CC} CFLAGS=${CFLAGS}
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 clean: FRC
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 rm -f a.out core errs
284
556bb8c860fa librftab added to top Makefile as dependency for ffstools and rvinterf
Mychaela Falconia <falcon@freecalypso.org>
parents: 249
diff changeset
20 for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 install: FRC
57
7cc2f2360922 top Makefile install rule: new packaging approach
Mychaela Falconia <falcon@freecalypso.org>
parents: 20
diff changeset
23 mkdir -p /opt/freecalypso
249
d0a4c05d98dc libserial hooked into the top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents: 219
diff changeset
24 for i in ${PROGDIR}; do (cd $$i; ${MAKE} ${MFLAGS} install); done
57
7cc2f2360922 top Makefile install rule: new packaging approach
Mychaela Falconia <falcon@freecalypso.org>
parents: 20
diff changeset
25 if [ -d target-bin ]; then \
7cc2f2360922 top Makefile install rule: new packaging approach
Mychaela Falconia <falcon@freecalypso.org>
parents: 20
diff changeset
26 mkdir -p /opt/freecalypso/target-bin; \
7cc2f2360922 top Makefile install rule: new packaging approach
Mychaela Falconia <falcon@freecalypso.org>
parents: 20
diff changeset
27 install -c -m 644 target-bin/* /opt/freecalypso/target-bin; \
7cc2f2360922 top Makefile install rule: new packaging approach
Mychaela Falconia <falcon@freecalypso.org>
parents: 20
diff changeset
28 fi
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 FRC: