diff --git a/configure b/configure index 71ff42b8c5e..c0eff261719 100755 --- a/configure +++ b/configure @@ -16533,11 +16533,6 @@ $as_echo_n "creating Makefile rules..." >&6 MAKE_IMPLIB_RULES="DLLFLAGS = $DLLFLAGS " -if test -n "$CROSSTARGET" -then - as_fn_append MAKE_IMPLIB_RULES "MAKEDEPFLAGS = -xo -xcross.o -" -fi MAKE_DLL_RULES=" @@ -16556,12 +16551,6 @@ DLLFLAGS = $DLLFLAGS RUNTESTFLAGS = -q -P wine " -if test -n "$CROSSTARGET" -then - as_fn_append MAKE_TEST_RULES " -MAKEDEPFLAGS = -xo -xcross.o -" -fi wine_fn_append_rule " diff --git a/configure.ac b/configure.ac index bbae5b008c6..801527d2d04 100644 --- a/configure.ac +++ b/configure.ac @@ -2595,11 +2595,6 @@ dnl Import library rules AC_SUBST(MAKE_IMPLIB_RULES,"DLLFLAGS = $DLLFLAGS ") -if test -n "$CROSSTARGET" -then - AS_VAR_APPEND([MAKE_IMPLIB_RULES],"MAKEDEPFLAGS = -xo -xcross.o -") -fi dnl Dll and program rules @@ -2617,12 +2612,6 @@ AC_SUBST(MAKE_TEST_RULES," DLLFLAGS = $DLLFLAGS RUNTESTFLAGS = -q -P wine ") -if test -n "$CROSSTARGET" -then - AS_VAR_APPEND([MAKE_TEST_RULES]," -MAKEDEPFLAGS = -xo -xcross.o -") -fi dnl Main makefile diff --git a/dlls/adsiid/Makefile.in b/dlls/adsiid/Makefile.in index 221f19abaa2..a5b27d53fa8 100644 --- a/dlls/adsiid/Makefile.in +++ b/dlls/adsiid/Makefile.in @@ -1,4 +1,4 @@ -STATICLIB = libadsiid.a +MODULE = libadsiid.a C_SRCS = \ adsiid.c diff --git a/dlls/dxerr8/Makefile.in b/dlls/dxerr8/Makefile.in index dbd9b0263a9..aa46a267403 100644 --- a/dlls/dxerr8/Makefile.in +++ b/dlls/dxerr8/Makefile.in @@ -1,4 +1,4 @@ -STATICLIB = libdxerr8.a +MODULE = libdxerr8.a C_SRCS = \ dxerr8.c diff --git a/dlls/dxerr9/Makefile.in b/dlls/dxerr9/Makefile.in index c85f648e615..57edb145f29 100644 --- a/dlls/dxerr9/Makefile.in +++ b/dlls/dxerr9/Makefile.in @@ -1,4 +1,4 @@ -STATICLIB = libdxerr9.a +MODULE = libdxerr9.a C_SRCS = \ dxerr9.c diff --git a/dlls/dxguid/Makefile.in b/dlls/dxguid/Makefile.in index 261e0d04685..a47a51f0ad2 100644 --- a/dlls/dxguid/Makefile.in +++ b/dlls/dxguid/Makefile.in @@ -1,4 +1,4 @@ -STATICLIB = libdxguid.a +MODULE = libdxguid.a C_SRCS = \ dx10guid.c \ diff --git a/dlls/strmbase/Makefile.in b/dlls/strmbase/Makefile.in index 473cbddc04d..3ac7c5611e2 100644 --- a/dlls/strmbase/Makefile.in +++ b/dlls/strmbase/Makefile.in @@ -1,4 +1,4 @@ -STATICLIB = libstrmbase.a +MODULE = libstrmbase.a C_SRCS = \ audio.c \ diff --git a/dlls/strmiids/Makefile.in b/dlls/strmiids/Makefile.in index 3ed92477ffa..744682e752a 100644 --- a/dlls/strmiids/Makefile.in +++ b/dlls/strmiids/Makefile.in @@ -1,4 +1,4 @@ -STATICLIB = libstrmiids.a +MODULE = libstrmiids.a C_SRCS = \ strmiids.c diff --git a/dlls/uuid/Makefile.in b/dlls/uuid/Makefile.in index 904c354e4c2..bc35e6983ad 100644 --- a/dlls/uuid/Makefile.in +++ b/dlls/uuid/Makefile.in @@ -1,4 +1,4 @@ -STATICLIB = libuuid.a +MODULE = libuuid.a C_SRCS = \ uuid.c diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in index 99cd65f8172..23dca02d85d 100644 --- a/dlls/winecrt0/Makefile.in +++ b/dlls/winecrt0/Makefile.in @@ -1,4 +1,4 @@ -STATICLIB = libwinecrt0.a +MODULE = libwinecrt0.a C_SRCS = \ delay_load.c \ diff --git a/tools/makedep.c b/tools/makedep.c index fba15ed14c9..c84cc59b10a 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -93,7 +93,6 @@ struct strarray static const struct strarray empty_strarray; static struct strarray include_args; -static struct strarray object_extensions; static struct strarray make_vars; static struct strarray cmdline_vars; @@ -475,9 +474,6 @@ static void init_paths(void) if (top_src_dir) strarray_insert( &include_args, 0, strmake( "-I%s/include", top_src_dir )); else if (top_obj_dir) strarray_insert( &include_args, 0, strmake( "-I%s/include", top_obj_dir )); - - /* set the default extension list for object files */ - if (!object_extensions.count) strarray_add( &object_extensions, "o" ); } @@ -1391,6 +1387,7 @@ static struct strarray output_sources(void) char *crosstarget = get_expanded_make_variable( "CROSSTARGET" ); if (exeext && !strcmp( exeext, ".exe" )) dllext = ""; + if (module && strendswith( module, ".a" )) staticlib = module; strarray_add( &includes, "-I." ); if (src_dir) strarray_add( &includes, strmake( "-I%s", src_dir )); @@ -1573,29 +1570,17 @@ static struct strarray output_sources(void) } else { + int need_cross = testdll || (source->flags & FLAG_C_IMPLIB) || (module && staticlib); + if (source->flags & FLAG_GENERATED) strarray_add( &clean_files, source->filename ); if (source->flags & FLAG_C_IMPLIB) strarray_add( &implib_objs, strmake( "%s.o", obj )); - for (i = 0; i < object_extensions.count; i++) - { - output( "%s.%s: %s\n", obj, object_extensions.str[i], sourcedep ); - if (strstr( object_extensions.str[i], "cross" )) - { - strarray_add( &crossobj_files, strmake( "%s.%s", obj, object_extensions.str[i] )); - output( "\t$(CROSSCC) -c -o $@ %s", source->filename ); - output_filenames( includes ); - output_filename( "$(ALLCROSSCFLAGS)" ); - output( "\n" ); - } - else - { - strarray_add( &object_files, strmake( "%s.%s", obj, object_extensions.str[i] )); - output( "\t$(CC) -c -o $@ %s", source->filename ); - output_filenames( includes ); - output_filename( "$(ALLCFLAGS)" ); - output( "\n" ); - } - } - if (crosstarget && (source->flags & FLAG_C_IMPLIB)) + strarray_add( &object_files, strmake( "%s.o", obj )); + output( "%s.o: %s\n", obj, sourcedep ); + output( "\t$(CC) -c -o $@ %s", source->filename ); + output_filenames( includes ); + output_filename( "$(ALLCFLAGS)" ); + output( "\n" ); + if (crosstarget && need_cross) { strarray_add( &crossobj_files, strmake( "%s.cross.o", obj )); output( "%s.cross.o: %s\n", obj, sourcedep ); @@ -1613,9 +1598,8 @@ static struct strarray output_sources(void) } if (!strcmp( ext, "c" ) && !(source->flags & FLAG_GENERATED)) strarray_add( &c2man_files, source->filename ); - for (i = 0; i < object_extensions.count; i++) - output( "%s.%s ", obj, object_extensions.str[i] ); - if (source->flags & FLAG_C_IMPLIB) output( "%s.cross.o", obj ); + output( "%s.o", obj ); + if (crosstarget && need_cross) output( " %s.cross.o", obj ); output( ":" ); } free( obj ); @@ -1660,7 +1644,7 @@ static struct strarray output_sources(void) output( "\n" ); } - if (module) + if (module && !staticlib) { int is_win16 = strendswith( module, "16" ); char *importlib = get_expanded_make_variable( "IMPORTLIB" ); @@ -1802,7 +1786,7 @@ static struct strarray output_sources(void) output( "\t$(AR) $(ARFLAGS) $@" ); output_filenames( object_files ); output( "\n\t$(RANLIB) $@\n" ); - if (crosstarget && object_extensions.count > 1) + if (crosstarget && module) { char *name = replace_extension( staticlib, ".a", ".cross.a" ); @@ -2076,12 +2060,6 @@ static void update_makefile( const char *path ) top_obj_dir = get_expanded_make_variable( "top_builddir" ); parent_dir = get_expanded_make_variable( "PARENTSRC" ); - object_extensions = empty_strarray; - value = get_expanded_make_var_array( "MAKEDEPFLAGS" ); - for (i = 0; i < value.count; i++) - if (!strncmp( value.str[i], "-x", 2 )) - strarray_add( &object_extensions, value.str[i] + 2 ); - include_args = empty_strarray; value = get_expanded_make_var_array( "EXTRAINCL" ); for (i = 0; i < value.count; i++) @@ -2181,8 +2159,7 @@ static int parse_option( const char *opt ) else Separator = NULL; break; case 'x': - if (opt[2]) strarray_add( &object_extensions, xstrdup( opt + 2 )); - break; + break; /* ignored */ default: fprintf( stderr, "Unknown option '%s'\n%s", opt, Usage ); exit(1);