Module: wine Branch: master Commit: 908dada6620ce84df6044b786d348671d26a72d8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=908dada6620ce84df6044b786d...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 30 20:17:36 2013 +0100
makedep: Generate rules for static libraries.
---
Make.rules.in | 14 -------------- Make.vars.in | 2 -- configure | 2 -- configure.ac | 2 -- tools/makedep.c | 24 ++++++++++++++++++++++++ 5 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/Make.rules.in b/Make.rules.in index c368f9a..0a40ff4 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -27,20 +27,6 @@ OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_ CROSSOBJS = $(OBJS:.o=.cross.o) ALLCROSSCFLAGS = $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS)
-# Rules for static libraries - -all: $(STATICLIB) - -$(STATICLIB): $(OBJS) - $(RM) $@ - $(AR) $(ARFLAGS) $@ $(OBJS) - $(RANLIB) $@ - -$(STATICLIB:.a=.cross.a): $(CROSSOBJS) - $(RM) $@ - $(CROSSAR) $(ARFLAGS) $@ $(CROSSOBJS) - $(CROSSRANLIB) $@ - # Rules for dependencies
depend: dummy diff --git a/Make.vars.in b/Make.vars.in index 5246f89..bc19456 100644 --- a/Make.vars.in +++ b/Make.vars.in @@ -49,8 +49,6 @@ CROSSTARGET = @CROSSTARGET@ LINGUAS = @LINGUAS@ ALL_MO_FILES = $(LINGUAS:%=@top_builddir@/po/%.mo) PORCFLAGS = @PORCFLAGS@ -CROSSAR = $(CROSSTARGET)-ar -CROSSRANLIB = $(CROSSTARGET)-ranlib BUILDIMAGE = $(top_srcdir)/tools/buildimage C2MAN = $(top_srcdir)/tools/c2man.pl RUNTEST = $(top_srcdir)/tools/runtest diff --git a/configure b/configure index 8a254ad..91bb070 100755 --- a/configure +++ b/configure @@ -16549,7 +16549,6 @@ MAKE_IMPLIB_RULES="DLLFLAGS = $DLLFLAGS if test -n "$CROSSTARGET" then as_fn_append MAKE_IMPLIB_RULES "MAKEDEPFLAGS = -xo -xcross.o -all: $(STATICLIB:.a=.cross.a) " fi
@@ -17410,7 +17409,6 @@ zh_TW"
-wine_fn_ignore_file "*.a" wine_fn_ignore_file "*.exe" test -n "$DLLEXT" && wine_fn_ignore_file "*$DLLEXT" wine_fn_ignore_file ".gitignore" diff --git a/configure.ac b/configure.ac index a8a7da4..9d1948c 100644 --- a/configure.ac +++ b/configure.ac @@ -2607,7 +2607,6 @@ AC_SUBST(MAKE_IMPLIB_RULES,"DLLFLAGS = $DLLFLAGS if test -n "$CROSSTARGET" then AS_VAR_APPEND([MAKE_IMPLIB_RULES],"MAKEDEPFLAGS = -xo -xcross.o -all: $(STATICLIB:.a=.cross.a) ") fi
@@ -3456,7 +3455,6 @@ dnl End of auto-generated output commands
dnl Main ignore file
-WINE_IGNORE_FILE("*.a") WINE_IGNORE_FILE("*.exe") test -n "$DLLEXT" && WINE_IGNORE_FILE("*$DLLEXT") WINE_IGNORE_FILE(".gitignore") diff --git a/tools/makedep.c b/tools/makedep.c index f7bba41..ee24bba 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1386,6 +1386,7 @@ static struct strarray output_sources(void) char *module = get_expanded_make_variable( "MODULE" ); char *exeext = get_expanded_make_variable( "EXEEXT" ); char *appmode = get_expanded_make_variable( "APPMODE" ); + char *staticlib = get_expanded_make_variable( "STATICLIB" ); char *crosstarget = get_expanded_make_variable( "CROSSTARGET" );
if (exeext && !strcmp( exeext, ".exe" )) dllext = ""; @@ -1749,6 +1750,29 @@ static struct strarray output_sources(void) } }
+ if (staticlib) + { + strarray_add( &all_targets, staticlib ); + output( "%s:", staticlib ); + output_filenames( object_files ); + output( "\n\t$(RM) $@\n" ); + output( "\t$(AR) $(ARFLAGS) $@" ); + output_filenames( object_files ); + output( "\n\t$(RANLIB) $@\n" ); + if (crosstarget && object_extensions.count > 1) + { + char *name = replace_extension( staticlib, ".a", ".cross.a" ); + + strarray_add( &all_targets, name ); + output( "%s:", name ); + output_filenames( crossobj_files ); + output( "\n\t$(RM) $@\n" ); + output( "\t%s-ar $(ARFLAGS) $@", crosstarget ); + output_filenames( crossobj_files ); + output( "\n\t%s-ranlib $@\n", crosstarget ); + } + } + if (is_test) { struct strarray ok_files = strarray_replace_extension( &test_files, ".c", ".ok" );