Don't hardcode the output directory
authorSam Lantinga <slouken@libsdl.org>
Fri, 14 Apr 2006 03:56:31 +0000
changeset 163414f302c5b32c
parent 1633 b17ca8c3a404
child 1635 92947e3a18db
Don't hardcode the output directory
Makefile.in
build-scripts/makedep.sh
     1.1 --- a/Makefile.in	Fri Apr 14 03:24:01 2006 +0000
     1.2 +++ b/Makefile.in	Fri Apr 14 03:56:31 2006 +0000
     1.3 @@ -61,11 +61,11 @@
     1.4  
     1.5  .PHONY: all depend install install-bin install-hdrs install-lib install-data install-man uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man clean distclean dist
     1.6  depend:
     1.7 -	@SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" objects="$(objects)" output="$(depend)" \
     1.8 +	@SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" output="$(depend)" \
     1.9  	$(SHELL) $(auxdir)/makedep.sh
    1.10  	@for src in $(SDLMAIN_SOURCES); do \
    1.11  	    obj=`echo $$src | sed -e 's|.*/||' -e 's|\.[^\.]*$$|.o|'`; \
    1.12 -	    echo "$(objects)/$$obj: $$src" >>$(depend); \
    1.13 +	    echo "\$$(objects)/$$obj: $$src" >>$(depend); \
    1.14  	    echo "	\$$(CC) \$$(CFLAGS) \$$(EXTRA_CFLAGS) -c $$src -o \$$@" >>$(depend); \
    1.15  	done
    1.16  
     2.1 --- a/build-scripts/makedep.sh	Fri Apr 14 03:24:01 2006 +0000
     2.2 +++ b/build-scripts/makedep.sh	Fri Apr 14 03:56:31 2006 +0000
     2.3 @@ -3,8 +3,8 @@
     2.4  # Generate dependencies from a list of source files
     2.5  
     2.6  # Check to make sure our environment variables are set
     2.7 -if test x"$INCLUDE" = x -o x"$SOURCES" = x -o x"$objects" = x -o x"$output" = x; then
     2.8 -    echo "SOURCES, INCLUDE, objects, and output needs to be set"
     2.9 +if test x"$INCLUDE" = x -o x"$SOURCES" = x -o x"$output" = x; then
    2.10 +    echo "SOURCES, INCLUDE, and output needs to be set"
    2.11      exit 1
    2.12  fi
    2.13  cache_prefix=".#$$"
    2.14 @@ -41,8 +41,8 @@
    2.15  for src in $SOURCES
    2.16  do  echo "Generating dependencies for $src"
    2.17      ext=`echo $src | sed 's|.*\.\(.*\)|\1|'`
    2.18 -    obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|$objects/\1.lo|g"`
    2.19 -    echo "$obj: $src \\" >>${output}.new
    2.20 +    obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"`
    2.21 +    echo "\$(objects)/$obj: $src \\" >>${output}.new
    2.22      search_deps $src | sort | uniq >>${output}.new
    2.23      case $ext in
    2.24          c) cat >>${output}.new <<__EOF__