
INTEL_G4I = 

INTEL_G4A	= null.g4a
INTEL_G4B	= null.g4b
INTEL_G4B_GEN5	= null.g4b.gen5
INTEL_G6A	= null.g6a
INTEL_G6B	= null.g6b

INTEL_PP_G4B_GEN5 = \
	nv12_avs_nv12.g4b.gen5			\
	nv12_dn_nv12.g4b.gen5                   \
	nv12_dndi_nv12.g4b.gen5			\
	nv12_load_save_nv12.g4b.gen5		\
	nv12_load_save_pa.g4b.gen5		\
	nv12_load_save_pl3.g4b.gen5             \
	nv12_load_save_rgbx.g4b.gen5		\
	nv12_scaling_nv12.g4b.gen5		\
	pa_load_save_pa.g4b.gen5		\
	pa_load_save_nv12.g4b.gen5		\
	pa_load_save_pl3.g4b.gen5		\
	pl3_load_save_nv12.g4b.gen5             \
	pl3_load_save_pa.g4b.gen5		\
	pl3_load_save_pl3.g4b.gen5              \
	rgbx_load_save_nv12.g4b.gen5		\
	$(NULL)

INTEL_PP_G6B = \
	nv12_avs_nv12.g6b			\
	nv12_dn_nv12.g6b                	\
	nv12_dndi_nv12.g6b			\
	nv12_load_save_nv12.g6b			\
	nv12_load_save_pa.g6b			\
	nv12_load_save_pl3.g6b          	\
	nv12_load_save_rgbx.g6b			\
	nv12_scaling_nv12.g6b			\
	pa_load_save_pa.g6b			\
	pa_load_save_nv12.g6b			\
	pa_load_save_pl3.g6b			\
	pl3_load_save_nv12.g6b          	\
	pl3_load_save_pl3.g6b           	\
	pl3_load_save_pa.g6b			\
	rgbx_load_save_nv12.g6b			\
	$(NULL)

INTEL_PP_ASM = \
	nv12_avs_nv12.asm			\
	nv12_dn_nv12.asm                	\
	nv12_dndi_nv12.asm			\
	nv12_load_save_nv12.asm			\
	nv12_load_save_pa.asm			\
	nv12_load_save_pl3.asm          	\
	nv12_load_save_rgbx.asm			\
	nv12_scaling_nv12.asm			\
	pa_load_save_pa.asm			\
	pa_load_save_nv12.asm			\
	pa_load_save_pl3.asm			\
	pl3_load_save_nv12.asm          	\
	pl3_load_save_pl3.asm           	\
	pl3_load_save_pa.asm			\
	rgbx_load_save_nv12.asm			\
	$(NULL)

