application menu defined in the .glade.
[psensor.git] / src / Makefile.am
1 SUBDIRS = lib glade
2
3 # -export-dynamic is need for defining handlers in the glade file.
4 AM_LDFLAGS = -Wl,--as-needed -export-dynamic
5
6 if LIBMICROHTTPD
7 if JSON
8 SUBDIRS += server
9 endif
10 endif
11
12 # -no-deprecated-declarations to avoid some glib deprecation warnings
13 AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -Werror -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
14         -I$(top_srcdir)/src/lib \
15         -I$(top_srcdir)/src/unity \
16         $(GTK_CFLAGS)\
17         $(GCONF_CFLAGS)\
18         $(SENSORS_CFLAGS)
19
20 DEFS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@
21
22 LIBS = \
23         lib/libpsensor.a \
24         $(GTK_LIBS)\
25         $(GCONF_LIBS)\
26         $(PTHREAD_LIBS)\
27         $(SENSORS_LIBS)
28
29 bin_PROGRAMS = psensor
30 psensor_SOURCES = \
31         compat.h \
32         cfg.h cfg.c \
33         graph.h graph.c \
34         main.c \
35         ui.h ui.c \
36         ui_appindicator.h \
37         ui_color.h ui_color.c \
38         ui_graph.h ui_graph.c \
39         ui_pref.h ui_pref.c \
40         ui_sensorlist.h ui_sensorlist.c \
41         ui_sensorpref.h ui_sensorpref.c \
42         ui_status.h ui_status.c
43
44 if GTOP
45 AM_CPPFLAGS += $(GTOP_CFLAGS)
46 LIBS += $(GTOP_LIBS)
47 endif
48
49 if LIBNOTIFY
50 psensor_SOURCES += ui_notify.h ui_notify.c
51 LIBS += $(LIBNOTIFY_LIBS)
52 AM_CPPFLAGS += $(LIBNOTIFY_CFLAGS)
53 endif
54
55 if APPINDICATOR 
56 psensor_SOURCES += ui_appindicator.c 
57 LIBS += $(APPINDICATOR_LIBS)
58 AM_CPPFLAGS += $(APPINDICATOR_CFLAGS)
59 endif
60
61 if NVIDIA
62 AM_CPPFLAGS += $(NVIDIA_CFLAGS)
63 LIBS +=  $(NVIDIA_LIBS)
64 endif
65
66 if LIBATIADL
67 AM_CPPFLAGS += $(LIBATIADL_CFLAGS)
68 LIBS += $(LIBATIADL_LIBS)
69 endif
70
71 if ATASMART
72 AM_CPPFLAGS += $(ATASMART_CFLAGS)
73 LIBS += $(ATASMART_LIBS)
74 endif
75
76 if UNITY
77 psensor_SOURCES += ui_unity.h ui_unity.c
78 AM_CPPFLAGS += $(UNITY_CFLAGS)
79 LIBS += $(UNITY_LIBS) 
80 endif
81
82 if CURL
83 if JSON
84 psensor_SOURCES += rsensor.h rsensor.c
85 LIBS += $(CURL_LIBS) $(JSON_LIBS)
86 AM_CPPFLAGS += $(CURL_CFLAGS) $(JSON_CFLAGS)
87 endif
88 endif
89
90 schemadir = $(GCONF_SCHEMA_FILE_DIR)
91 schema_DATA = psensor.schemas
92
93 dist_man_MANS = psensor.1
94 EXTRA_DIST = description.txt psensor.schemas
95
96
97 if GCONF_SCHEMAS_INSTALL
98 install-data-local:
99         GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_srcdir)/src/$(schema_DATA)
100 endif
101
102 psensor.1: main.c $(top_srcdir)/configure.ac
103         $(MAKE) $(AM_MAKEFLAGS) psensor$(EXEEXT)
104         help2man --include=description.txt -N --name="Temperature monitoring application" --output=psensor.1 ./psensor$(EXEEXT)
105