From: Patrik Gornicz Date: Mon, 19 Jan 2009 00:20:38 +0000 (-0500) Subject: moved makefile up to root X-Git-Tag: physics-premerge~73 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=commitdiff_plain;h=ec424960c1302936d90b91db56ee5121cfa68155;p=libbear.git moved makefile up to root --- diff --git a/src/Makefile b/Makefile similarity index 91% rename from src/Makefile rename to Makefile index cf86e4b..597a1e6 100644 --- a/src/Makefile +++ b/Makefile @@ -23,21 +23,24 @@ DIRS += input/ DIRS += graphics/ DIRS += locks/ -SRCS := # := start -include $(addsuffix /files.mk,${DIRS}) +SRCSDIR := src/ +SRCS := # := start -WORKINGDIR := ../bind/ +# include all of the files.mk +include $(addprefix ${SRCSDIR},$(addsuffix files.mk,${DIRS})) -OBJSDIR := ../objsd/ +WORKINGDIR := bind/ + +OBJSDIR := objsd/ OBJS := ${SRCS:.cpp=.o} OBJS := $(addprefix ${OBJSDIR},${OBJS}) -DEPSDIR := ../deps/ +DEPSDIR := deps/ DEPS := ${SRCS:.cpp=.d} DEPS := $(addprefix ${DEPSDIR},${DEPS}) CFGDIRNAME := configs/ -SRCCFGDIR := ../${CFGDIRNAME} +SRCCFGDIR := ${CFGDIRNAME} DSTCFGDIR := ${WORKINGDIR}${CFGDIRNAME} CFGS := # := start @@ -46,7 +49,7 @@ CFGS := $(addprefix ${DSTCFGDIR},${CFGS}) TARGETNAME := run_physics TARGETTMP := ${OBJSDIR}${TARGETNAME} -TARGET := ${WORKINGDIR}${TARGETNAME} +TARGET := ${WORKINGDIR}${TARGETNAME} DEPSBLDDIRS := $(addprefix ${DEPSDIR},${DIRS}) OBJSBLDDIRS := $(addprefix ${OBJSDIR},${DIRS}) @@ -85,12 +88,12 @@ ${BLDDIRS}: ${Q2}mkdir -p $@ # rule to make an object file from a .cpp -${OBJSDIR}%.o: %.cpp | ${OBJSBLDDIRS} +${OBJSDIR}%.o: ${SRCSDIR}%.cpp | ${OBJSBLDDIRS} ${Q1}echo "${CXX}: $@" ${Q2}${CXX} ${CXXFLAGS} -c -o $@ $< # rule to make a depend file from a .cpp -${DEPSDIR}%.d: %.cpp | ${DEPSBLDDIRS} +${DEPSDIR}%.d: ${SRCSDIR}%.cpp | ${DEPSBLDDIRS} ${Q1}echo "DEP: $@" ${Q2}${CXX} -MM ${CXXFLAGS} $< | sed 's,\(^.*\):,${OBJSDIR}\1 $@:,' > $@