annotate fteeprom/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 85256d5aa559
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 CC= gcc
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 CFLAGS= -O2
66
85256d5aa559 ftee-fix-cksum program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 65
diff changeset
3 PROGS= ftee-decode ftee-fix-cksum ftee-gen2232c ftee-gen2232h ftee-gen232r \
85256d5aa559 ftee-fix-cksum program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 65
diff changeset
4 ftee-mkblank fteeprom-erase fteeprom-prog fteeprom-read
16
1d76deae1e74 fteeprom-read: convert to new local libs
Mychaela Falconia <falcon@freecalypso.org>
parents: 7
diff changeset
5 LIBS= ../libftmini/libftmini.a ../libuwrap/libuwrap.a
4
2e84619e7422 fteeprom/Makefile: implement INSTALL_PREFIX
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
6
2e84619e7422 fteeprom/Makefile: implement INSTALL_PREFIX
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
7 INSTALL_PREFIX= /opt/freecalypso
2e84619e7422 fteeprom/Makefile: implement INSTALL_PREFIX
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
8
2e84619e7422 fteeprom/Makefile: implement INSTALL_PREFIX
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
9 INSTBIN=${INSTALL_PREFIX}/bin
0
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 all: ${PROGS}
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
65
225dc1d9f2f1 ftee-decode program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 64
diff changeset
13 ftee-decode: ftee-decode.o read_eeprom_image.o
225dc1d9f2f1 ftee-decode program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 64
diff changeset
14 ${CC} ${CFLAGS} -o $@ $@.o read_eeprom_image.o
225dc1d9f2f1 ftee-decode program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 64
diff changeset
15
66
85256d5aa559 ftee-fix-cksum program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 65
diff changeset
16 ftee-fix-cksum: ftee-fix-cksum.o read_eeprom_image.o
85256d5aa559 ftee-fix-cksum program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 65
diff changeset
17 ${CC} ${CFLAGS} -o $@ $@.o read_eeprom_image.o
85256d5aa559 ftee-fix-cksum program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 65
diff changeset
18
7
b2c891299e83 ftee-gen*: look for EEPROM config file in /opt/freecalypso/ftdi
Mychaela Falconia <falcon@freecalypso.org>
parents: 4
diff changeset
19 ftee-gen2232c: ftee-gen2232c.o filesearch.o
b2c891299e83 ftee-gen*: look for EEPROM config file in /opt/freecalypso/ftdi
Mychaela Falconia <falcon@freecalypso.org>
parents: 4
diff changeset
20 ${CC} ${CFLAGS} -o $@ $@.o filesearch.o
0
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
7
b2c891299e83 ftee-gen*: look for EEPROM config file in /opt/freecalypso/ftdi
Mychaela Falconia <falcon@freecalypso.org>
parents: 4
diff changeset
22 ftee-gen2232h: ftee-gen2232h.o filesearch.o
b2c891299e83 ftee-gen*: look for EEPROM config file in /opt/freecalypso/ftdi
Mychaela Falconia <falcon@freecalypso.org>
parents: 4
diff changeset
23 ${CC} ${CFLAGS} -o $@ $@.o filesearch.o
0
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
7
b2c891299e83 ftee-gen*: look for EEPROM config file in /opt/freecalypso/ftdi
Mychaela Falconia <falcon@freecalypso.org>
parents: 4
diff changeset
25 ftee-gen232r: ftee-gen232r.o filesearch.o
b2c891299e83 ftee-gen*: look for EEPROM config file in /opt/freecalypso/ftdi
Mychaela Falconia <falcon@freecalypso.org>
parents: 4
diff changeset
26 ${CC} ${CFLAGS} -o $@ $@.o filesearch.o
0
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 ftee-mkblank: ftee-mkblank.c
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 ${CC} ${CFLAGS} -o $@ $@.c
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
21
af801ab43a33 fteeprom-erase: convert to new local libs
Mychaela Falconia <falcon@freecalypso.org>
parents: 20
diff changeset
31 fteeprom-erase: fteeprom-erase.o ${LIBS}
af801ab43a33 fteeprom-erase: convert to new local libs
Mychaela Falconia <falcon@freecalypso.org>
parents: 20
diff changeset
32 ${CC} ${CFLAGS} -o $@ $@.o ${LIBS} -lusb
0
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
64
ca2250b4833d fteeprom: factor out EEPROM image reading functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 21
diff changeset
34 fteeprom-prog: fteeprom-prog.o read_eeprom_image.o ${LIBS}
ca2250b4833d fteeprom: factor out EEPROM image reading functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 21
diff changeset
35 ${CC} ${CFLAGS} -o $@ $@.o read_eeprom_image.o ${LIBS} -lusb
0
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
16
1d76deae1e74 fteeprom-read: convert to new local libs
Mychaela Falconia <falcon@freecalypso.org>
parents: 7
diff changeset
37 fteeprom-read: fteeprom-read.o ${LIBS}
1d76deae1e74 fteeprom-read: convert to new local libs
Mychaela Falconia <falcon@freecalypso.org>
parents: 7
diff changeset
38 ${CC} ${CFLAGS} -o $@ $@.o ${LIBS} -lusb
0
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 install:
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 mkdir -p ${INSTBIN}
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 install -c ${PROGS} ${INSTBIN}
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 clean:
11b8a30333b3 fteeprom: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 rm -f ${PROGS} *.o *errs *.out