1include $(top_srcdir)/build/autotools/Makefile.am.silent
2
3NULL = #
4
5CLEANFILES =
6EXTRA_DIST = I420.cg I420.pso I420.h \
7             YV12.cg YV12.pso YV12.h \
8             $(NULL)
9
10#
11# If we have python we are able to build the headers holding the fragment
12# programs.
13#
14
15if HAVE_PYTHON
16
17BUILT_SOURCES = I420.h \
18                YV12.h \
19                $(NULL)
20
21CLEANFILES += I420.h \
22              YV12.h \
23              $(NULL)
24
25# Don't use GNU make extension to avoid automake warnings, yeah I know, that's
26# annoying.
27
28I420.h: I420.pso
29	$(QUIET_GEN)$(top_srcdir)/scripts/pso2h.py -n I420_fp -o $@ $^
30
31YV12.h: YV12.pso
32	$(QUIET_GEN)$(top_srcdir)/scripts/pso2h.py -n YV12_fp -o $@ $^
33
34endif
35
36#
37# Only add those targets if we the Cg compiler is around.
38#
39
40if HAVE_CGC
41
42CLEANFILES += I420.pso \
43              YV12.pso \
44              $(NULL)
45
46I420.pso: I420.cg
47	$(QUIET_CGC)cgc -entry I420_main -profile arbfp1 -o $@ $^
48
49YV12.pso: YV12.cg
50	$(QUIET_CGC)cgc -entry YV12_main -profile arbfp1 -o $@ $^
51
52endif
53