CC = g++ LINK = `sdl-config --libs` -lGL -lGLU -lSDL_image -Wl,-rpath,. OBJ = `sdl-config --cflags` -Wall -c -I../libsegl LIBS = libsegl.so.1 prog: life.o gameoflife.o $(CC) $(LINK) $+ -o GameOfLife $(LIBS) run: prog ./GameOfLife life.o: gameoflife.o %.o: %.cpp %.h $(CC) $(OBJ) $< %.o: %.cpp $(CC) $(OBJ) $< clean: rm -f *.o