1if BUNDLED_ISL
2    MAYBE_ISL = isl
3    ISL_LA = $(top_builddir)/isl/libisl.la
4    LOCAL_ISL_LA = isl/libisl.la
5endif
6if BUNDLED_PET
7    MAYBE_PET = pet
8    PET_LA = $(top_builddir)/pet/libpet.la
9endif
10
11SUBDIRS = $(MAYBE_ISL) $(MAYBE_PET) .
12
13FORCE:
14isl/libisl.la: FORCE
15	cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
16pet/libpet.la: FORCE
17	cd pet; $(MAKE) $(AM_MAKEFLAGS) libpet.la
18
19ACLOCAL_AMFLAGS = -I m4
20
21LIB_ISL = $(ISL_LA) @ISL_LIBS@
22LIB_PET = $(PET_LA) @PET_LIBS@
23
24AM_CPPFLAGS = @ISL_CFLAGS@ @PET_CFLAGS@
25LDADD = $(LIB_PET) $(LIB_ISL)
26
27bin_PROGRAMS = ppcg
28ppcg_SOURCES = \
29	cpu.c \
30	cpu.h \
31	cuda.c \
32	cuda.h \
33	opencl.c \
34	opencl.h \
35	cuda_common.h \
36	cuda_common.c \
37	gpu.c \
38	gpu.h \
39	gpu_array_tile.c \
40	gpu_array_tile.h \
41	gpu_group.c \
42	gpu_group.h \
43	gpu_hybrid.c \
44	gpu_hybrid.h \
45	gpu_print.c \
46	gpu_print.h \
47	gpu_tree.c \
48	gpu_tree.h \
49	grouping.c \
50	hybrid.c \
51	hybrid.h \
52	schedule.c \
53	schedule.h \
54	ppcg_options.c \
55	ppcg_options.h \
56	ppcg.c \
57	ppcg.h \
58	print.c \
59	print.h \
60	util.c \
61	util.h \
62	version.c
63
64TESTS = @extra_tests@
65EXTRA_TESTS = opencl_test.sh polybench_test.sh
66TEST_EXTENSIONS = .sh
67
68EXTRA_DIST = \
69	ocl_utilities.c \
70	ocl_utilities.h \
71	tests
72
73dist-hook:
74	echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
75
76gitversion.h: @GIT_HEAD@
77	$(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@
78