]> git.ozlabs.org Git - petitboot/blob - test/parser/Makefile.am
discover/grub2: Move parser-api definitions to parser.y
[petitboot] / test / parser / Makefile.am
1 #  This program is free software; you can redistribute it and/or modify
2 #  it under the terms of the GNU General Public License as published by
3 #  the Free Software Foundation; version 2 of the License.
4 #
5 #  This program is distributed in the hope that it will be useful,
6 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8 #  GNU General Public License for more details.
9 #
10 #  You should have received a copy of the GNU General Public License
11 #  along with this program; if not, write to the Free Software
12 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
13
14 AUTOMAKE_OPTIONS = parallel-tests
15
16 AM_CPPFLAGS = \
17         -I$(top_srcdir) \
18         -I$(top_srcdir)/lib \
19         -I$(top_srcdir)/discover \
20         -DLOCAL_STATE_DIR='"$(localstatedir)"' \
21         -DTEST_CONF_BASE='"$(srcdir)/data"' \
22         -DDEBUG -DPETITBOOT_TEST
23
24 AM_CFLAGS = -O0 -ggdb -Wall -Wextra -Werror
25
26 LDADD = $(top_builddir)/lib/libpbcore.la libtest.ro
27
28 TESTS = \
29         test-null \
30         test-grub2-single \
31         test-grub2-multiple-resolve \
32         test-grub2-f18-ppc64 \
33         test-grub2-ubuntu-13_04-x86 \
34         test-kboot-single \
35         test-yaboot-single \
36         test-yaboot-partition \
37         test-yaboot-partition-override \
38         test-yaboot-external \
39         test-yaboot-root-global \
40         test-yaboot-root-override \
41         test-yaboot-device-override \
42         test-yaboot-default \
43         test-yaboot-rh8-ppc64 \
44         test-pxe-empty \
45         test-pxe-single \
46         test-pxe-initrd-in-append \
47         test-pxe-default
48
49 $(TESTS): %: %.embedded-config.o
50 $(TESTS): LDADD += $@.embedded-config.o
51
52 extract_config = $(srcdir)/extract-config.awk
53
54 %.embedded-config.c: %.c $(extract_config)
55         $(AWK) -f $(extract_config) $< > $@
56
57 # objects under test
58 parser_objs = \
59         $(top_srcdir)/discover/yaboot-parser.c \
60         $(top_srcdir)/discover/kboot-parser.c \
61         $(top_srcdir)/discover/grub2-parser.c \
62         $(top_srcdir)/discover/pxe-parser.c \
63         $(top_srcdir)/discover/resource.c \
64         $(top_srcdir)/discover/paths.c \
65         $(top_srcdir)/discover/device-handler.c \
66         $(top_srcdir)/discover/parser-conf.c
67
68 libtest_ro_SOURCES = \
69         main.c \
70         utils.c \
71         handler.c \
72         parser-test.h \
73         $(parser_objs)
74
75 libtest.ro$(EXEEXT): $(libtest_ro_OBJECTS)
76         $(LD) -o $@ -r $^
77
78 check_PROGRAMS = $(TESTS) libtest.ro
79
80 check_DATA = \
81         data/grub2-f18-ppc64.conf \
82         data/grub2-ubuntu-13_04-x86.conf \
83         data/yaboot-rh8-ppc64.conf
84
85 EXTRA_DIST = $(check_DATA) $(extract_config)
86
87 CLEANFILES = \
88         $(foreach f, $(TESTS), $(f).embedded-config.c $(f).embedded-config.o)
89
90 MAINTAINERCLEANFILES = Makefile.in