Commit e828468a authored by Ben's avatar Ben

Move all C files to src/legacy.

This is required because PKG_MODULE_CHEK doesn't know the difference between
C and C++. So This way, the C files are built with C flags.
parent 7705dd5f
......@@ -52,6 +52,15 @@ PKG_CHECK_MODULES(GSM,
gmodule-2.0
)
PKG_CHECK_MODULES(GSM_LEGACY,
glib-2.0 >= $GLIB_REQUIRED
libgtop-2.0 >= $LIBGTOP_REQUIRED
gtk+-3.0 >= $GTK_REQUIRED
libxml-2.0 >= $LIBXML_REQUIRED
librsvg-2.0 >= $RSVG_REQUIRED
gmodule-2.0
)
AC_PATH_PROG(APPDATA_VALIDATE, appdata-validate)
AC_PATH_PROG(DESKTOP_FILE_VALIDATE, desktop-file-validate)
......@@ -121,6 +130,7 @@ AC_CONFIG_FILES([
Makefile
scripts/Makefile
src/Makefile
src/legacy/Makefile
src/org.gnome.gnome-system-monitor.gschema.xml.in
po/Makefile.in
help/Makefile
......
......@@ -9,8 +9,6 @@ AM_CPPFLAGS = \
bin_PROGRAMS = gnome-system-monitor
BUILT_SOURCES = gsm-resources.c
gnome_system_monitor_cpp_files = \
argv.cpp \
interface.cpp \
......@@ -35,36 +33,27 @@ gnome_system_monitor_cpp_files = \
prefsdialog.cpp \
application.cpp
gnome_system_monitor_c_files = \
e_date.c \
gsm_color_button.c \
treeview.c
gnome_system_monitor_h_files = \
$(gnome_system_monitor_cpp_files:.cpp=.h) \
$(gnome_system_monitor_c_files:.c=.h) \
defaulttable.h \
settings-keys.h
gnome_system_monitor_SOURCES = \
$(BUILT_SOURCES) \
$(gnome_system_monitor_h_files) \
$(gnome_system_monitor_cpp_files) \
$(gnome_system_monitor_c_files) \
main.cpp
LDADD = \
$(GSM_LIBS) \
$(SYSTEMD_LIBS) \
$(WNCK_LIBS)
gsm-resources.c: gsm.gresource.xml $(shell glib-compile-resources --sourcedir=$(top_srcdir) --generate-dependencies $(srcdir)/gsm.gresource.xml)
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(top_srcdir) --generate-source $(srcdir)/gsm.gresource.xml
$(WNCK_LIBS) \
legacy/libgsmlegacy.la
# GSettings schemas, enum files and conversion file
gsettings_ENUM_NAMESPACE = org.gnome.gnome-system-monitor
gsettings_ENUM_FILES = $(top_srcdir)/src/*.h
gsettings_ENUM_FILES = $(top_srcdir)/src/*.h $(top_srcdir)/src/legacy/*.h
gsettings_in_file = org.gnome.gnome-system-monitor.gschema.xml.in
gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml)
@INTLTOOL_XML_NOMERGE_RULE@
......@@ -77,9 +66,10 @@ EXTRA_DIST = \
gsm.gresource.xml
CLEANFILES = \
$(gsettings_SCHEMAS) \
$(BUILT_SOURCES)
$(gsettings_SCHEMAS)
MAINTAINERCLEANFILES = $(gsettings_SCHEMAS:.xml=.valid)
SUBDIRS = legacy
-include $(top_srcdir)/git.mk
......@@ -12,7 +12,7 @@ struct LoadGraph;
#include "smooth_refresh.h"
#include "prettytable.h"
#include "treeview.h"
#include "legacy/treeview.h"
#include "util.h"
static const unsigned MIN_UPDATE_INTERVAL = 1 * 1000;
......
......@@ -10,7 +10,7 @@
#include "application.h"
#include "util.h"
#include "settings-keys.h"
#include "treeview.h"
#include "legacy/treeview.h"
enum DiskColumns
{
......
......@@ -41,7 +41,7 @@
#include "util.h"
#include "disks.h"
#include "settings-keys.h"
#include "gsm_color_button.h"
#include "legacy/gsm_color_button.h"
static gboolean
......
AM_CPPFLAGS = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGSM_LIBEXEC_DIR=\""$(pkglibexecdir)"\" \
$(GSM_LEGACY_CFLAGS) \
$(SYSTEMD_CFLAGS) \
$(WNCK_CFLAGS)
BUILT_SOURCES = gsm-resources.c
libgsmlegacy_c_files = \
e_date.c \
gsm_color_button.c \
treeview.c
libgsmlegacy_h_files = \
$(libgsmlegacy_c_files:.c=.h)
noinst_LTLIBRARIES = libgsmlegacy.la
libgsmlegacy_la_SOURCES = \
$(libgsmlegacy_c_files) \
$(libgsmlegacy_h_files) \
$(BUILT_SOURCES)
gsm-resources.c: $(top_srcdir)/src/gsm.gresource.xml $(shell glib-compile-resources --sourcedir=$(top_srcdir) --generate-dependencies $(top_srcdir)/src/gsm.gresource.xml)
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(top_srcdir) --generate-source $(top_srcdir)/src/gsm.gresource.xml
CLEANFILES = \
$(BUILT_SOURCES)
-include $(top_srcdir)/git.mk
......@@ -13,7 +13,7 @@
#include "application.h"
#include "load-graph.h"
#include "util.h"
#include "gsm_color_button.h"
#include "legacy/gsm_color_button.h"
void LoadGraph::clear_background()
......
......@@ -5,7 +5,7 @@
#include <glib.h>
#include <glibtop/cpu.h>
#include "gsm_color_button.h"
#include "legacy/gsm_color_button.h"
#include "util.h"
enum
......
......@@ -19,7 +19,7 @@ using std::string;
#include "memmaps.h"
#include "proctable.h"
#include "settings-keys.h"
#include "treeview.h"
#include "legacy/treeview.h"
#include "util.h"
......
......@@ -15,7 +15,7 @@
#include "proctable.h"
#include "util.h"
#include "settings-keys.h"
#include "treeview.h"
#include "legacy/treeview.h"
#ifndef NI_IDN
#define NI_IDN 0
......
......@@ -29,7 +29,7 @@
#include "procproperties.h"
#include "proctable.h"
#include "util.h"
#include "e_date.h"
#include "legacy/e_date.h"
enum
{
......
......@@ -56,7 +56,7 @@
#include "selinux.h"
#include "settings-keys.h"
#include "cgroups.h"
#include "treeview.h"
#include "legacy/treeview.h"
#include "systemd.h"
#ifdef GDK_WINDOWING_X11
......
......@@ -23,7 +23,7 @@
#include <glib.h>
#include <gtk/gtk.h>
#include "application.h"
#include "treeview.h"
#include "legacy/treeview.h"
enum
{
......
......@@ -12,7 +12,7 @@
#include "application.h"
extern "C" {
#include "e_date.h"
#include "legacy/e_date.h"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment