xref: /freebsd/sys/contrib/dev/ral/Makefile (revision af23369a6deaaeb612ab266eb88b8bb8d560c322)
1#	$FreeBSD$
2
3FILES=	rt2561s.fw.uu rt2561.fw.uu rt2661.fw.uu rt2860.fw.uu
4
5rt2561s.fw.uu: microcode.h LICENSE
6	(echo '#include <sys/types.h>'; \
7	 echo '#include <unistd.h>'; \
8	 cat microcode.h; \
9	 echo 'int main(void) { \
10	     write(1, rt2561s, sizeof(rt2561s)); return 0; \
11	 }') | ${CC} -o build -x c -
12	(sed 's/^/# /' LICENSE; ./build | uuencode rt2561s.fw) > ${.TARGET}
13
14rt2561.fw.uu: microcode.h LICENSE
15	(echo '#include <sys/types.h>'; \
16	 echo '#include <unistd.h>'; \
17	 cat microcode.h; \
18	 echo 'int main(void) { \
19	     write(1, rt2561, sizeof(rt2561)); return 0; \
20	 }') | ${CC} -o build -x c -
21	(sed 's/^/# /' LICENSE; ./build | uuencode rt2561.fw) > ${.TARGET}
22
23rt2661.fw.uu: microcode.h LICENSE
24	(echo '#include <sys/types.h>'; \
25	 echo '#include <unistd.h>'; \
26	 cat microcode.h; \
27	 echo 'int main(void) { \
28	     write(1, rt2661, sizeof(rt2661)); return 0; \
29	 }') | ${CC} -o build -x c -
30	(sed 's/^/# /' LICENSE; ./build | uuencode rt2661.fw) > ${.TARGET}
31
32rt2860.fw.uu: microcode.h LICENSE
33	(echo '#include <sys/types.h>'; \
34	 echo '#include <unistd.h>'; \
35	 cat microcode.h; \
36	 echo 'int main(void) { \
37	     write(1, rt2860, sizeof(rt2860)); return 0; \
38	 }') | ${CC} -o build -x c -
39	(sed 's/^/# /' LICENSE; ./build | uuencode rt2860.fw) > ${.TARGET}
40
41clean:
42	rm -f build build.c ${FILES}
43
44.include <bsd.prog.mk>
45