Skip to content

Commit

Permalink
Merge pull request #1 from david-cattermole/master
Browse files Browse the repository at this point in the history
Minor changes for compiling and running on Linux
  • Loading branch information
samhodge authored Dec 30, 2016
2 parents 47f8811 + 44b406d commit 01c74ed
Show file tree
Hide file tree
Showing 25 changed files with 29 additions and 15 deletions.
22 changes: 13 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ ifneq (, $(findstring chile, $(HOSTNAME)))
endif


# CAL3D
CAL3D = -I${PWD}/usr/local/include -L${PWD}/usr/local/lib
CAL3D += -L${PWD}/usr/local/include/cal3d -lcal3d

# AO and MPG123 (Audio)
AUDIO_INCLUDE = -I${PWD}/usr/local/include
AUDIO_LIBS = -L${PWD}/usr/local/include -lao -lmpg123

OPENSTEER = -I${PWD}/opensteer-code/include

# OpenSteer
OPENSTEER = -I${PWD}/opensteer-code/include

LINK += sh_matrix.o shader.o tga.o viewer.o tick.o wander.o

.PHONY: clean
Expand Down Expand Up @@ -74,13 +78,13 @@ assign3$(EXT) : $(LINK6) usr/local/lib/libcal3d.la usr/local/lib/libao.la usr/lo

wander_test$(EXT) : wander.o cat_test.cpp usr/local/lib/libcal3d.la
g++ $(DEFS) -o wander_test wander.o cat_test.cpp

viewer$(EXT) : $(LINK) usr/local/lib/libcal3d.la
g++ $(DEFS) -o viewer main.cpp $(LINK) $(GL_LIBS) $(CAL3D)

tga.o : tga.cpp tga.h usr/local/lib/libcal3d.la
g++ $(DEFS) $(CAL3D) -c tga.cpp

tick.o : tick.cpp tick.h usr/local/lib/libcal3d.la
g++ $(DEFS) $(CAL3D) -c tick.cpp

Expand All @@ -92,10 +96,10 @@ shader.o : shader.cpp shader.h

sh_matrix.o : sh_matrix.h sh_matrix.cpp
g++ $(DEFS) $(GL_LIBS) -c sh_matrix.cpp

wander.o : wander.cpp wander.h
g++ $(DEFS)$(GL_LIBS) -c wander.cpp

Simplex.o : Simplex.cpp Simplex.hpp
g++ $(DEFS) $(GL_LIBS) -c Simplex.cpp

Expand Down Expand Up @@ -126,7 +130,7 @@ skymap_ocean_cat_wander_island.o: skymap_ocean_cat_wander_island.cpp usr/local/l
cubemap.o: cubemap.cpp cubemap.h
g++ $(DEFS) $(CPPFLAGS) $(GL_LIBS) -c cubemap.cpp

cat.o: cat.h cat.cpp
cat.o: cat.h cat.cpp usr/local/lib/libcal3d.la
g++ $(DEFS) $(CPPFLAGS) $(CAL3D) $(GL_LIBS) -c cat.cpp

Island.o: Island.h Island.cpp
Expand All @@ -150,6 +154,6 @@ ${PWD}/usr/local : cal3d-0.11.0.tar.gz mpg123-1.22.2.tar libao-1.2.0.tar.gz

opensteer-demo:
g++ opensteer-code/src/*.cpp opensteer-code/src/*.c opensteer-code/plugins/*.cpp -o opensteer-demo ${OPENSTEER} ${DEFS} ${GL_LIBS}

clean:
rm -rf *.o assign3$(EXT) usr cal3d-0.11.0
rm -rf *.o assign3$(EXT) usr cal3d-0.11.0 libao-1.2.0 mpg123-1.22.2
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ Should compile on OSX and Linux with the command "make" in the folder

to run type from a bash shell in the folder

export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PWD}/usr/local/lib"

./assign3
./run_assign3

(requires OpenGL GLSL 1.5)

Expand Down
Empty file modified cat.cfg
100755 → 100644
Empty file.
Empty file modified clean.caf
100755 → 100644
Empty file.
Empty file modified clean.cfg
100755 → 100644
Empty file.
Empty file modified jnx.cmf
100755 → 100644
Empty file.
Empty file modified jnx.cmf.bu
100755 → 100644
Empty file.
Empty file modified jnx.crf
100755 → 100644
Empty file.
Empty file modified jnx.csf
100755 → 100644
Empty file.
Empty file modified ocean_sky.cpp
100755 → 100644
Empty file.
6 changes: 3 additions & 3 deletions run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env tcsh
setenv LD_LIBRARY_PATH /asset/common/software/thirdparty/glew/1.5.1-build3/arch/linux-centos5_2/x86_64/lib:/home/samh/cg/assignment3/usr/local/lib/
cd /home/samh/cg/assignment3
./skymap_ocean_cat_wander_island
set PROJECT_DIR=`pwd` # /home/samh/cg/assignment3
setenv LD_LIBRARY_PATH /asset/common/software/thirdparty/glew/1.5.1-build3/arch/linux-centos5_2/x86_64/lib:${PROJECT_DIR}/usr/local/lib/
./$1
2 changes: 2 additions & 0 deletions run_assign3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env tcsh
./run assign3
2 changes: 2 additions & 0 deletions run_skybox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env tcsh
./run skymap
2 changes: 2 additions & 0 deletions run_skybox_ocean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env tcsh
./run skymap_ocean
2 changes: 2 additions & 0 deletions run_skybox_ocean_cat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env tcsh
./run skymap_ocean_cat
2 changes: 2 additions & 0 deletions run_skybox_ocean_cat_wander.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env tcsh
./run skymap_ocean_cat_wander
2 changes: 2 additions & 0 deletions run_skybox_ocean_cat_wander_island.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env tcsh
./run skymap_ocean_cat_wander_island
Empty file modified skymap.cpp
100755 → 100644
Empty file.
Empty file modified test.bmp
100755 → 100644
Empty file.
Empty file modified test.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified test.raw
100755 → 100644
Empty file.
Empty file modified test.tga
100755 → 100644
Empty file.
Empty file modified walk.caf
100755 → 100644
Empty file.
Empty file modified walk_L.caf
100755 → 100644
Empty file.
Empty file modified walk_R.caf
100755 → 100644
Empty file.

0 comments on commit 01c74ed

Please sign in to comment.