configure.in
changeset 3334 61ea9005fddf
parent 3332 da1cb54d74ef
child 3351 8e0182c236d8
     1.1 --- a/configure.in	Sat Oct 03 16:23:16 2009 +0000
     1.2 +++ b/configure.in	Sun Oct 04 03:38:01 2009 +0000
     1.3 @@ -2555,7 +2555,7 @@
     1.4          #EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows"
     1.5          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm"
     1.6          # The Win32 platform requires special setup
     1.7 -        SOURCES="$SOURCES $srcdir/src/main/win32/*.rc"
     1.8 +        VERSION_SOURCES="$srcdir/src/main/win32/*.rc"
     1.9          SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
    1.10          SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
    1.11          SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
    1.12 @@ -2769,15 +2769,28 @@
    1.13      SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
    1.14  fi
    1.15  
    1.16 -OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.asm,$(objects)/\1.lo,g'`
    1.17 -OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'`
    1.18 -OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
    1.19 -OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
    1.20 -OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.S,$(objects)/\1.lo,g'`
    1.21 -OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
    1.22 +OBJECTS=`echo $SOURCES`
    1.23 +DEPENDS=`echo $SOURCES`
    1.24 +for EXT in asm cc m c S; do
    1.25 +    OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
    1.26 +    DEPENDS=`echo "$DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.'$EXT',\\
    1.27 +$(objects)/\2.lo: \1/\2.'$EXT'\\
    1.28 +	\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -MMD -MT \$@ -c \$< -o \$@,g'`
    1.29 +done
    1.30  
    1.31 -SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.o,g'`
    1.32 -SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
    1.33 +VERSION_OBJECTS=`echo $VERSION_SOURCES`
    1.34 +VERSION_DEPENDS=`echo $VERSION_SOURCES`
    1.35 +VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
    1.36 +VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.rc,\\
    1.37 +$(objects)/\2.o: \1/\2.rc\\
    1.38 +	\$(WINDRES) \$< \$@,g'`
    1.39 +
    1.40 +SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
    1.41 +SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
    1.42 +SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
    1.43 +SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
    1.44 +$(objects)/\2.o: \1/\2.c\\
    1.45 +	\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -MMD -MT \$@ -c \$< -o \$@,g'`
    1.46  
    1.47  # Set runtime shared library paths as needed
    1.48  
    1.49 @@ -2829,10 +2842,12 @@
    1.50  dnl Expand the sources and objects needed to build the library
    1.51  AC_SUBST(ac_aux_dir)
    1.52  AC_SUBST(INCLUDE)
    1.53 -AC_SUBST(SOURCES)
    1.54  AC_SUBST(OBJECTS)
    1.55 -AC_SUBST(SDLMAIN_SOURCES)
    1.56 +AC_SUBST(DEPENDS)
    1.57 +AC_SUBST(VERSION_OBJECTS)
    1.58 +AC_SUBST(VERSION_DEPENDS)
    1.59  AC_SUBST(SDLMAIN_OBJECTS)
    1.60 +AC_SUBST(SDLMAIN_DEPENDS)
    1.61  AC_SUBST(BUILD_CFLAGS)
    1.62  AC_SUBST(EXTRA_CFLAGS)
    1.63  AC_SUBST(BUILD_LDFLAGS)
    1.64 @@ -2841,7 +2856,4 @@
    1.65  
    1.66  AC_OUTPUT([
    1.67      Makefile sdl-config SDL.spec sdl.pc
    1.68 -], [
    1.69 -    : >build-deps
    1.70 -    if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend
    1.71  ])