aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMax Horn2004-02-21 15:55:26 +0000
committerMax Horn2004-02-21 15:55:26 +0000
commit24e5059aec315c7c6baa7668d352965315487629 (patch)
tree8225be1663b0c07645c9827f0fcd90b02b5ccd5a /configure
parent9119fc440f6a07dc9828c3de658fb2d6961d57ce (diff)
downloadscummvm-rg350-24e5059aec315c7c6baa7668d352965315487629.tar.gz
scummvm-rg350-24e5059aec315c7c6baa7668d352965315487629.tar.bz2
scummvm-rg350-24e5059aec315c7c6baa7668d352965315487629.zip
Create a simple Makefile when building outside the source tree (Needs improvement, but works well enough in most cases)
svn-id: r12972
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index 81ccfb0815..0808696ce5 100755
--- a/configure
+++ b/configure
@@ -843,3 +843,21 @@ OBJS += $OBJS
DEFINES += $DEFINES
LDFLAGS += $LDFLAGS
EOF
+
+#
+# Create a custom Makefile when building outside the source tree
+# TODO: Add a better check than just looking for 'Makefile'
+#
+if test ! -f Makefile ; then
+_srcdir=`dirname $0`
+echo "Creating Makefile"
+
+cat > Makefile << EOF
+# -------- Generated by configure -----------
+srcdir = $_srcdir
+vpath %.cpp \$(srcdir)
+vpath %.h \$(srcdir)
+include \$(srcdir)/Makefile
+EOF
+
+fi