Skip to content

Commit

Permalink
Tidied up Makefile comments, added recording makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mgbellemare committed Jun 22, 2015
1 parent 40f0aa3 commit e23c57b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
7 changes: 7 additions & 0 deletions doc/examples/Makefile
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
37 changes: 37 additions & 0 deletions doc/examples/Makefile.recording
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions doc/examples/Makefile.sharedlibrary
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit e23c57b

Please sign in to comment.