makedep: Expand compilation flags into the generated rules.
This commit is contained in:
parent
d9b9faa18a
commit
d19b68fa1a
|
@ -11,15 +11,9 @@
|
||||||
|
|
||||||
# First some useful definitions
|
# First some useful definitions
|
||||||
|
|
||||||
ALLCFLAGS = $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS)
|
|
||||||
IDLFLAGS = $(EXTRAIDLFLAGS)
|
|
||||||
RCFLAGS = --nostdinc $(PORCFLAGS)
|
|
||||||
|
|
||||||
OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(OBJC_SRCS:.m=.o) \
|
OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(OBJC_SRCS:.m=.o) \
|
||||||
$(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.res) $(EXTRA_OBJS)
|
$(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.res) $(EXTRA_OBJS)
|
||||||
|
|
||||||
ALLCROSSCFLAGS = $(CPPFLAGS) $(CFLAGS)
|
|
||||||
|
|
||||||
# Rules for cleaning
|
# Rules for cleaning
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
|
|
|
@ -1462,7 +1462,7 @@ static struct strarray output_sources(void)
|
||||||
{
|
{
|
||||||
output( "%s.tab.h: %s\n", obj, source->filename );
|
output( "%s.tab.h: %s\n", obj, source->filename );
|
||||||
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
|
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
|
||||||
output( "\t$(BISON) $(BISONFLAGS) -p %s_ -o %s.tab.c -d %s\n",
|
output( "\t$(BISON) -p %s_ -o %s.tab.c -d %s\n",
|
||||||
obj, obj, source->filename );
|
obj, obj, source->filename );
|
||||||
output( "%s.tab.c: %s %s\n", obj, source->filename, header );
|
output( "%s.tab.c: %s %s\n", obj, source->filename, header );
|
||||||
strarray_add( &clean_files, strmake( "%s.tab.h", obj ));
|
strarray_add( &clean_files, strmake( "%s.tab.h", obj ));
|
||||||
|
@ -1470,7 +1470,7 @@ static struct strarray output_sources(void)
|
||||||
else output( "%s.tab.c: %s\n", obj, source->filename );
|
else output( "%s.tab.c: %s\n", obj, source->filename );
|
||||||
|
|
||||||
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
|
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
|
||||||
output( "\t$(BISON) $(BISONFLAGS) -p %s_ -o $@ %s\n", obj, source->filename );
|
output( "\t$(BISON) -p %s_ -o $@ %s\n", obj, source->filename );
|
||||||
free( header );
|
free( header );
|
||||||
continue; /* no dependencies */
|
continue; /* no dependencies */
|
||||||
}
|
}
|
||||||
|
@ -1486,7 +1486,7 @@ static struct strarray output_sources(void)
|
||||||
{
|
{
|
||||||
output( "%s.yy.c: %s\n", obj, source->filename );
|
output( "%s.yy.c: %s\n", obj, source->filename );
|
||||||
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
|
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
|
||||||
output( "\t$(FLEX) $(LEXFLAGS) -o$@ %s\n", source->filename );
|
output( "\t$(FLEX) -o$@ %s\n", source->filename );
|
||||||
continue; /* no dependencies */
|
continue; /* no dependencies */
|
||||||
}
|
}
|
||||||
else if (!strcmp( ext, "rc" )) /* resource file */
|
else if (!strcmp( ext, "rc" )) /* resource file */
|
||||||
|
@ -1498,10 +1498,11 @@ static struct strarray output_sources(void)
|
||||||
output( "\t%s -o $@ %s", tools_path( "wrc" ), source->filename );
|
output( "\t%s -o $@ %s", tools_path( "wrc" ), source->filename );
|
||||||
if (is_win16) output_filename( "-m16" );
|
if (is_win16) output_filename( "-m16" );
|
||||||
else output_filenames( targetflags );
|
else output_filenames( targetflags );
|
||||||
|
output_filename( "--nostdinc" );
|
||||||
output_filenames( includes );
|
output_filenames( includes );
|
||||||
output_filenames( define_args );
|
output_filenames( define_args );
|
||||||
output_filenames( extradefs );
|
output_filenames( extradefs );
|
||||||
output_filename( "$(RCFLAGS)" );
|
output_filename( "$(PORCFLAGS)" );
|
||||||
output( "\n" );
|
output( "\n" );
|
||||||
output( "%s.res rsrc.pot:", obj );
|
output( "%s.res rsrc.pot:", obj );
|
||||||
strarray_add( &po_files, source->filename );
|
strarray_add( &po_files, source->filename );
|
||||||
|
@ -1513,10 +1514,11 @@ static struct strarray output_sources(void)
|
||||||
output( "\t%s -o $@ %s", tools_path( "wrc" ), source->filename );
|
output( "\t%s -o $@ %s", tools_path( "wrc" ), source->filename );
|
||||||
if (is_win16) output_filename( "-m16" );
|
if (is_win16) output_filename( "-m16" );
|
||||||
else output_filenames( targetflags );
|
else output_filenames( targetflags );
|
||||||
|
output_filename( "--nostdinc" );
|
||||||
output_filenames( includes );
|
output_filenames( includes );
|
||||||
output_filenames( define_args );
|
output_filenames( define_args );
|
||||||
output_filenames( extradefs );
|
output_filenames( extradefs );
|
||||||
output_filename( "$(RCFLAGS)" );
|
output_filename( "$(PORCFLAGS)" );
|
||||||
output( "\n" );
|
output( "\n" );
|
||||||
output( "%s.res:", obj );
|
output( "%s.res:", obj );
|
||||||
}
|
}
|
||||||
|
@ -1556,7 +1558,7 @@ static struct strarray output_sources(void)
|
||||||
output_filenames( includes );
|
output_filenames( includes );
|
||||||
output_filenames( define_args );
|
output_filenames( define_args );
|
||||||
output_filenames( extradefs );
|
output_filenames( extradefs );
|
||||||
output_filename( "$(IDLFLAGS)" );
|
output_filenames( get_expanded_make_var_array( "EXTRAIDLFLAGS" ));
|
||||||
output( "\n" );
|
output( "\n" );
|
||||||
output_filenames( targets );
|
output_filenames( targets );
|
||||||
output( ": %s", source->filename );
|
output( ": %s", source->filename );
|
||||||
|
@ -1637,7 +1639,9 @@ static struct strarray output_sources(void)
|
||||||
output_filenames( define_args );
|
output_filenames( define_args );
|
||||||
output_filenames( extradefs );
|
output_filenames( extradefs );
|
||||||
if (module || staticlib || testdll) output_filenames( dllflags );
|
if (module || staticlib || testdll) output_filenames( dllflags );
|
||||||
output_filename( "$(ALLCFLAGS)" );
|
output_filenames( get_expanded_make_var_array( "EXTRACFLAGS" ));
|
||||||
|
output_filenames( get_expanded_make_var_array( "CPPFLAGS" ));
|
||||||
|
output_filename( "$(CFLAGS)" );
|
||||||
output( "\n" );
|
output( "\n" );
|
||||||
if (crosstarget && need_cross)
|
if (crosstarget && need_cross)
|
||||||
{
|
{
|
||||||
|
@ -1649,7 +1653,8 @@ static struct strarray output_sources(void)
|
||||||
output_filenames( define_args );
|
output_filenames( define_args );
|
||||||
output_filenames( extradefs );
|
output_filenames( extradefs );
|
||||||
output_filename( "-DWINE_CROSSTEST" );
|
output_filename( "-DWINE_CROSSTEST" );
|
||||||
output_filename( "$(ALLCROSSCFLAGS)" );
|
output_filenames( get_expanded_make_var_array( "CPPFLAGS" ));
|
||||||
|
output_filename( "$(CFLAGS)" );
|
||||||
output( "\n" );
|
output( "\n" );
|
||||||
}
|
}
|
||||||
if (testdll && !strcmp( ext, "c" ) && !(source->flags & FLAG_GENERATED))
|
if (testdll && !strcmp( ext, "c" ) && !(source->flags & FLAG_GENERATED))
|
||||||
|
@ -1680,12 +1685,12 @@ static struct strarray output_sources(void)
|
||||||
output_filenames( po_files );
|
output_filenames( po_files );
|
||||||
output( "\n" );
|
output( "\n" );
|
||||||
output( "\t%s -O pot -o $@", tools_path( "wrc" ));
|
output( "\t%s -O pot -o $@", tools_path( "wrc" ));
|
||||||
|
output_filenames( po_files );
|
||||||
if (is_win16) output_filename( "-m16" );
|
if (is_win16) output_filename( "-m16" );
|
||||||
else output_filenames( targetflags );
|
else output_filenames( targetflags );
|
||||||
|
output_filename( "--nostdinc" );
|
||||||
output_filenames( includes );
|
output_filenames( includes );
|
||||||
output_filenames( define_args );
|
output_filenames( define_args );
|
||||||
output_filename( "$(RCFLAGS)" );
|
|
||||||
output_filenames( po_files );
|
|
||||||
output( "\n" );
|
output( "\n" );
|
||||||
strarray_add( &clean_files, "rsrc.pot" );
|
strarray_add( &clean_files, "rsrc.pot" );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue