projects
/
physics.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ebea113
)
copying of config files
author
Patrik Gornicz
<Gornicz.P@gmail.com>
Sun, 16 Nov 2008 02:11:12 +0000
(21:11 -0500)
committer
Patrik Gornicz
<Gornicz.P@gmail.com>
Sun, 16 Nov 2008 02:11:12 +0000
(21:11 -0500)
src/Makefile
patch
|
blob
|
blame
|
history
diff --git
a/src/Makefile
b/src/Makefile
index
bcdb416
..
3253d18
100644
(file)
--- a/
src/Makefile
+++ b/
src/Makefile
@@
-39,9
+39,17
@@
TARGETNAME := run_physics
TARGETTMP := ${OBJSDIR}${TARGETNAME}
TARGET := ${WORKINGDIR}${TARGETNAME}
TARGETTMP := ${OBJSDIR}${TARGETNAME}
TARGET := ${WORKINGDIR}${TARGETNAME}
+CONFIGDIRNAME := configs/
+CONFIGDIR := ../${CONFIGDIRNAME}
+CONFIGDEST := ${WORKINGDIR}${CONFIGDIRNAME}
+
+CONFIGS := # := start
+CONFIGS += keys.cfg
+CONFIGS := $(addprefix ${CONFIGDEST},${CONFIGS})
+
DEPSBLDDIRS := $(addprefix ${DEPSDIR},${DIRS})
OBJSBLDDIRS := $(addprefix ${OBJSDIR},${DIRS})
DEPSBLDDIRS := $(addprefix ${DEPSDIR},${DIRS})
OBJSBLDDIRS := $(addprefix ${OBJSDIR},${DIRS})
-BLDDIRS
:= ${OBJSBLDDIRS} ${DEPSBLDDIRS} ${WORKINGDIR
}
+BLDDIRS
:= ${OBJSBLDDIRS} ${DEPSBLDDIRS} ${WORKINGDIR} ${CONFIGDEST
}
VERBOSE := 0
VERBOSE := 0
@@
-59,12
+67,17
@@
else
endif
.PHONY: all
endif
.PHONY: all
-all: ${TARGET}
+all: ${TARGET} ${CONFIGS}
+
+# rule to copy the config files into the working directory
+${CONFIGDEST}%.cfg: ${CONFIGDIR}%.cfg | ${CONFIGDIR} ${WORKINGDIR}
+ ${Q1}echo "cp: $@"
+ ${Q2}cp -r $< $@
# rule to copy tmp target to working directory
${TARGET}: ${TARGETTMP} | ${WORKINGDIR}
${Q1}echo "cp: $@"
# rule to copy tmp target to working directory
${TARGET}: ${TARGETTMP} | ${WORKINGDIR}
${Q1}echo "cp: $@"
- ${Q2}cp $
^
$@
+ ${Q2}cp $
<
$@
# how to link the main target
${TARGETTMP}: ${OBJS}
# how to link the main target
${TARGETTMP}: ${OBJS}