Skip to content

Commit

Permalink
Move ratatouille to its own (optional) directory
Browse files Browse the repository at this point in the history
  • Loading branch information
keithw committed Feb 26, 2016
1 parent e8b6e83 commit 6b9bbe4
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Makefile.in
/src/inspect-config
/src/rat-runner
/src/remy
/src/ratatouille
/graph/ratatouille
/src/scoring-example
/src/*.pb.cc
/src/*.pb.h
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
SUBDIRS = protobufs graph src
SUBDIRS = protobufs src

if BUILD_GRAPH
SUBDIRS += graph
endif
28 changes: 18 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,34 @@ CPPFLAGS="-std=c++11 -pthread"
PICKY_CXXFLAGS="-pedantic -Wall -Wextra -Werror"
AC_SUBST([PICKY_CXXFLAGS])

AC_ARG_ENABLE([graph],
[AS_HELP_STRING([--enable-graph],
[Enable live graph (ratatouille) @<:@no@:>@])],
[build_graph="yes"],
[build_graph="no"])
AM_CONDITIONAL([BUILD_GRAPH], [test x"$build_graph" != xno])

# Checks for libraries.
PKG_CHECK_MODULES([GL], [gl])
PKG_CHECK_MODULES([GLFW], [glfw3])
PKG_CHECK_MODULES([GLEW], [glew])
PKG_CHECK_MODULES([GLU], [glu])
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo])
PKG_CHECK_MODULES([GTKMM], [gtkmm-3.0])
AM_COND_IF( [BUILD_GRAPH],
[
PKG_CHECK_MODULES([GL], [gl])
PKG_CHECK_MODULES([GLFW], [glfw3])
PKG_CHECK_MODULES([GLEW], [glew])
PKG_CHECK_MODULES([GLU], [glu])
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo])
PKG_CHECK_MODULES([GTKMM], [gtkmm-3.0])
] )

# Checks for header files.
AC_LANG_PUSH(C++)

AC_CHECK_HEADERS([algorithm array cassert boost/accumulators/accumulators.hpp \
AC_CHECK_HEADERS([boost/accumulators/accumulators.hpp \
boost/accumulators/statistics/median.hpp \
boost/accumulators/statistics/stats.hpp boost/functional/hash.hpp \
boost/random/exponential_distribution.hpp boost/random/mersenne_twister.hpp \
boost/random/poisson_distribution.hpp \
boost/random/uniform_int_distribution.hpp \
boost/random/uniform_real_distribution.hpp fcntl.h future cmath queue \
cstdio string sys/stat.h sys/types.h ctime tuple unistd.h unordered_map \
utility vector], [], [AC_MSG_ERROR([Missing header file])])
boost/random/uniform_real_distribution.hpp], [], [AC_MSG_ERROR([Missing boost headers (need to install libboost-all-dev?)])])

# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
Expand Down
20 changes: 13 additions & 7 deletions graph/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
AM_CPPFLAGS = $(GL_CFLAGS) $(GLFW_CFLAGS) $(GLEW_CFLAGS) $(GLU_CFLAGS) $(PANGOCAIRO_CFLAGS)
AM_CPPFLAGS = -I$(srcdir)/../src -I../protobufs $(GL_CFLAGS) $(GLFW_CFLAGS) $(GLEW_CFLAGS) $(GLU_CFLAGS) $(PANGOCAIRO_CFLAGS) $(GTKMM_CFLAGS)
AM_CXXFLAGS = $(PICKY_CXXFLAGS) $(NODEBUG_CXXFLAGS)
#LDADD = $(GL_LIBS) $(GLFW_LIBS) $(GLEW_LIBS) $(GLU_LIBS) $(PANGOCAIRO_LIBS)
#bin_PROGRAMS = glfun
LDADD = ../protobufs/libremyprotos.a -lm $(protobuf_LIBS) ../src/libremycore.a $(GL_LIBS) $(GLFW_LIBS) $(GLEW_LIBS) $(GLU_LIBS) $(PANGOCAIRO_LIBS) $(GTKMM_LIBS)

noinst_LIBRARIES = libremygraph.a

libremygraph_a_SOURCES = gl_objects.hh gl_objects.cc \
common_source = gl_objects.hh gl_objects.cc \
display.hh display.cc \
image.hh image.cc \
cairo_objects.hh cairo_objects.cc \
graph.hh graph.cc
graph.hh graph.cc \
fader.hh fader.cc fader-templates.cc bb100.hh

bin_PROGRAMS =

if BUILD_GRAPH
bin_PROGRAMS += ratatouille
ratatouille_SOURCES = $(common_source) ratatouille.cc
endif

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 4 additions & 5 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
AM_CPPFLAGS = -I../protobufs -I../graph $(GL_CFLAGS) $(GLFW_CFLAGS) $(GLEW_CFLAGS) $(GLU_CFLAGS) $(PANGOCAIRO_CFLAGS) $(GTKMM_CFLAGS)
AM_CPPFLAGS = -I../protobufs
AM_CXXFLAGS = $(PICKY_CXXFLAGS)
LDADD = ../protobufs/libremyprotos.a -lm $(protobuf_LIBS)

bin_PROGRAMS = remy rat-runner scoring-example configuration inspect-config ratatouille
bin_PROGRAMS = remy rat-runner scoring-example configuration inspect-config

common_source = delay.hh evaluator.cc evaluator.hh \
exponential.hh link.hh link-templates.cc \
Expand All @@ -15,6 +15,8 @@ common_source = delay.hh evaluator.cc evaluator.hh \
aimd-templates.cc aimd.cc aimd.hh \
configrange.hh configrange.cc

noinst_LIBRARIES = libremycore.a
libremycore_a_SOURCES = $(common_source)

remy_SOURCES = $(common_source) remy.cc ratbreeder.cc ratbreeder.hh

Expand All @@ -26,6 +28,3 @@ configuration_SOURCES = input-configrange.cc

inspect_config_SOURCES = inspect-configrange.cc

ratatouille_LDADD = ../graph/libremygraph.a $(GL_LIBS) $(GLFW_LIBS) $(GLEW_LIBS) $(GLU_LIBS) $(PANGOCAIRO_LIBS) $(GTKMM_LIBS) $(LDADD)

ratatouille_SOURCES = $(common_source) ratatouille.cc fader.hh fader.cc fader-templates.cc bb100.hh

0 comments on commit 6b9bbe4

Please sign in to comment.