Commit 3571c067 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Generate explicit build rules for C source files from makedep.

parent 57f5e141
...@@ -33,6 +33,7 @@ OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_ ...@@ -33,6 +33,7 @@ OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_
$(IDL_R_SRCS:.idl=_r.res) $(IDL_TLB_RES) $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.res) $(EXTRA_OBJS) $(IDL_R_SRCS:.idl=_r.res) $(IDL_TLB_RES) $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.res) $(EXTRA_OBJS)
CROSSOBJS = $(OBJS:.o=.cross.o) CROSSOBJS = $(OBJS:.o=.cross.o)
ALLCROSSCFLAGS = $(INCLUDES) $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS)
# Implicit rules # Implicit rules
......
DLLFLAGS = @DLLFLAGS@ DLLFLAGS = @DLLFLAGS@
EXTRALIBS = $(LIBPORT) @LIBDL@ @COREFOUNDATIONLIB@ @CORESERVICESLIB@ EXTRALIBS = $(LIBPORT) @LIBDL@ @COREFOUNDATIONLIB@ @CORESERVICESLIB@
EXTRADEFS = -DWINE_UNICODE_API="" EXTRADEFS = -DWINE_UNICODE_API="" \
-DBINDIR='"$(bindir)"' \
-DDLLDIR='"$(dlldir)"' \
-DDLLPREFIX='"$(DLLPREFIX)"' \
-DLIB_TO_BINDIR=\"`$(RELPATH) $(libdir) $(bindir)`\" \
-DLIB_TO_DLLDIR=\"`$(RELPATH) $(libdir) $(dlldir)`\" \
-DBIN_TO_DLLDIR=\"`$(RELPATH) $(bindir) $(dlldir)`\" \
-DBIN_TO_DATADIR=\"`$(RELPATH) $(bindir) $(datadir)/wine`\"
STATICLIB = libwine_static.a STATICLIB = libwine_static.a
VERSION = 1.0 VERSION = 1.0
...@@ -103,23 +110,11 @@ EXTRA_OBJS = version.o ...@@ -103,23 +110,11 @@ EXTRA_OBJS = version.o
@MAKE_RULES@ @MAKE_RULES@
# Special defines needed for config.c
CONFIGDIRS = \
-DBINDIR='"$(bindir)"' \
-DDLLDIR='"$(dlldir)"' \
-DDLLPREFIX='"$(DLLPREFIX)"' \
-DLIB_TO_BINDIR=\"`$(RELPATH) $(libdir) $(bindir)`\" \
-DLIB_TO_DLLDIR=\"`$(RELPATH) $(libdir) $(dlldir)`\" \
-DBIN_TO_DLLDIR=\"`$(RELPATH) $(bindir) $(dlldir)`\" \
-DBIN_TO_DATADIR=\"`$(RELPATH) $(bindir) $(datadir)/wine`\"
config.o: config.c $(RELPATH)
$(CC) -c $(ALLCFLAGS) -o $@ $(srcdir)/config.c $(CONFIGDIRS)
version.c: dummy version.c: dummy
version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1) version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1)
$(OBJS): $(RELPATH)
$(RELPATH): $(RELPATH):
@cd $(TOOLSDIR)/tools && $(MAKE) relpath$(TOOLSEXT) @cd $(TOOLSDIR)/tools && $(MAKE) relpath$(TOOLSEXT)
......
...@@ -981,14 +981,18 @@ static void output_sources(void) ...@@ -981,14 +981,18 @@ static void output_sources(void)
else output( "%s.tab.c: %s\n", obj, source->filename ); else output( "%s.tab.c: %s\n", obj, source->filename );
output( "\t$(BISON) $(BISONFLAGS) -p %s_ -o $@ %s\n", obj, source->filename ); output( "\t$(BISON) $(BISONFLAGS) -p %s_ -o $@ %s\n", obj, source->filename );
column += output( "%s.tab.o: %s.tab.c", obj, obj ); output( "%s.tab.o: %s.tab.c\n", obj, obj );
output( "\t$(CC) -c $(ALLCFLAGS) -o $@ %s.tab.c\n", obj );
column += output( "%s.tab.o:", obj );
free( header ); free( header );
} }
else if (!strcmp( ext, "l" )) /* lex file */ else if (!strcmp( ext, "l" )) /* lex file */
{ {
output( "%s.yy.c: %s\n", obj, source->filename ); output( "%s.yy.c: %s\n", obj, source->filename );
output( "\t$(FLEX) $(LEXFLAGS) -o$@ %s\n", source->filename ); output( "\t$(FLEX) $(LEXFLAGS) -o$@ %s\n", source->filename );
column += output( "%s.yy.o: %s.yy.c", obj, obj ); output( "%s.yy.o: %s.yy.c\n", obj, obj );
output( "\t$(CC) -c $(ALLCFLAGS) -o $@ %s.yy.c\n", obj );
column += output( "%s.yy.o:", obj );
} }
else if (!strcmp( ext, "rc" )) /* resource file */ else if (!strcmp( ext, "rc" )) /* resource file */
{ {
...@@ -1069,8 +1073,21 @@ static void output_sources(void) ...@@ -1069,8 +1073,21 @@ static void output_sources(void)
{ {
struct object_extension *ext; struct object_extension *ext;
LIST_FOR_EACH_ENTRY( ext, &object_extensions, struct object_extension, entry ) LIST_FOR_EACH_ENTRY( ext, &object_extensions, struct object_extension, entry )
{
if (strstr( ext->extension, "cross" ))
{
output( "%s.%s: %s\n", obj, ext->extension, source->filename );
output( "\t$(CROSSCC) -c $(ALLCROSSCFLAGS) -o $@ %s\n", source->filename );
}
else
{
output( "%s.%s: %s\n", obj, ext->extension, source->filename );
output( "\t$(CC) -c $(ALLCFLAGS) -o $@ %s\n", source->filename );
}
}
LIST_FOR_EACH_ENTRY( ext, &object_extensions, struct object_extension, entry )
column += output( "%s.%s ", obj, ext->extension ); column += output( "%s.%s ", obj, ext->extension );
column += output( ": %s", source->filename ); column += output( ":" );
} }
free( obj ); free( obj );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment