From: Patrik Gornicz Date: Thu, 17 Jul 2008 00:56:50 +0000 (-0400) Subject: Make updated X-Git-Tag: physics-premerge~206 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=commitdiff_plain;h=046b034cd191d42dab6b27aa909b6044b0c7ca8a;p=libbear.git Make updated --- diff --git a/src/Entities/Makefile b/src/Entities/Makefile deleted file mode 100644 index a315853..0000000 --- a/src/Entities/Makefile +++ /dev/null @@ -1,45 +0,0 @@ - -LIBALLG = `allegro-config --libs release` -LIBGL = -lGL -lGLU -LIBSDL = `sdl-config --libs` -LIBS = ${LIBSDL} ${LIBGL} - -CXX = g++ -CXXFLAGS = -ggdb -Wall -pedantic - -LDFLAGS = -lc - -SRCS = Ball.cpp Entity.cpp Line.cpp Particle.cpp PhysicsEntity.cpp \ - Point.cpp Polygon.cpp WindParticle.cpp -OBJS = ${SRCS:.cpp=.o} - -TARGETS = Entity.ld -DEPEND = depend.mk - -# set suffixes to look for ... -.SUFFIXES: .cpp .o - -# set default action for a *.cc to create a *.o -.cpp.o: - g++ -c $< ${CXXFLAGS} - -all: ${TARGETS} - -depend: - ${CXX} -MM ${SRCS} > ${DEPEND} - -tags: - ctags ${SRCS} - -clean: - rm -f ${OBJS} ${TARGETS} *~ - -distclean: clean - rm -f tags depend.mk - touch depend.mk - -Entity.ld: ${OBJS} -# ld -o Entity.ld ${LDFLAGS} ${OBJS} - -include ${DEPEND} - diff --git a/src/GameStates/Makefile b/src/GameStates/Makefile deleted file mode 100644 index 02c0cfd..0000000 --- a/src/GameStates/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -LIBALLG = `allegro-config --libs release` -LIBGL = -lGL -lGLU -LIBSDL = `sdl-config --libs` -LIBS = ${LIBSDL} ${LIBGL} - -CXX = g++ -CXXFLAGS = -ggdb -Wall -pedantic - -LDFLAGS = -lc - -SRCS = GameState.cpp -OBJS = ${SRCS:.cpp=.o} - -TARGETS = GameStates.ld -DEPEND = depend.mk - -# set suffixes to look for ... -.SUFFIXES: .cpp .o - -# set default action for a *.cc to create a *.o -.cpp.o: - g++ -c $< ${CXXFLAGS} - -all: ${TARGETS} - -depend: - ${CXX} -MM ${SRCS} > ${DEPEND} - -tags: - ctags ${SRCS} - -clean: - rm -f ${OBJS} ${TARGETS} *~ - -distclean: clean - rm -f tags depend.mk - touch depend.mk - -GameStates.ld: ${OBJS} -# ld -o Entity.ld ${LDFLAGS} ${OBJS} - -include ${DEPEND} - diff --git a/src/Makefile b/src/Makefile index c25ab1b..d830a80 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,4 @@ -LIBALLG = `allegro-config --libs release` LIBGL = -lGL -lGLU LIBSDL = `sdl-config --libs` LIBS = ${LIBSDL} ${LIBGL} @@ -7,47 +6,64 @@ LIBS = ${LIBSDL} ${LIBGL} CXX = g++ CXXFLAGS = -ggdb -Wall -pedantic -SRCS = Vector2.cpp ticks.cpp main.cpp game.cpp entityManager.cpp gldraw.cpp graphics.cpp +SRCS := entityManager.cpp +SRCS += game.cpp +SRCS += graphics.cpp +SRCS += main.cpp +SRCS += mathw.cpp +SRCS += ticks.cpp +SRCS += Vector2.cpp + +SRCS += Entities/Ball.cpp +SRCS += Entities/Entity.cpp +SRCS += Entities/Line.cpp +SRCS += Entities/Particle.cpp +SRCS += Entities/PhysicsEntity.cpp +SRCS += Entities/Point.cpp +SRCS += Entities/Polygon.cpp +SRCS += Entities/WindParticle.cpp + +SRCS += GameStates/CreatingPolygon.cpp +SRCS += GameStates/GameState.cpp +SRCS += GameStates/Paused.cpp +SRCS += GameStates/Running.cpp + OBJS = ${SRCS:.cpp=.o} -TARGETS = ../run_physics +TARGET = ../run_physics DEPEND = depend.mk -# set suffixes to look for ... -.SUFFIXES: .cpp .o -# set default action for a *.cc to create a *.o -.cpp.o: - g++ -c $< ${CXXFLAGS} +.PHONY: all +all: ${TARGET} -all: ${TARGETS} +${TARGET}: ${OBJS} + ${CXX} ${CXXFLAGS} -o ${TARGET} $^ ${LIBS} -depend: - ${CXX} -MM ${SRCS} > ${DEPEND} +.PHONY: depend +depend: ${SRCS} + ${CXX} -MM $^ > ${DEPEND} -tags: - ctags ${SRCS} +.PHONY: clean clean: - rm -f ${OBJS} ${TARGETS} *~ + rm -f ${OBJS} ${TARGET} *~ +.PHONY: distclean distclean: clean rm -f tags depend.mk touch depend.mk -# i need to find a nice way of ijnoring .svn folders for the below +tags: ${SRCS} + ctags $^ + tar: clean cd ..; tar -cjf bluestar.tar.bz2 images/ source/ -run: ../run_physics - cd ..; ./run_physics - -../run_physics: ${OBJS} - ${CXX} ${CXXFLAGS} -o ../run_physics ${OBJS} ${LIBS} - -Entities.d: - cd Entities; make +.PHONY: run +run: all + ../${TARGET} include ${DEPEND}