From e23c57b52356583ac3c39be3ccfb89ae91a38e22 Mon Sep 17 00:00:00 2001 From: "Marc G. Bellemare" Date: Mon, 22 Jun 2015 22:13:23 +0100 Subject: [PATCH] Tidied up Makefile comments, added recording makefile --- doc/examples/Makefile | 7 ++++++ doc/examples/Makefile.recording | 37 +++++++++++++++++++++++++++++ doc/examples/Makefile.sharedlibrary | 2 -- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 doc/examples/Makefile.recording diff --git a/doc/examples/Makefile b/doc/examples/Makefile index ad93386ba..1ac396d17 100644 --- a/doc/examples/Makefile +++ b/doc/examples/Makefile @@ -1,3 +1,6 @@ +# We do not automatically build the recording agent, which requires SDL. To build it, run +# +# > make recordingAgent all: sharedLibraryAgent rlglueAgent fifoAgent sharedLibraryAgent: @@ -9,7 +12,11 @@ rlglueAgent: fifoAgent: make -f Makefile.fifo +recordingAgent: + make -f Makefile.recording + clean: make -f Makefile.rlglue clean make -f Makefile.sharedlibrary clean make -f Makefile.fifo clean + make -f Makefile.recording clean diff --git a/doc/examples/Makefile.recording b/doc/examples/Makefile.recording new file mode 100644 index 000000000..59d72aab8 --- /dev/null +++ b/doc/examples/Makefile.recording @@ -0,0 +1,37 @@ +# Modified from the sharedLibraryInterface's makefile. +# Video recording requires SDL. If you do not have SDL installed, you will not be able to +# compile this example. +# +# > make recordingAgent + +USE_SDL := 1 + +# This will likely need to be changed to suit your installation. +ALE := ../.. + +FLAGS := -I$(ALE)/src -I$(ALE)/src/controllers -I$(ALE)/src/os_dependent -I$(ALE)/src/environment -I$(ALE)/src/external -L$(ALE) +CXX := g++ +FILE := videoRecordingExample +LDFLAGS := -lale -lz + +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Linux) + FLAGS += -Wl,-rpath=$(ALE) +endif +ifeq ($(UNAME_S),Darwin) + FLAGS += -framework Cocoa +endif + +ifeq ($(strip $(USE_SDL)), 1) + DEFINES += -D__USE_SDL -DSOUND_SUPPORT + FLAGS += $(shell sdl-config --cflags) + LDFLAGS += $(shell sdl-config --libs) +endif + +all: videoRecordingExample + +videoRecordingExample: + $(CXX) $(DEFINES) $(FLAGS) $(FILE).cpp $(LDFLAGS) -o $(FILE) + +clean: + rm -rf videoRecordingExample *.o diff --git a/doc/examples/Makefile.sharedlibrary b/doc/examples/Makefile.sharedlibrary index d97f3bfe1..3efed9405 100644 --- a/doc/examples/Makefile.sharedlibrary +++ b/doc/examples/Makefile.sharedlibrary @@ -1,5 +1,3 @@ -# Modified from the RL-Glue C/C++ codec sharedLibraryInterfaceExample's makefile. - USE_SDL := 0 # This will likely need to be changed to suit your installation.