sgpemv2/Makefile.am

667 lines
20 KiB
Makefile

# 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 3 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, see http://www.gnu.org/licenses/.
# extra calls
.PHONY : apidox generate-extra-images
# this should be the only recursive call inside sgpemv2 main pkg
# please note the "." directory _has_ to come first, before plugins
SUBDIRS = . po
# ################################# #
# Additional directories building: #
# ################################# #
# allow building of provided plugins
# FIXME: how to make this dynamic? e.g. for plugins/* ?
SUBDIRS += \
plugins/pyloader \
plugins/xmlsave
datarootdir = @datarootdir@
sharedir = $(pkgdatadir)
examplesdir = $(sharedir)/examples
policiesdir = $(sharedir)/policies
plugindir = $(sharedir)/plugins
uidir = $(sharedir)/ui
applicationsdir = @datadir@/applications
iconsdir = @datadir@/pixmaps
localedir = @datadir@/locale
aclocaldir = @datadir@/aclocal
# used for installing templates include files
templatesdir = $(pkgincludedir)/templates
#define empty global variables
bin_PROGRAMS =
pkglib_LTLIBRARIES =
plugin_LTLIBRARIES =
noinst_HEADERS =
noinst_DATA =
pkginclude_HEADERS =
templates_HEADERS =
EXTRA_DIST =
MAINTAINERCLEANFILES =
MOSTLYCLEANFILES =
CLEANFILES =
# ############################################################
#
# extra dist, cleanup and automake/aclocal flags
#
# ############################################################
ACLOCAL_AMFLAGS = -I m4 --install
install_macros = \
m4/sgpemv2-dirs.m4
macros = \
m4/compilerflags.m4 \
m4/linkingflags.m4
distro_files = \
distro/deb/control-file-v1.0 \
distro/deb/build.sh \
distro/deb/readme.txt \
distro/ebuild/sgpemv2-1.0.ebuild \
distro/rpm/SPECS/sgpemv2-1.0.spec \
distro/rpm/readme.txt \
distro/win32/pyloader.vcproj \
distro/win32/sgpemv2.vcproj \
distro/win32/backend.vcproj \
distro/win32/config/config.h \
distro/win32/xmlsave.vcproj \
distro/win32/sgpemv2.sln \
distro/win32/_sgpem.vcproj
EXTRA_DIST += \
gettext.h \
$(install_macros) \
$(macros) \
$(distro_files)
aclocal_DATA = $(install_macros)
MAINTAINERCLEANFILES += doc/API
# ############################################################
#
# desktop files and other distribution data
#
# ############################################################
pkgconfdir = $(libdir)/pkgconfig
pkgconf_DATA = config/sgpemv2.pc
applications_DATA = data/sgpemv2.desktop
icons_DATA = data/scc-sgpemv2.png
EXTRA_DIST += $(applications_DATA) $(icons_DATA)
# ############################################################
#
# documentation
#
# ############################################################
info_TEXINFOS = \
doc/sgpem2uman.texi \
doc/sgpem2dman.texi
sgpem2uman_TEXINFOS = $(licenses) doc/vers-uman.texi
sgpem2dman_TEXINFOS = $(licenses) doc/vers-dman.texi
licenses = doc/fdl.texi doc/gpl.texi
EXTRA_DIST += $(licenses)
# Images for the documentation
gif_images = \
doc/holt_circle.gif \
doc/main-window.gif \
doc/simulation_widget.gif
text_images = \
doc/main-window.txt
# Generate all kind of images needed by texinfo via convert
%.pdf : %.gif
convert "$<" "$(top_srcdir)/$@"
%.eps : %.gif
convert "$<" "$(top_srcdir)/$@"
EXTRA_DIST += $(gif_images:%.gif=%.eps) \
$(gif_images:%.gif=%.pdf) \
$(text_images)
apidox :
test -d 'doc/API' || mkdir -p -- 'doc/API'
if HAVE_DOXYGEN
doxygen config/Doxyfile
else
@echo "** Doxygen not installed. Skipping generating API docs."
endif
distclean-local :
if test -d 'doc/API'; then rm -rf 'doc/API'; fi
# ############################################################
#
# source : libbackend.la
#
# ############################################################
# Program & library names
pkglib_LTLIBRARIES += src/backend/libbackend.la
src_backend_libbackend_la_CPPFLAGS = \
-I@top_srcdir@ \
-I@top_srcdir@/src/backend \
-DPOLDIR="\"$(policiesdir)\"" \
-DPLUGDIR="\"$(plugindir)\"" \
-DLOCALEDIR="\"$(localedir)\"" \
$(GLIBMM_CFLAGS)
src_backend_libbackend_la_CXXFLAGS = \
$(VISIB_HIDDEN)
src_backend_libbackend_la_LDFLAGS = \
$(GLIBMM_LDFLAGS) \
$(LT_LDFLAGS) \
-version-info 1:0:0 \
-export-dynamic
src_backend_libbackend_la_LIBADD = \
$(GLIBMM_LIBS)
# Please keep this in sorted order:
src_backend_libbackend_la_SOURCES = \
src/backend/concrete_environment.cc \
src/backend/concrete_history.cc \
src/backend/concrete_process_statistics.cc \
src/backend/concrete_simulation.cc \
src/backend/concrete_simulation_statistics.cc \
src/backend/concrete_statistics.cc \
src/backend/concrete_thread_statistics.cc \
src/backend/cpp_resource_policy_manager.cc \
src/backend/cpu_policies_gatekeeper.cc \
src/backend/cpu_policy.cc \
src/backend/cpu_policy_exception.cc \
src/backend/cpu_policy_manager.cc \
src/backend/dynamic_process.cc \
src/backend/dynamic_request.cc \
src/backend/dynamic_resource.cc \
src/backend/dynamic_schedulable.cc \
src/backend/dynamic_sub_request.cc \
src/backend/dynamic_thread.cc \
src/backend/environment.cc \
src/backend/global_preferences.cc \
src/backend/history.cc \
src/backend/history_observer.cc \
src/backend/invalid_plugin_exception.cc \
src/backend/key_file.cc \
src/backend/malformed_policy_exception.cc \
src/backend/module.cc \
src/backend/null_policy_exception.cc \
src/backend/plugin_manager.cc \
src/backend/policy_parameters.cc \
src/backend/process.cc \
src/backend/process_statistics.cc \
src/backend/ready_queue.cc \
src/backend/request.cc \
src/backend/resource.cc \
src/backend/resource_policies_gatekeeper.cc \
src/backend/resource_policy.cc \
src/backend/resource_policy_fifo.cc \
src/backend/resource_policy_lifo.cc \
src/backend/resource_policy_manager.cc \
src/backend/resource_policy_priority.cc \
src/backend/resource_policy_priority_inheritance.cc \
src/backend/schedulable.cc \
src/backend/schedulable_statistics.cc \
src/backend/scheduler.cc \
src/backend/serialize_visitor.cc \
src/backend/serializer.cc \
src/backend/serializer_error.cc \
src/backend/serializers_gatekeeper.cc \
src/backend/simulation.cc \
src/backend/simulation_observer.cc \
src/backend/simulation_statistics.cc \
src/backend/static_process.cc \
src/backend/static_request.cc \
src/backend/static_resource.cc \
src/backend/static_schedulable.cc \
src/backend/static_sub_request.cc \
src/backend/static_thread.cc \
src/backend/statistics.cc \
src/backend/string_utils.cc \
src/backend/sub_request.cc \
src/backend/thread.cc \
src/backend/thread_statistics.cc \
src/backend/user_interrupt_exception.cc
# Put here header files that will be installed for the user
# For headers used internally by the backend, see below.
# Please note that the first listed header is generated by
# configure.
pkginclude_HEADERS += \
src/backend/sgpemv2/cpu_policies_gatekeeper.hh \
src/backend/sgpemv2/cpu_policy.hh \
src/backend/sgpemv2/cpu_policy_exception.hh \
src/backend/sgpemv2/cpu_policy_manager.hh \
src/backend/sgpemv2/environment.hh \
src/backend/sgpemv2/global_preferences.hh \
src/backend/sgpemv2/history.hh \
src/backend/sgpemv2/history_observer.hh \
src/backend/sgpemv2/invalid_plugin_exception.hh \
src/backend/sgpemv2/key_file.hh \
src/backend/sgpemv2/malformed_policy_exception.hh \
src/backend/sgpemv2/module.hh \
src/backend/sgpemv2/null_policy_exception.hh \
src/backend/sgpemv2/policy_parameters.hh \
src/backend/sgpemv2/plugin.hh \
src/backend/sgpemv2/plugin_manager.hh \
src/backend/sgpemv2/process_statistics.hh \
src/backend/sgpemv2/ready_queue.hh \
src/backend/sgpemv2/request.hh \
src/backend/sgpemv2/resource.hh \
src/backend/sgpemv2/resource_policies_gatekeeper.hh \
src/backend/sgpemv2/resource_policy.hh \
src/backend/sgpemv2/resource_policy_manager.hh \
src/backend/sgpemv2/process.hh \
src/backend/sgpemv2/schedulable.hh \
src/backend/sgpemv2/schedulable_statistics.hh \
src/backend/sgpemv2/scheduler.hh \
src/backend/sgpemv2/serialize_visitor.hh \
src/backend/sgpemv2/serializer.hh \
src/backend/sgpemv2/serializer_error.hh \
src/backend/sgpemv2/serializers_gatekeeper.hh \
src/backend/sgpemv2/sgpemv2-visibility.hh \
src/backend/sgpemv2/simulation.hh \
src/backend/sgpemv2/simulation_observer.hh \
src/backend/sgpemv2/simulation_statistics.hh \
src/backend/sgpemv2/statistics.hh \
src/backend/sgpemv2/string_utils.hh \
src/backend/sgpemv2/sub_request.hh \
src/backend/sgpemv2/thread.hh \
src/backend/sgpemv2/thread_statistics.hh \
src/backend/sgpemv2/user_interrupt_exception.hh
# Put here headers used internally by the backend
# They won't be installed for the end-user.
noinst_HEADERS += \
src/backend/cpp_resource_policy_manager.hh \
src/backend/concrete_environment.hh \
src/backend/concrete_history.hh \
src/backend/concrete_process_statistics.hh \
src/backend/concrete_simulation.hh \
src/backend/concrete_simulation_statistics.hh \
src/backend/concrete_statistics.hh \
src/backend/concrete_thread_statistics.hh \
src/backend/dynamic_process.hh \
src/backend/dynamic_request.hh \
src/backend/dynamic_resource.hh \
src/backend/dynamic_schedulable.hh \
src/backend/dynamic_sub_request.hh \
src/backend/dynamic_thread.hh \
src/backend/resource_policy_fifo.hh \
src/backend/resource_policy_lifo.hh \
src/backend/resource_policy_priority.hh \
src/backend/resource_policy_priority_inheritance.hh \
src/backend/static_process.hh \
src/backend/static_request.hh \
src/backend/static_resource.hh \
src/backend/static_schedulable.hh \
src/backend/static_sub_request.hh \
src/backend/static_thread.hh
# ############################################################
#
# source : main executable
#
# ############################################################
# Program & library names
bin_PROGRAMS += sgpemv2
sgpemv2_CPPFLAGS = \
-I@top_srcdir@ \
-I@top_srcdir@/src/backend \
-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \
-DEXAMPLESDIR="\"$(examplesdir)\"" \
-DLOCALEDIR="\"$(localedir)\"" \
-DSHAREDIR="\"$(sharedir)\"" \
-DUIDIR="\"$(uidir)\"" \
$(CAIROMM_CFLAGS) \
$(GTKMM_CFLAGS) \
$(LIBGLADEMM_CFLAGS) \
$(GTHREAD_CFLAGS)
sgpemv2_CXXFLAGS = \
$(VISIB_HIDDEN)
sgpemv2_LDFLAGS = \
-Wl,-rpath -Wl,"$(pkglibdir)"
sgpemv2_LDADD = \
src/backend/libbackend.la \
$(CAIROMM_LIBS) \
$(GTKMM_LIBS) \
$(GTHREAD_LIBS)
# Please keep this in sorted order:
sgpemv2_SOURCES = \
src/add_request_dialog.cc \
src/cairo_elements.cc \
src/cairo_widget.cc \
src/configure_policy_dialog.cc \
src/graphical_preferences_editor.cc \
src/gui_builder.cc \
src/holt_container_window.cc \
src/holt_widget.cc \
src/jump_to_dialog.cc \
src/main.cc \
src/parse_opts.cc \
src/ready_queue_widget.cc \
src/resources_widget.cc \
src/schedulables_statistics_widget.cc \
src/schedulables_tree_widget.cc \
src/simulation_controller.cc \
src/simulation_statistics_widget.cc \
src/simulation_widget.cc \
src/statistics_container_window.cc \
src/text_simulation.cc
noinst_HEADERS += \
src/add_request_dialog.hh \
src/cairo_elements.hh \
src/cairo_widget.hh \
src/configure_policy_dialog.hh \
src/graphical_preferences_editor.hh \
src/gui_builder.hh \
src/holt_container_window.hh \
src/holt_widget.hh \
src/jump_to_dialog.hh \
src/main.hh \
src/parse_opts.hh \
src/ready_queue_widget.hh \
src/resources_widget.hh \
src/schedulables_statistics_widget.hh \
src/schedulables_tree_widget.hh \
src/schedulables_statistics_widget.hh \
src/simulation_controller.hh \
src/simulation_statistics_widget.hh \
src/simulation_widget.hh \
src/statistics_container_window.hh \
src/text_simulation.hh
# ---------- gtkbuilder xml files -----------
ui_DATA = \
data/logo.png \
ui/add-process-dialog.ui \
ui/add-request-dialog.ui \
ui/add-resource-dialog.ui \
ui/add-thread-dialog.ui \
ui/configure-dialog.ui \
ui/jump-to-dialog.ui \
ui/main-window.ui \
ui/statistics-window.ui
EXTRA_DIST += $(ui_DATA)
# ############################################################
#
# source : templates
#
# ############################################################
templates_HEADERS += \
src/backend/sgpemv2/templates/deletor.tcc \
src/backend/sgpemv2/templates/down_cast.tcc \
src/backend/sgpemv2/templates/parameter.tcc \
src/backend/sgpemv2/templates/sequences.tcc \
src/backend/sgpemv2/templates/singleton.hh \
src/backend/sgpemv2/templates/singleton.tcc \
src/backend/sgpemv2/templates/smartp.hh \
src/backend/sgpemv2/templates/smartp.tcc
# ############################################################
#
# check : testsuite
#
# ############################################################
if COND_TESTS
# DEJATOOL = src/testsuite/example-test.exp
noinst_PROGRAMS = \
src/testsuite/test-cairo_widget \
src/testsuite/test-history \
src/testsuite/test-holt_widget \
src/testsuite/test-key_file \
src/testsuite/test-simulation_widget \
src/testsuite/test-statistics
# disable :
# src/testsuite/test-global_preferences_serialization
# src/testsuite/test-parse_command
# src/testsuite/test-stepforward
src_testsuite_test_history_CPPFLAGS = \
-I@top_srcdir@/src/backend \
$(GLIBMM_CFLAGS)
src_testsuite_test_history_LDFLAGS = \
-Wl,-rpath -Wl,"$(pkglibdir)" \
src/backend/libbackend.la \
$(GLIBMM_LIBS)
src_testsuite_test_history_SOURCES = \
src/backend/concrete_environment.cc \
src/backend/concrete_history.cc \
src/backend/dynamic_process.cc \
src/backend/dynamic_request.cc \
src/backend/dynamic_resource.cc \
src/backend/dynamic_schedulable.cc \
src/backend/dynamic_sub_request.cc \
src/backend/dynamic_thread.cc \
src/backend/static_process.cc \
src/backend/static_request.cc \
src/backend/static_resource.cc \
src/backend/static_schedulable.cc \
src/backend/static_sub_request.cc \
src/backend/static_thread.cc \
src/testsuite/test-history.cc
src_testsuite_test_statistics_CPPFLAGS = \
-I@top_srcdir@/src/backend \
$(GLIBMM_CFLAGS) $(GTHREAD_CFLAGS)
src_testsuite_test_statistics_LDFLAGS = \
-Wl,-rpath -Wl,"$(pkglibdir)" \
src/backend/libbackend.la \
$(GLIBMM_LIBS) $(GTHREAD_LIBS)
src_testsuite_test_statistics_SOURCES = \
src/backend/statistics.cc \
src/backend/concrete_process_statistics.cc \
src/backend/concrete_thread_statistics.cc \
src/backend/concrete_simulation_statistics.cc \
src/backend/concrete_statistics.cc \
src/testsuite/test-statistics.cc
#src_testsuite_test_global_preferences_serialization_CPPFLAGS = \
# -I@top_srcdir@/src/backend \
# $(GLIBMM_CFLAGS)
#src_testsuite_test_global_preferences_serialization_LDFLAGS = \
# src/backend/libbackend.la \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# $(GLIBMM_LIBS)
#src_testsuite_test_global_preferences_serialization_SOURCES = \
# src/testsuite/test-global_preferences_serialization.cc
src_testsuite_test_key_file_CPPFLAGS = \
-I@top_srcdir@/src/backend \
$(GLIBMM_CFLAGS)
src_testsuite_test_key_file_LDFLAGS = \
-Wl,-rpath -Wl,"$(pkglibdir)" \
src/backend/libbackend.la \
$(GLIBMM_LIBS)
src_testsuite_test_key_file_SOURCES = \
src/testsuite/test-key_file.cc
src_testsuite_test_cairo_widget_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/backend \
$(CAIROMM_CFLAGS) \
$(GTKMM_CFLAGS) \
$(GLIBMM_CFLAGS)
src_testsuite_test_cairo_widget_LDFLAGS = \
$(CAIROMM_LIBS) \
$(GTKMM_LIBS) \
$(GLIBMM_LIBS)
src_testsuite_test_cairo_widget_SOURCES = \
src/cairo_elements.cc \
src/cairo_widget.cc \
src/testsuite/test-cairo_widget.cc
src_testsuite_test_simulation_widget_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/backend \
$(CAIROMM_CFLAGS) \
$(GTKMM_CFLAGS) \
$(GLIBMM_CFLAGS) \
$(GTHREAD_CFLAGS)
src_testsuite_test_simulation_widget_LDFLAGS = \
src/backend/libbackend.la \
-Wl,-rpath -Wl,"$(pkglibdir)" \
$(CAIROMM_LIBS) \
$(GTKMM_LIBS) \
$(GLIBMM_LIBS) \
$(GTHREAD_LIBS)
src_testsuite_test_simulation_widget_SOURCES = \
src/cairo_elements.cc \
src/cairo_widget.cc \
src/simulation_widget.cc \
src/testsuite/test-simulation_widget.cc
src_testsuite_test_holt_widget_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/backend \
$(CAIROMM_CFLAGS) \
$(GTKMM_CFLAGS) \
$(GLIBMM_CFLAGS) \
$(GTHREAD_CFLAGS)
src_testsuite_test_holt_widget_LDFLAGS = \
src/backend/libbackend.la \
-Wl,-rpath -Wl,"$(pkglibdir)" \
$(CAIROMM_LIBS) \
$(GTKMM_LIBS) \
$(GLIBMM_LIBS) \
$(GTHREAD_LIBS)
src_testsuite_test_holt_widget_SOURCES = \
src/cairo_elements.cc \
src/cairo_widget.cc \
src/simulation_widget.cc \
src/holt_container_window.cc \
src/holt_widget.cc \
src/testsuite/test-holt_widget.cc
#src_testsuite_test_parse_command_CPPFLAGS = \
# -I@top_srcdir@/src \
# -I@top_srcdir@/src/templates \
# $(GLIBMM_CFLAGS)
#src_testsuite_test_parse_command_LDFLAGS = \
# src/backend/libbackend.la \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# $(GLIBMM_LIBS)
#src_testsuite_test_parse_command_SOURCES = \
# src/testsuite/test-parse_command.cc
# advice: get dummy_policy from the somewhere in the repository, and compile it in.
#src_testsuite_test_stepforward_CPPFLAGS = \
# -I@top_srcdir@/src \
# -I@top_srcdir@/src/templates \
# $(GLIBMM_CFLAGS)
#src_testsuite_test_stepforward_LDFLAGS = \
# src/backend/libbackend.la \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# $(GLIBMM_LIBS)
#src_testsuite_test_stepforward_SOURCES = \
# src/testsuite/stubs/history.cc \
# src/testsuite/stubs/prrpolicy.cc \
# src/testsuite/stubs/policy_manager.cc \
# src/backend/scheduler.cc \
# src/testsuite/test-stepforward.cc
# Workaround an automake bug that leaves behind some files
# while it's finishing the distcheck target
CLEANFILES += \
src/testsuite/.libs/test-cairo_widget \
src/testsuite/.libs/test-history \
src/testsuite/.libs/test-holt_widget \
src/testsuite/.libs/test-key_file \
src/testsuite/.libs/test-simulation_widget \
src/testsuite/.libs/test-statistics
# disabled:
# src/testsuite/.libs/test-global_preferences_serialization
endif #~ if COND_TESTS
# ############################################################
#
# extra files to distribute
#
# ############################################################
noinst_DATA += \
src/testsuite/scheduling-wizards/wizard-deadlock-test \
src/testsuite/scheduling-wizards/wizard-gap-fail \
src/testsuite/scheduling-wizards/wizard-assert-fail \
src/testsuite/scheduling-wizards/wizard-unblock-test \
src/testsuite/scheduling-wizards/wizard-complex-test \
src/testsuite/scheduling-wizards/wizard-priority-inversion-porno \
src/testsuite/scheduling-wizards/wizard-priority-preemption-fail \
src/testsuite/scheduling-wizards/wizard-block-fail
examples_DATA = \
src/testsuite/scheduling-wizards/environments/Colori_rr_prio_1_2.xgp \
src/testsuite/scheduling-wizards/environments/DiscWorld_unblock.xgp \
src/testsuite/scheduling-wizards/environments/Ducks_rr_2.xgp \
src/testsuite/scheduling-wizards/environments/FruitsBasket_complex.xgp \
src/testsuite/scheduling-wizards/environments/Fantozzi_lifo_requests.xgp \
src/testsuite/scheduling-wizards/environments/Matteo_deadlock.xgp \
src/testsuite/scheduling-wizards/environments/Matteo_preemption_fail.xgp \
src/testsuite/scheduling-wizards/environments/Modernita_gap_terminated.xgp \
src/testsuite/scheduling-wizards/environments/MyAutoDeadlock.xgp \
src/testsuite/scheduling-wizards/environments/Pensieri_fcfs.xgp \
src/testsuite/scheduling-wizards/environments/Porno_priority_inversion.xgp \
src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_block_fail.xgp \
src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_gap_blocked.xgp \
src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_assert_fail.xgp \
src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_gap_fail.xgp \
src/testsuite/scheduling-wizards/environments/TheSecretOfMonkeyIsland.xgp
EXTRA_DIST += $(noinst_DATA) $(examples_DATA)