avoid to use cpp in code
[psensor.git] / src / lib / Makefile.am
1 noinst_LIBRARIES = libpsensor.a
2
3 libpsensor_a_SOURCES = \
4         amd.h\
5         bool.h\
6         color.h color.c\
7         hdd.h hdd_hddtemp.c\
8         lmsensor.h\
9         measure.h measure.c\
10         nvidia.h\
11         plog.h plog.c\
12         pmutex.h pmutex.c\
13         psensor.h psensor.c\
14         ptime.h ptime.c\
15         pio.h pio.c\
16         slog.c slog.h\
17         temperature.c temperature.h\
18         url.c url.h
19
20 AM_CPPFLAGS = -Wall -Werror
21
22 if SENSORS
23 libpsensor_a_SOURCES += lmsensor.c
24 LIBS += $(SENSORS_LIBS)
25 endif
26
27 if ATASMART
28 libpsensor_a_SOURCES += hdd_atasmart.c
29 LIBS += $(ATASMART_LIBS)
30 AM_CPPFLAGS += $(ATASMART_CFLAGS)
31 endif
32
33 if NVIDIA
34 libpsensor_a_SOURCES += nvidia.c
35 endif
36
37 if LIBATIADL
38 LIBS += $(LIBATIADL_LIBS)
39 AM_CPPFLAGS += $(LIBATIADL_CFLAGS)
40 libpsensor_a_SOURCES += amd.c
41 endif
42
43 if GTOP
44 libpsensor_a_SOURCES += pgtop2.c pgtop2.h
45 LIBS += $(GTOP_LIBS)
46 AM_CPPFLAGS += $(GTOP_CFLAGS)
47 endif
48
49 if JSON
50 libpsensor_a_SOURCES += psensor_json.h psensor_json.c
51 LIBS += $(JSON_LIBS)
52 AM_CPPFLAGS += $(JSON_CFLAGS)
53 endif
54
55 if LIBUDISKS2
56 libpsensor_a_SOURCES += pudisks2.c pudisks2.h
57 LIBS += $(LIBUDISKS2_LIBS)
58 AM_CPPFLAGS += $(LIBUDISKS2_CFLAGS)
59 endif
60
61 EXTRA_DIST=$(libpsensor_a_SOURCES) \
62         amd.c \
63         pgtop2.c pgtop2.h \
64         lmsensors.c \
65         nvidia.c \
66         pudisks2.c pudisks2.h