annotate Makefile @ 68:5cbde3c80c24

fteeprom-{erase,prog}: detach logic: change to detach by default As it turns out, detaching all ttyUSB interfaces of a multichannel device does not require outside knowledge of how many channels there are, as in our previous -d option design that is being removed here - instead we can read the bNumInterfaces constant from the USB device's config descriptor and thus know how many interfaces there are in total. Based on this discovery, change the design of fteeprom-{erase,prog} as follows: * remove -d option; * flip the default to where we detach all interfaces by default; * add -n option to NOT detach any interfaces.
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 13 Sep 2023 06:37:03 +0000
parents 61cdcf2eb17b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 CC= gcc
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 CFLAGS= -O2
52
61cdcf2eb17b top Makefile: add cp2102
Mychaela Falconia <falcon@freecalypso.org>
parents: 28
diff changeset
3 PROGDIR=cp2102 duart28 eeproms fteeprom
15
e1629a7c8ae3 top Makefile: add new local libraries
Mychaela Falconia <falcon@freecalypso.org>
parents: 6
diff changeset
4 LIBDIR= libftmini libuwrap
e1629a7c8ae3 top Makefile: add new local libraries
Mychaela Falconia <falcon@freecalypso.org>
parents: 6
diff changeset
5 SUBDIR= ${PROGDIR} ${LIBDIR}
6
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 INSTALL_PREFIX= /opt/freecalypso
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 all: ${SUBDIR}
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
52
61cdcf2eb17b top Makefile: add cp2102
Mychaela Falconia <falcon@freecalypso.org>
parents: 28
diff changeset
11 cp2102: libuwrap
28
c4b4ebaa2117 top Makefile: add duart28
Mychaela Falconia <falcon@freecalypso.org>
parents: 17
diff changeset
12 duart28: libftmini libuwrap
17
2e21b551b971 top Makefile: fteeprom now depends on local libs
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
13 fteeprom: libftmini libuwrap
2e21b551b971 top Makefile: fteeprom now depends on local libs
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
14
6
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 ${SUBDIR}: FRC
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 cd $@; ${MAKE} ${MFLAGS} CC=${CC} CFLAGS="${CFLAGS}"
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 clean: FRC
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 rm -f a.out core errs
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 install: FRC
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 mkdir -p ${INSTALL_PREFIX}
15
e1629a7c8ae3 top Makefile: add new local libraries
Mychaela Falconia <falcon@freecalypso.org>
parents: 6
diff changeset
24 for i in ${PROGDIR}; do (cd $$i; ${MAKE} ${MFLAGS} \
6
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 INSTALL_PREFIX=${INSTALL_PREFIX} install); done
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
d4151cef9d95 add top Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 FRC: