From: Sam Moore Date: Fri, 23 Dec 2011 04:40:40 +0000 (+0800) Subject: As suspected, it didn't work X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=240966427c658fe47f1e981abd21ae89c37033ff;p=progcomp2012.git As suspected, it didn't work Need to also disable linking with the SDL and OpenGL libraries in the Makefile But those libraries must have pulled in pthread, because then I got link errors until I added that to linking. Attempt #2 --- diff --git a/judge/manager/Makefile b/judge/manager/Makefile index fe319df..37b2c29 100644 --- a/judge/manager/Makefile +++ b/judge/manager/Makefile @@ -1,6 +1,9 @@ #Makefile for Stratego -CPP = g++ -Wall -pedantic -lSDL -lGL -g +#Use this to build with graphics +#CPP = g++ -Wall -pedantic -lSDL -lGL -lpthread -g +#Use this to build without graphics +CPP = g++ -Wall -pedantic -lpthread -g OBJ = main.o controller.o ai_controller.o human_controller.o program.o thread_util.o stratego.o graphics.o game.o BIN = stratego diff --git a/judge/manager/manual.txt b/judge/manager/manual.txt index f810119..8ce39c8 120000 --- a/judge/manager/manual.txt +++ b/judge/manager/manual.txt @@ -1 +1 @@ -web/doc/manager_manual.txt \ No newline at end of file +../../web/doc/manager_manual.txt \ No newline at end of file diff --git a/web/doc/manager_manual.txt b/web/doc/manager_manual.txt index 9024c74..7a9c02c 100644 --- a/web/doc/manager_manual.txt +++ b/web/doc/manager_manual.txt @@ -221,16 +221,19 @@ EXIT/OUTPUT BUILDING To build from source, simply run make in the source directory. + You will need the C pthread library (which should come with gcc) stratego can be built with or without graphics enabled. By default, graphics are disabled. - To enable graphics, ensure that the first line of the source file "graphics.h" reads: + To enable graphics: + 1. Ensure that the first line of the source file "graphics.h" reads: + #define BUILD_GRAPHICS + 2. In "Makefile", uncomment the line "CPP = g++ -Wall -pedantic -lSDL -lGL -g" and comment out the line "CPP = g++ -Wall -pedantic -g" - #define BUILD_GRAPHICS - - To disable graphics, comment out the first line of "graphics.h" i.e ensure that it reads: - - //#define BUILD_GRAPHICS + To disable graphics: + 1. Comment out the first line of "graphics.h" i.e ensure that it reads: + //#define BUILD_GRAPHICS + 2. In "Makefile", uncomment the line "CPP = g++ -Wall -pedantic -g" and comment out the line "CPP = g++ -Wall -pedantic -lSDL -lGL -g" If you intend to build with graphics enabled, you will need the SDL and OpenGL developement libraries installed first. If you intend to use graphics, please ensure the "images" directory is located in the executable's run directory.