Imported Upstream version 0.8.0.4
[psensor-pkg-debian.git] / src / Makefile.am
index 15a0e17..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
@@ -8,6 +9,7 @@ SUBDIRS += server
 endif
 endif
 
+# -no-deprecated-declarations to avoid some glib deprecation warnings
 AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -Werror -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
        -I$(top_srcdir)/src/lib \
        -I$(top_srcdir)/src/unity \
@@ -21,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 \
@@ -56,15 +69,22 @@ AM_CPPFLAGS += $(APPINDICATOR_CFLAGS)
 endif
 
 if NVIDIA
+if X11
 AM_CPPFLAGS += $(NVIDIA_CFLAGS)
 LIBS +=  $(NVIDIA_LIBS)
 endif
+endif
 
 if LIBATIADL
 AM_CPPFLAGS += $(LIBATIADL_CFLAGS)
 LIBS += $(LIBATIADL_LIBS)
 endif
 
+if ATASMART
+AM_CPPFLAGS += $(ATASMART_CFLAGS)
+LIBS += $(ATASMART_LIBS)
+endif
+
 if UNITY
 psensor_SOURCES += ui_unity.h ui_unity.c
 AM_CPPFLAGS += $(UNITY_CFLAGS)
@@ -79,8 +99,15 @@ AM_CPPFLAGS += $(CURL_CFLAGS) $(JSON_CFLAGS)
 endif
 endif
 
-dist_man_MANS = psensor.1
-EXTRA_DIST = description.txt
+EXTRA_DIST = description.txt psensor.schemas
+
+if GCONF
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_DATA = psensor.schemas
+
+install-data-local:
+       GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_srcdir)/src/$(schema_DATA)
+endif
 
 psensor.1: main.c $(top_srcdir)/configure.ac
        $(MAKE) $(AM_MAKEFLAGS) psensor$(EXEEXT)