head 1.6; access; symbols; locks; strict; comment @# @; 1.6 date 2005.08.02.09.06.47; author behdad; state Exp; branches; next 1.5; commitid 8c642ef37a34567; 1.5 date 2005.07.29.21.16.12; author behdad; state Exp; branches; next 1.4; commitid 1cc242ea9c944567; 1.4 date 2003.12.23.18.38.05; author chant; state Exp; branches; next 1.3; 1.3 date 2003.11.25.02.06.56; author chant; state Exp; branches; next 1.2; 1.2 date 2003.11.18.14.32.38; author cworth; state Exp; branches; next 1.1; 1.1 date 2003.11.17.20.55.39; author cworth; state Exp; branches; next ; desc @@ 1.6 log @2005-08-02 Behdad Esfahbod * cgolwin.h, cgolwin.cpp: Get rid of xlib completely. @ text @APPS = cgol OBJECTS = cgol.o ctk.o main.o cgolwin.o HEADERS = ctk.h cgolwin.h cgol.h CXXFLAGS = -g -Wall CXXFLAGS += `pkg-config cairo --cflags` LDFLAGS += `pkg-config cairo --libs` all: $(APPS) $(OBJECTS): $(HEADERS) $(APPS): $(OBJECTS) $(CXX) $(LDFLAGS) -o $@@ $^ clean: $(RM) *.o $(APPS) @ 1.5 log @2005-07-29 Behdad Esfahbod * cgolwin.cpp: Fixed bug that was introduced when blindly changing function names. Passing correct parameters to cairo_xlib_surface_create now. @ text @d13 1 a13 1 $(OBJETS): $(HEADERS) @ 1.4 log @applied patch from Patrick Griffin to use pkg-config for build. @ text @d1 1 d3 4 a6 2 CFLAGS = `pkg-config --cflags cairo` LDFLAGS =`pkg-config --libs cairo` d8 2 a9 2 SOURCES = cgol.cpp ctk.cpp main.cpp cgolwin.cpp HEADERS = ctk.h cgolwin.h cgol.h d11 1 a11 1 all: cgol d13 3 a15 2 cgol: $(HEADERS) $(SOURCES) g++ -Wall -o cgol $(SOURCES) $(CFLAGS) $(LDFLAGS) d18 1 a18 1 rm -f cgol @ 1.3 log @Rewrite, seperate game logic from graphics code from X handling code. Looks nice. Always in colour. Beware - can hog CPU. @ text @d1 7 d10 2 a11 2 cgol: cgol.cpp ctk.cpp main.cpp cgolwin.cpp ctk.h cgolwin.h cgol.h g++ -Wall -o cgol cgol.cpp main.cpp ctk.cpp cgolwin.cpp -L/usr/X11R6/lib -lX11 -I/usr/include/X11/Xft -I/usr/include/freetype2 -lcairo @ 1.2 log @ * gameoflife.cpp (advance): Fix casts to eliminate warnings. (draw): Fix to use 2*M_PI (radians), not 360 (degrees). (draw): Fix to erase entire cell. (render): Always draw the complete grid after drawing each cell. (main): Change window title to "Conway's Game of Life". * Makefile (clean): Add clean target to Makefile. @ text @d1 1 a1 1 all: gameoflife d3 2 a4 2 gameoflife: gameoflife.cpp g++ -g -Wall -I/usr/include/X11/Xft -I/usr/include/freetype2 -L/usr/X11R6/lib -lX11 -lXft -lcairo -o gameoflife gameoflife.cpp d7 1 a7 1 rm -f gameoflife @ 1.1 log @Added game of life demo from Andrew Chant @ text @d6 2 @