5bf8b1fd2d6ef3f19755ebaad153a2d98a49edc7
[psensor-pkg-debian.git] / Makefile.am
1 check-local: checkpatch.pl
2         find $(top_srcdir)/src -name \*.c -exec $(srcdir)/checkpatch.pl --ignore SPLIT_STRING --show-types -q --no-tree  -emacs -f {} \;
3         find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl --ignore SPLIT_STRING --show-types -q --no-tree  -emacs -f {} \;
4
5 DEFS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@
6
7 EXTRA_DIST = checkpatch.pl \
8         spelling.txt \
9         test-cppcheck.sh \
10         test-io-dir-list.sh
11
12 check_PROGRAMS = test-io-dir-list \
13         test-psensor-type-to-unit-str \
14         test-psensor-value-to-str \
15         test-url-encode \
16         test-url-normalize
17
18 AM_CPPFLAGS = -Wall -Werror
19
20 LIBS += ../src/lib/libpsensor.a \
21         $(SENSORS_LIBS)
22
23 if ATASMART
24 LIBS += $(ATASMART_LIBS)
25 endif
26
27 if GTOP
28 LIBS += $(GTOP_LIBS)
29 endif
30
31 test_io_dir_list_SOURCES = test_io_dir_list.c
32 test_psensor_type_to_unit_str_SOURCES = test_psensor_type_to_unit_str.c
33 test_psensor_type_to_unit_str_CFLAGS = -I$(top_srcdir)/src/lib
34 test_psensor_value_to_str_SOURCES = test_psensor_value_to_str.c
35 test_psensor_value_to_str_CFLAGS = -I$(top_srcdir)/src/lib
36 test_url_encode_SOURCES = test_url_encode.c
37 test_url_normalize_SOURCES = test_url_normalize.c
38
39 TESTS = test-io-dir-list.sh \
40         test-psensor-type-to-unit-str \
41         test-psensor-value-to-str \
42         test-url-encode \
43         test-url-normalize
44
45 if CPPCHECK
46 TESTS += test-cppcheck.sh
47 endif