From: Patrik Gornicz Date: Mon, 27 Apr 2009 19:42:13 +0000 (-0400) Subject: changed make files for the library, added gitignore X-Git-Tag: libbear-premerge~104 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=commitdiff_plain;h=39c0233058d766330cda05d7af4a5421f773ace5;p=libbear.git changed make files for the library, added gitignore --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..638949d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +deps + +objsd +bind diff --git a/Makefile b/Makefile index 1b6a3c6..073ff04 100644 --- a/Makefile +++ b/Makefile @@ -30,35 +30,7 @@ include ${SRCSDIR}${DIRMK} WORKINGDIR := bind/ -CFGDIRNAME := configs/ -SRCCFGDIR := ${CFGDIRNAME} -DSTCFGDIR := ${WORKINGDIR}${CFGDIRNAME} - -CFGS := # := start -CFGS += keys.cfg -CFGS := $(addprefix ${DSTCFGDIR},${CFGS}) - -SRCLIBSDIR := libs/ -DSTLIBSDIR := ${WORKINGDIR} - -LIBSTXT := # := start -LIBSTXT += COPYING-SDL -LIBSTXT += README-SDL -LIBSTXT += VERSION-SDL -LIBSTXT := $(addprefix ${DSTLIBSDIR},${LIBSTXT}) - -LIBSCPY := # := start -LIBSCPY += libSDL.so -LIBSCPY := $(addprefix ${DSTLIBSDIR},${LIBSCPY}) - -SRCTXTDIR := -DSTTXTDIR := ${WORKINGDIR} - -TXT := # := start -TXT += COPYING -TXT := $(addprefix ${DSTTXTDIR},${TXT}) - -TARGETNAME := run_physics +TARGETNAME := pglib.so TARGETTMP := ${OBJSDIR}${TARGETNAME} TARGET := ${WORKINGDIR}${TARGETNAME} @@ -86,7 +58,7 @@ else endif .PHONY: all -all: ${TARGET} ${CFGS} ${LIBSTXT} ${LIBSCPY} ${TXT} +all: ${TARGET} # cause the fancy $$ directory rules to work out .SECONDEXPANSION: @@ -101,21 +73,6 @@ ${TARGET}: ${TARGETTMP} | ${WORKINGDIR} ${Q1}${PRNTFMT} "cp" "$@" ${Q2}cp $< $@ -# rule to copy the config files into the working directory -${DSTCFGDIR}%: ${SRCCFGDIR}% | $$(dir $$@) - ${Q1}${PRNTFMT} "cp" "$@" - ${Q2}cp $< $@ - -# rule to copy the library files into the working directory -${DSTLIBSDIR}%: ${SRCLIBSDIR}% | $$(dir $$@) - ${Q1}${PRNTFMT} "cp" "$@" - ${Q2}cp $< $@ - -# rule to copy the library files into the working directory -${DSTTXTDIR}%: ${SRCTXTDIR}% | $$(dir $$@) - ${Q1}${PRNTFMT} "cp" "$@" - ${Q2}cp $< $@ - # how to make a directory ${BLDDIRS}: ${Q1}${PRNTFMT} "mkdir" "$@" @@ -164,62 +121,8 @@ gitclean: gitcleanf: ${Q1}${PRNTFMT} "git clean" "forcing" ${Q2}git clean -fxd - -.PHONY: tar -tar: physics.tar.bz2 - -.PHONY: physics.tar.bz2 -physics.tar.bz2: - @${PRNTFMT} "git archive" "Warning, archives HEAD not current" - ${Q1}${PRNTFMT} "git archive" "physics.tar.bz2" - ${Q2}git archive --prefix=physics/ HEAD | bzip2 > physics.tar.bz2 - -.PHONY: run -run: all - cd ${WORKINGDIR}; ./${TARGETNAME} - -.PHONY: gdb -gdb: all - cd ${WORKINGDIR}; gdb ${TARGETNAME} - -.PHONY: cgdb -cgdb: all - cd ${WORKINGDIR}; cgdb ${TARGETNAME} - -.PHONY: val -val: all - cd ${WORKINGDIR}; valgrind ${VALFLAGS} ./${TARGETNAME} - -.PHONY: prof -prof: run cd ${WORKINGDIR}; gprof -b ${TARGETNAME} > prof cd ${WORKINGDIR}; kprof -f prof -MINGMAKEARGS := "LIBGL := -lopengl32 -lglu32" \ - "LIBSDL := `/usr/mingw32/bin/sdl-config --libs`" \ - "LIBSCPY := $(addprefix bin-mingw32/,SDL.dll)" \ - "CXXFLAGS := ${OPTFLAGS}" \ - "CXX := mingw32-g++" \ - "OBJSDIR := objs-mingw32/" \ - "WORKINGDIR := bin-mingw32/" \ - "TARGETNAME := run_physics.exe" - -.PHONY: mingw32 -mingw32: - ${Q1}${PRNTFMT} "make" "mingw32" - ${Q2}${MAKE} ${MINGMAKEARGS} cleanbin cleanobjs - ${Q2}${MAKE} ${MINGMAKEARGS} all - -FINALMAKEARGS := "CXXFLAGS := ${OPTFLAGS}" \ - "OBJSDIR := objs/" \ - "WORKINGDIR := bin/" - -.PHONY: final -final: - ${Q1}${PRNTFMT} "make" "final" - ${Q2}${MAKE} ${FINALMAKEARGS} cleanbin cleanobjs - ${Q2}${MAKE} ${FINALMAKEARGS} all - - -include ${DEPS} diff --git a/src/dir.mk b/src/dir.mk index 303c805..db28ab3 100644 --- a/src/dir.mk +++ b/src/dir.mk @@ -1,32 +1,9 @@ NEWSRCS := # insure blank -NEWSRCS += game.cpp -NEWSRCS += main.cpp -NEWSRCS += mathw.cpp -NEWSRCS += ticks.cpp NEWSRCS += Vector2.cpp -NEWSRCS += handleSignal.cpp - -NEWSRCS += entityCreator.cpp -NEWSRCS += entityManager.cpp -NEWSRCS += effectManager.cpp -NEWSRCS += collisionManager.cpp -NEWSRCS += CollisionInfo.cpp - -NEWSRCS += debug.cpp - NEWDIRS := # insure blank -NEWDIRS += Entities/ -NEWDIRS += GameStates/ -NEWDIRS += Effects/ -NEWDIRS += config/ -NEWDIRS += input/ -NEWDIRS += graphics/ -NEWDIRS += locks/ - - # Post dir setup CURDIR :=