diff --git a/ChangeLog b/ChangeLog index f6a1283..6080c5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-13 17:30 tchernobog + + * trunk/ChangeLog, trunk/configure.ac, trunk/doc/Makefile.am: - Add + automake option for dejagnu + 2006-01-13 16:16 tchernobog * trunk/ChangeLog, trunk/autogen.sh, trunk/config, diff --git a/Makefile.am b/Makefile.am index e43b260..2de9f4b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ # along with SGPEMv2; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -SUBDIRS = doc m4 po +SUBDIRS = doc m4 po src ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index 08d09d6..7af67a8 100644 --- a/configure.ac +++ b/configure.ac @@ -73,16 +73,16 @@ SWIG_PYTHON dnl check for gtkmm & cairo PKG_CHECK_MODULES([CAIRO], [cairo >= $CAIRO_VERSION], - :, AC_MSG_ERROR([$ADDITIONAL_PKG_ERRORS])) + :, AC_MSG_ERROR([$CAIRO_PKG_ERRORS])) PKG_CHECK_MODULES([GTKMM], [gtkmm-2.4 >= $GTKMM_VERSION], - :, AC_MSG_ERROR([$ADDITIONAL_PKG_ERRORS])) -PKG_CHECK_MODULES([GLIB], - [glibmm-2.4 >= $GTKMM_VERSION], - :, AC_MSG_ERROR([$ADDITIONAL_PKG_ERRORS])) + :, AC_MSG_ERROR([$GTKMM_PKG_ERRORS])) +dnl PKG_CHECK_MODULES([GLIB], +dnl [glibmm-2.4 >= $GTKMM_VERSION], +dnl :, AC_MSG_ERROR([$GLIB_PKG_ERRORS])) PKG_CHECK_MODULES([GTHREAD], [gthread-2.0 >= $GTKMM_VERSION], - :, AC_MSG_ERROR([$ADDITIONAL_PKG_ERRORS])) + :, AC_MSG_ERROR([$GTHREAD_PKG_ERRORS])) AC_CONFIG_HEADERS([config.h:config.h.in]) @@ -91,5 +91,7 @@ Makefile doc/Makefile m4/Makefile po/Makefile.in +src/Makefile +src/testsuite/Makefile ]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..befd951 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,60 @@ +# src/Makefile.am - Copyright 2005, 2006, University +# of Padova, dept. of Pure and Applied +# Mathematics +# +# This file is part of SGPEMv2. +# +# This is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# SGPEMv2 is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SGPEMv2; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +SUBDIRS = testsuite + +#additional rules: +%_wrap.cc : %.i + $(SWIG) $(SWIG_PYTHON_OPT) -o $@ $< + +# Program & library names +bin_PROGRAMS = sgpemv2 +# lib_LTLIBRARIES = + +# Other directories +sharedir = @datadir@/sgpemv2 +pycdir = $(sharedir)/policies +moddir = $(sharedir)/modules +localedir = @datadir@/locale + +sgpemv2_CPPFLAGS = -I@top_srcdir@ \ + -DPYCDIR="\"$(pycdir)\"" \ + -DMODDIR="\"$(moddir)\"" \ + -DLOCALEDIR="\"$(localedir)\"" \ + $(PYTHON_CPPFLAGS) +sgpemv2_CXXFLAGS = $(CAIRO_CFLAGS) \ + $(GTKMM_CFLAGS) +sgpemv2_LDADD = $(PYTHON_LDFLAGS) \ + $(PYTHON_EXTRA_LIBS) \ + $(CAIRO_LIBS) \ + $(GTKMM_LIBS) +sgpemv2_LDFLAGS = $(PYTHON_EXTRA_LDFLAGS) + +# Please keep this in sorted order: +sgpemv2_SOURCES = main.cc + +noinst_HEADERS = # main.hh ... + +# loadable python modules +mod_PYTHON = # policy.py + +# built-in policies +pyc_PYTHON = # fcfs.py rr.py rr-p.py ... + diff --git a/src/main.cc b/src/main.cc new file mode 100644 index 0000000..e438960 --- /dev/null +++ b/src/main.cc @@ -0,0 +1,51 @@ +// src/main.cc - Copyright 2005, 2006, University +// of Padova, dept. of Pure and Applied +// Mathematics +// +// This file is part of SGPEMv2. +// +// This is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// SGPEMv2 is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SGPEMv2; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +#include "config.h" +#include "gettext.h" + +#include + +// Static functions declarations: +static void print_license(); + +int main(int argc, char* argv[]) { + // Set up gettext support + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + // Print out license informations + print_license(); + + return 0; +} + +void print_license() { + // Do _NOT_ translate this text. + std::cerr << + "SGPEMv2, Copyright (C) 2005, 2006 University of Padova,\n" + " dept. of Pure and Applied Mathematics.\n" + "SGPEMv2 comes with ABSOLUTELY NO WARRANTY. This is free \n" + "software, and you are welcome to redistribute it under \n" + "the terms of the GNU General Public License; for details\n" + "see file COPYING contained in the source package. \n" + << std::endl; +} diff --git a/src/testsuite/Makefile.am b/src/testsuite/Makefile.am new file mode 100644 index 0000000..d3d7973 --- /dev/null +++ b/src/testsuite/Makefile.am @@ -0,0 +1,23 @@ +# src/testsuite/Makefile.am - Copyright 2005, 2006, University +# of Padova, dept. of Pure and Applied +# Mathematics +# +# This file is part of SGPEMv2. +# +# This is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# SGPEMv2 is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SGPEMv2; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Tests to distribute: +# EXTRA_DIST = changepolicy.exp scheduler.exp fcfs.exp ... etc etc +