Added calling script when an alarm is raised.
[psensor.git] / src / Makefile.am
index ee0c83f..f484916 100644 (file)
@@ -1,6 +1,7 @@
 SUBDIRS = lib glade
 
-AM_LDFLAGS = -Wl,--as-needed 
+# -export-dynamic is need for defining handlers in the glade file.
+AM_LDFLAGS = -Wl,--as-needed -export-dynamic
 
 if LIBMICROHTTPD
 if JSON
@@ -22,12 +23,23 @@ LIBS = \
        lib/libpsensor.a \
        $(GTK_LIBS)\
        $(GCONF_LIBS)\
+       $(PTHREAD_LIBS)\
        $(SENSORS_LIBS)
 
+if GTK
+if X11
+if XEXT
+if GCONF
 bin_PROGRAMS = psensor
+dist_man_MANS = psensor.1
+endif
+endif
+endif
+endif
+
 psensor_SOURCES = \
-       compat.h \
        cfg.h cfg.c \
+       notify_cmd.c notify_cmd.h \
        graph.h graph.c \
        main.c \
        ui.h ui.c \
@@ -57,9 +69,11 @@ AM_CPPFLAGS += $(APPINDICATOR_CFLAGS)
 endif
 
 if NVIDIA
+if X11
 AM_CPPFLAGS += $(NVIDIA_CFLAGS)
 LIBS +=  $(NVIDIA_LIBS)
 endif
+endif
 
 if LIBATIADL
 AM_CPPFLAGS += $(LIBATIADL_CFLAGS)
@@ -85,14 +99,12 @@ AM_CPPFLAGS += $(CURL_CFLAGS) $(JSON_CFLAGS)
 endif
 endif
 
-schemadir = $(GCONF_SCHEMA_FILE_DIR)
-schema_DATA = psensor.schemas
-
-dist_man_MANS = psensor.1
 EXTRA_DIST = description.txt psensor.schemas
 
+if GCONF
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_DATA = psensor.schemas
 
-if GCONF_SCHEMAS_INSTALL
 install-data-local:
        GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_srcdir)/src/$(schema_DATA)
 endif