summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: d77b25bb4b07c976e8844f79132422e197a2a6a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
SUBDIRS = ddb

check_PROGRAMS = \
	test-camera-list \
	test-pedantic-c

if HAVE_CXX
check_PROGRAMS += test-pedantic-cxx
endif

check_SCRIPTS = \
	check-camera-list.sh

EXTRA_DIST = \
	check-camera-list.sh.in

# TESTS = $(check_SCRIPTS)

INSTALL_TESTS = check-camera-list.sh

CLEANFILES = $(check_SCRIPTS)

noinst_PROGRAMS =	\
	test-gphoto2	\
	test-filesys

test_gphoto2_SOURCE = test-gphoto2.c
test_gphoto2_LDADD = \
	$(top_builddir)/libgphoto2/libgphoto2.la \
	$(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \
	$(LIBEXIF_LIBS) \
	$(INTLLIBS)

test_filesys_SOURCE = test-filesys.c
test_filesys_LDADD = \
	$(top_builddir)/libgphoto2/libgphoto2.la \
	$(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \
	$(LIBEXIF_LIBS) \
	$(INTLLIBS)

test_camera_list_SOURCE = test-camera-list.c
test_camera_list_LDADD = \
	$(top_builddir)/libgphoto2/libgphoto2.la \
	$(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \
	$(LIBEXIF_LIBS) \
	$(INTLLIBS)

if HAVE_GCC
PEDANTIC_CFLAGS = -std=c99 -pedantic -W -Wall -Wextra -Werror
PEDANTIC_CXXFLAGS = -std=c++98 -pedantic -W -Wall -Wextra -Werror
else
PEDANTIC_CFLAGS = 
PEDANTIC_CXXFLAGS = 
endif

test_pedantic_c_SOURCES = test-pedantic-compilation.c
test_pedantic_c_CPPFLAGS = $(PEDANTIC_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)
test_pedantic_c_LDADD = \
	$(top_builddir)/libgphoto2/libgphoto2.la \
	$(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \
	$(LIBEXIF_LIBS) \
	$(INTLLIBS)

test_pedantic_cxx_SOURCES = test-pedantic-compilation.cxx
test_pedantic_cxx_CXXFLAGS = $(PEDANTIC_CXXFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)
test_pedantic_cxx_LDADD = \
	$(top_builddir)/libgphoto2/libgphoto2.la \
	$(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \
	$(LIBEXIF_LIBS) \
	$(INTLLIBS)

include $(top_srcdir)/installcheck.mk