xref: /plan9/sys/src/cmd/jpg/mkfile (revision d1be6b086622eecc0da76db1fbd64349a5e85293)
1</$objtype/mkfile
2
3TARG=jpg\
4	gif\
5	togif\
6	ppm\
7	toppm\
8	png\
9	topng\
10	yuv\
11	ico\
12	toico\
13	bmp\
14	tga\
15	v210\
16
17IMFILES=\
18	torgbv.$O\
19	totruecolor.$O\
20	writerawimage.$O\
21
22HFILES=imagefile.h\
23
24LIB=
25
26BIN=/$objtype/bin
27UPDATE=\
28	mkfile\
29	$HFILES\
30	${IMFILES:%.$O=%.c}\
31	readjpg.c\
32	readgif.c\
33	writegif.c\
34	onechan.c\
35	readppm.c\
36	multichan.c\
37	readpng.c\
38	writepng.c\
39	rgbycc.c\
40	rgbrgbv.c\
41	readtga.c\
42	${TARG:%=%.c}\
43
44</sys/src/cmd/mkmany
45c=`{sed -n 's/^O=//p' /$cputype/mkfile}
46
47$O.tga:		$IMFILES readtga.$O tga.$O
48$O.jpg:		$IMFILES readjpg.$O jpg.$O
49$O.gif:		$IMFILES readgif.$O gif.$O
50$O.togif:	writegif.$O onechan.$O togif.$O torgbv.$O
51$O.ppm:		$IMFILES readppm.$O ppm.$O
52$O.toppm:	writeppm.$O multichan.$O toppm.$O
53$O.png:		$IMFILES readpng.$O png.$O
54$O.topng:	writepng.$O topng.$O
55$O.yuv:		$IMFILES readyuv.$O yuv.$O
56$O.bmp:		$IMFILES readbmp.$O bmp.$O
57$O.v210:	$IMFILES readv210.$O v210.$O
58
59torgbv.$O:	ycbcr.h rgbv.h
60
61ycbcr.h:	rgbycc.c
62	$c^c rgbycc.c
63	$c^l -o $c.rgbycc rgbycc.$c
64	$c.rgbycc > ycbcr.h
65
66rgbv.h:	rgbrgbv.c
67	$c^c rgbrgbv.c
68	$c^l -o $c.rgbrgbv rgbrgbv.$c
69	$c.rgbrgbv > rgbv.h
70
71nuke:V:	nuke-headers
72
73nuke-headers:V:
74	rm -f rgbv.h ycbcr.h
75