From 5f264bf7b084d17ab5cc4d73aaeda48904fbf618 Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Sun, 18 Jan 2009 19:30:44 -0500 Subject: [PATCH] more makefile changes due t move --- Makefile | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 597a1e6..7e8ef21 100644 --- a/Makefile +++ b/Makefile @@ -93,9 +93,12 @@ ${OBJSDIR}%.o: ${SRCSDIR}%.cpp | ${OBJSBLDDIRS} ${Q2}${CXX} ${CXXFLAGS} -c -o $@ $< # rule to make a depend file from a .cpp +# be clever and escape the / chars in file paths +# DON'T simply use another sed delimiter or it can't appear in the file paths ${DEPSDIR}%.d: ${SRCSDIR}%.cpp | ${DEPSBLDDIRS} ${Q1}echo "DEP: $@" - ${Q2}${CXX} -MM ${CXXFLAGS} $< | sed 's,\(^.*\):,${OBJSDIR}\1 $@:,' > $@ + ${Q2}${CXX} -MM ${CXXFLAGS} $< | \ + sed 's/\(^.*\):/$(subst /,\/,${OBJSDIR}\1 $@):/' > $@ # rule to copy the config files into the working directory ${DSTCFGDIR}%.cfg: ${SRCCFGDIR}%.cfg | ${DSTCFGDIR} @@ -124,22 +127,22 @@ distclean: clean .PHONY: gitclean gitclean: - ${Q1}echo "git-clean: show, use gitcleanf to force" - ${Q2}cd ..; git clean -nxd + ${Q1}echo "git clean: showing; use gitcleanf to force removal" + ${Q2}git clean -nxd .PHONY: gitcleanf gitcleanf: - ${Q1}echo "git-clean: forced" - ${Q2}cd ..; git clean -fxd + ${Q1}echo "git clean: forcing" + ${Q2}git clean -fxd .PHONY: tar -tar: ../physics.tar.bz2 +tar: physics.tar.bz2 -.PHONY: ../physics.tar.bz2 -../physics.tar.bz2: +.PHONY: physics.tar.bz2 +physics.tar.bz2: @echo "git-archive: Warning, archives HEAD not current" - ${Q1}echo "git-archive: ../physics.tar.bz2" - ${Q2}cd ..; git-archive --prefix=physics/ HEAD | bzip2 > physics.tar.bz2 + ${Q1}echo "git-archive: physics.tar.bz2" + ${Q2}git-archive --prefix=physics/ HEAD | bzip2 > physics.tar.bz2 .PHONY: run run: all @@ -167,8 +170,8 @@ MINGMAKEARGS := "LIBGL := -lopengl32 -lglu32" \ "LIBSDL := `/usr/mingw32/bin/sdl-config --libs`" \ "CXXFLAGS := ${OPTFLAGS}" \ "CXX := mingw32-g++" \ - "OBJSDIR := ../objs-mingw32/" \ - "WORKINGDIR := ../bin-mingw32/" \ + "OBJSDIR := objs-mingw32/" \ + "WORKINGDIR := bin-mingw32/" \ "TARGETNAME := run_physics.exe" .PHONY: mingw32 @@ -177,8 +180,8 @@ mingw32: ${Q2}${MAKE} ${MINGMAKEARGS} clean all FINALMAKEARGS := "CXXFLAGS := ${OPTFLAGS}" \ - "OBJSDIR := ../objs/" \ - "WORKINGDIR := ../bin/" + "OBJSDIR := objs/" \ + "WORKINGDIR := bin/" .PHONY: final final: -- 2.10.2