INTEL_PP_ASM += \
	Common/AYUV_Load_16x8.asm			\
	Common/IMC3_Load_8x4.asm			\
	Common/IMC3_Load_8x5.asm			\
	Common/IMC3_Load_9x5.asm			\
	Common/Init_All_Regs.asm			\
	Common/Multiple_Loop.asm			\
	Common/Multiple_Loop_Head.asm			\
	Common/NV11_Load_4x8.asm			\
	Common/NV11_Load_5x8.asm			\
	Common/NV12_Load_8x4.asm			\
	Common/NV12_Load_8x5.asm			\
	Common/NV12_Load_9x5.asm			\
	Common/P208_Load_8x8.asm			\
	Common/P208_Load_9x8.asm			\
	Common/PA_Load_8x8.asm				\
	Common/PA_Load_9x8.asm				\
	Common/PL16x8_PL8x4.asm				\
	Common/PL16x8_PL8x8.asm				\
	Common/PL4x8_Save_NV11.asm			\
	Common/PL5x8_PL16x8.asm				\
	Common/PL5x8_PL8x8.asm				\
	Common/PL8x4_Save_IMC3.asm			\
	Common/PL8x4_Save_NV12.asm			\
	Common/PL8x5_PL8x8.asm				\
	Common/PL8x8_PL8x4.asm				\
	Common/PL8x8_Save_P208.asm			\
	Common/PL8x8_Save_PA.asm			\
	Common/PL9x5_PL16x8.asm				\
	Common/PL9x8_PL16x8.asm				\
	Common/RGB16x8_Save_RGB.asm			\
	Common/RGB16x8_Save_RGB16.asm			\
	Common/RGB16x8_Save_Y416.asm			\
	Common/RGB_Pack.asm				\
	Common/RGBX_Load_16x8.asm			\
	Common/RGBX_to_YUV_Coef.asm			\
	Common/RGBX_Save_YUV_Fix.asm			\
	Common/RGBX_Save_YUV_Float.asm			\
	Common/YUV_to_RGBX_Coef.asm			\
	Common/YUVX_Save_RGBX_Fix.asm       		\
	Common/YUVX_Save_RGBX_Float.asm     		\
	Common/SetupVPKernel.asm			\
	Common/readSampler16x1.asm			\
	Core_Kernels/AVS_SetupFirstBlock.asm		\
	Core_Kernels/AVS_SetupSecondBlock.asm		\
	Core_Kernels/DI_Hist_Save.asm			\
	Core_Kernels/DI_SAVE_PA.asm			\
	Core_Kernels/DNDI_COMMAND.asm			\
	Core_Kernels/DNDI_Hist_Save.asm			\
	Core_Kernels/PA_AVS_IEF_16x8.asm		\
	Core_Kernels/PA_AVS_IEF_8x4.asm			\
	Core_Kernels/PA_AVS_IEF_8x8.asm			\
	Core_Kernels/PA_AVS_IEF_Sample.asm		\
	Core_Kernels/PA_AVS_IEF_Unpack_16x8.asm		\
	Core_Kernels/PA_AVS_IEF_Unpack_8x4.asm		\
	Core_Kernels/PA_AVS_IEF_Unpack_8x8.asm		\
	Core_Kernels/PA_DNDI_ALG.asm			\
	Core_Kernels/PA_DN_ALG.asm			\
	Core_Kernels/PA_Scaling.asm			\
	Core_Kernels/PL2_AVS_IEF_16x8.asm		\
	Core_Kernels/PL2_AVS_IEF_8x4.asm		\
	Core_Kernels/PL2_AVS_IEF_8x8.asm		\
	Core_Kernels/PL2_AVS_IEF_Unpack_16x8.asm	\
	Core_Kernels/PL2_AVS_IEF_Unpack_8x4.asm		\
	Core_Kernels/PL2_AVS_IEF_Unpack_8x8.asm		\
	Core_Kernels/PL2_Scaling.asm			\
	Core_Kernels/PL3_AVS_IEF_16x8.asm		\
	Core_Kernels/PL3_AVS_IEF_8x4.asm		\
	Core_Kernels/PL3_AVS_IEF_8x8.asm		\
	Core_Kernels/PL3_AVS_IEF_Unpack_16x8.asm	\
	Core_Kernels/PL3_AVS_IEF_Unpack_8x4.asm		\
	Core_Kernels/PL3_AVS_IEF_Unpack_8x8.asm		\
	Core_Kernels/PL3_Scaling.asm			\
	Core_Kernels/PL_DNDI_ALG.asm			\
	Core_Kernels/PL_DNDI_ALG_UVCopy_NV11.asm	\
	Core_Kernels/PL_DNDI_ALG_UVCopy_NV12.asm	\
	Core_Kernels/PL_DNDI_ALG_UVCopy_P208.asm	\
	Core_Kernels/PL_DNDI_ALG_UVCopy_PL3.asm		\
	Core_Kernels/PL_DN_ALG.asm			\
	Core_Kernels/RGB_AVS_IEF_16x8.asm		\
	Core_Kernels/RGB_AVS_IEF_Unpack_16x8.asm	\
	Core_Kernels/RGB_AVS_IEF_Unscramble_16x8.asm	\
	Core_Kernels/RGB_Scaling.asm			\
	$(NULL)

