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