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.
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.
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
14 AUTOMAKE_OPTIONS = parallel-tests
19 -I$(top_srcdir)/discover \
20 -DLOCAL_STATE_DIR='"$(localstatedir)"' \
21 -DTEST_CONF_BASE='"$(srcdir)/data"' \
22 -DDEBUG -DPETITBOOT_TEST
25 AM_CFLAGS = -O0 -ggdb -Wall -Wextra -Werror
29 check_PROGRAMS = $(TESTS)
30 check_LIBRARIES = $(test_libs)
33 common_libs = $(top_builddir)/lib/libpbcore.la
36 libtest.o: $(libtest_o_OBJECTS)
40 parser_test_objs = $(top_srcdir)/discover/resource.c \
41 $(top_srcdir)/discover/paths.c \
42 $(top_srcdir)/discover/device-handler.c \
43 $(top_srcdir)/discover/parser-conf.c
46 LDADD = $(common_libs) $(test_libs)
48 libtest_o_SOURCES = utils.c parser-test.h handler.c main.c $(parser_test_objs)
50 $(check_PROGRAMS): %: %.embedded-config.o
51 $(check_PROGRAMS): LDADD += $@.embedded-config.o
53 extract_config = $(srcdir)/extract-config.awk
55 %.embedded-config.c: %.c $(extract_config)
56 gawk --file=$(extract_config) $^ > $@
58 EXTRA_DIST = $(check_DATA) $(extract_config)
60 CLEANFILES = $(foreach f, $(check_PROGRAMS), \
61 $(f).embedded-config.c $(f).embedded-config.o)