INTEL_PP_INC = \
	Common/AYUV_Load_16x8.inc		\
	Common/Expansion.inc			\
	Common/PA_Load.inc			\
	Common/PL2_Load.inc			\
	Common/PL3_Load.inc			\
	Common/PL4x8_Save_NV11.inc		\
	Common/PL8x4_Save_IMC3.inc		\
	Common/PL8x4_Save_NV12.inc		\
	Common/PL8x8_PL8x4.inc			\
	Common/PL8x8_Save_P208.inc		\
	Common/PL8x8_Save_PA.inc		\
	Common/RGB16x8_Save_RGB.inc		\
	Common/RGB16x8_Save_RGB16.inc		\
	Common/RGB16x8_Save_Y416.inc		\
	Common/RGBX_Load_16x8.inc		\
	Common/common.inc			\
	Common/undefall.inc			\
	Core_Kernels/AVS_IEF.inc		\
	Core_Kernels/DI.inc			\
	Core_Kernels/DNDI.inc			\
	Core_Kernels/Scaling.inc
	$(NULL)

INTEL_PP_GEN5_ASM = $(INTEL_PP_G4B_GEN5:%.g4b.gen5=%.g5s)
INTEL_PP_GEN6_ASM = $(INTEL_PP_G6B:%.g6b=%.g6s)

TARGETS  =
if HAVE_GEN4ASM
TARGETS += $(INTEL_PP_G4B_GEN5)
TARGETS += $(INTEL_PP_G6B)
endif

all-local: $(TARGETS)

SUFFIXES = .g4a .g4b .g4b.gen5 .g6a .g6b .g5s .g6s .asm

if HAVE_GEN4ASM
.g4a.g4b:
	$(AM_V_GEN)m4 $*.g4a > $*.g4m			&& \
	$(AM_V_GEN)$(GEN4ASM) -o $@ $*.g4m		&& \
	$(AM_V_GEN)$(GEN4ASM) -g 5 -o $@.gen5 $*.g4m	&& \
	rm $*.g4m

.g6a.g6b:
	$(AM_V_GEN)m4 $< > $*.g6m			&& \
	$(AM_V_GEN)$(GEN4ASM) -g 6 -o $@ $*.g6m		&& \
	rm $*.g6m

$(INTEL_G4B): $(INTEL_G4I)

$(INTEL_PP_GEN5_ASM): $(INTEL_PP_ASM)
.asm.g5s:
	$(AM_V_GEN)cpp -D DEV_ILK -I $(srcdir)/Common/ -I $(srcdir)/Core_Kernels $< > _pp0.$@; \
	$(PYTHON2) $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
	rm _pp0.$@
.g5s.g4b.gen5:
	$(AM_V_GEN)$(GEN4ASM) -a -o $@ -g 5 $<

$(INTEL_PP_GEN6_ASM): $(INTEL_PP_ASM)
.asm.g6s:
	$(AM_V_GEN)cpp -D GT -I $(srcdir)/Common/ -I $(srcdir)/Core_Kernels $< > _pp0.$@; \
	$(PYTHON2) $(top_srcdir)/src/shaders/gpp.py _pp0.$@ $@; \
	rm _pp0.$@
.g6s.g6b:
	$(AM_V_GEN)$(GEN4ASM) -a -o $@ -g 6 $<
endif

CLEANFILES = $(INTEL_PP_GEN5_ASM) $(INTEL_PP_GEN6_ASM)

EXTRA_DIST = \
	$(INTEL_G4A)		\
	$(INTEL_G4B)		\
	$(INTEL_G4B_GEN5)	\
	$(INTEL_G4I)		\
	$(INTEL_G6B)		\
	$(INTEL_PP_ASM)		\
	$(INTEL_PP_G4B_GEN5)	\
	$(INTEL_PP_G6B)		\
	$(INTEL_PP_INC)		\
	$(NULL)

# Extra clean files so that maintainer-clean removes *everything*
MAINTAINERCLEANFILES = Makefile.in
