makefiles: Generate explicit build rules for C source files from makedep.
This commit is contained in:
parent
57f5e14196
commit
3571c06799
|
@ -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)
|
||||
|
||||
CROSSOBJS = $(OBJS:.o=.cross.o)
|
||||
ALLCROSSCFLAGS = $(INCLUDES) $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
# Implicit rules
|
||||
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
DLLFLAGS = @DLLFLAGS@
|
||||
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
|
||||
|
||||
VERSION = 1.0
|
||||
|
@ -103,23 +110,11 @@ EXTRA_OBJS = version.o
|
|||
|
||||
@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=`(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):
|
||||
@cd $(TOOLSDIR)/tools && $(MAKE) relpath$(TOOLSEXT)
|
||||
|
||||
|
|
|
@ -981,14 +981,18 @@ static void output_sources(void)
|
|||
else output( "%s.tab.c: %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 );
|
||||
}
|
||||
else if (!strcmp( ext, "l" )) /* lex file */
|
||||
{
|
||||
output( "%s.yy.c: %s\n", obj, 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 */
|
||||
{
|
||||
|
@ -1068,9 +1072,22 @@ static void output_sources(void)
|
|||
else
|
||||
{
|
||||
struct object_extension *ext;
|
||||
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", source->filename );
|
||||
column += output( ":" );
|
||||
}
|
||||
free( obj );
|
||||
|
||||
|
|
Loading…
Reference in New Issue