Commit c6ae9a3c authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Get rid of all the rules for building old style 16-bit files.

parent e7715126
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
# #
# Each individual makefile may define the following additional variables: # Each individual makefile may define the following additional variables:
# C_SRCS : C sources for the module # C_SRCS : C sources for the module
# C_SRCS16 : 16-bit C sources for the module
# RC_SRCS : resource source files # RC_SRCS : resource source files
# EXTRA_SRCS : extra source files for make depend # EXTRA_SRCS : extra source files for make depend
# EXTRA_OBJS : extra object files # EXTRA_OBJS : extra object files
...@@ -76,9 +75,7 @@ WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/to ...@@ -76,9 +75,7 @@ WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/to
RELPATH = $(TOOLSDIR)/tools/relpath$(TOOLSEXT) RELPATH = $(TOOLSDIR)/tools/relpath$(TOOLSEXT)
SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt$(TOOLSEXT) SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt$(TOOLSEXT)
RC = $(WRC) RC = $(WRC)
RC16 = $(WRC)
RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS) RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS)
RC16FLAGS = -O res16 $(RCFLAGS)
LDPATH = @LDPATH@ LDPATH = @LDPATH@
DLLDIR = $(TOPOBJDIR)/dlls DLLDIR = $(TOPOBJDIR)/dlls
LIBPORT = $(TOPOBJDIR)/libs/port/libwine_port.a LIBPORT = $(TOPOBJDIR)/libs/port/libwine_port.a
...@@ -223,7 +220,7 @@ winapi_check:: dummy ...@@ -223,7 +220,7 @@ winapi_check:: dummy
# Rules for dependencies # Rules for dependencies
DEPEND_SRCS = $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) \ DEPEND_SRCS = $(C_SRCS) $(RC_SRCS) $(MC_SRCS) \
$(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) \ $(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) \
$(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) \ $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) \
$(BISON_SRCS) $(LEX_SRCS) $(EXTRA_SRCS) $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_SRCS)
...@@ -321,7 +318,7 @@ $(MC_SRCS:.mc=.mc.rc): $(WMC) ...@@ -321,7 +318,7 @@ $(MC_SRCS:.mc=.mc.rc): $(WMC)
$(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb): $(WIDL) $(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb): $(WIDL)
$(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.mc.res) $(RC_SRCS16:.rc=.res): $(WRC) $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.mc.res): $(WRC)
$(SUBDIRS): dummy $(SUBDIRS): dummy
@cd $@ && $(MAKE) @cd $@ && $(MAKE)
......
...@@ -702,8 +702,6 @@ BISON ...@@ -702,8 +702,6 @@ BISON
FLEX FLEX
TOOLSDIR TOOLSDIR
WOW64_DISABLE WOW64_DISABLE
WIN16_INSTALL
WIN16_FILES
TARGETFLAGS TARGETFLAGS
CPPBIN CPPBIN
ac_ct_CXX ac_ct_CXX
...@@ -4101,14 +4099,8 @@ esac ...@@ -4101,14 +4099,8 @@ esac
enable_win16=${enable_win16:-no} enable_win16=${enable_win16:-no}
WIN16_FILES="\$(WIN16_FILES)"
WIN16_INSTALL="\$(WIN16_INSTALL)"
if test "x$enable_win16" != "xyes" if test "x$enable_win16" != "xyes"
then then
WIN16_FILES=""
WIN16_INSTALL=""
enable_w32skrnl=${enable_w32skrnl:-no} enable_w32skrnl=${enable_w32skrnl:-no}
enable_winedos=${enable_winedos:-no} enable_winedos=${enable_winedos:-no}
enable_winevdm=${enable_winevdm:-no} enable_winevdm=${enable_winevdm:-no}
......
...@@ -169,12 +169,8 @@ esac ...@@ -169,12 +169,8 @@ esac
dnl enable_win16 defaults to yes on x86, to no on other CPUs dnl enable_win16 defaults to yes on x86, to no on other CPUs
enable_win16=${enable_win16:-no} enable_win16=${enable_win16:-no}
AC_SUBST(WIN16_FILES,"\$(WIN16_FILES)")
AC_SUBST(WIN16_INSTALL,"\$(WIN16_INSTALL)")
if test "x$enable_win16" != "xyes" if test "x$enable_win16" != "xyes"
then then
WIN16_FILES=""
WIN16_INSTALL=""
enable_w32skrnl=${enable_w32skrnl:-no} enable_w32skrnl=${enable_w32skrnl:-no}
enable_winedos=${enable_winedos:-no} enable_winedos=${enable_winedos:-no}
enable_winevdm=${enable_winevdm:-no} enable_winevdm=${enable_winevdm:-no}
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# Each individual makefile should define the following variables: # Each individual makefile should define the following variables:
# MODULE : name of the main module being built # MODULE : name of the main module being built
# EXTRALIBS : extra libraries to link in (optional) # EXTRALIBS : extra libraries to link in (optional)
# SPEC_SRCS16 : interface definition files for 16-bit dlls (optional)
# #
# plus all variables required by the global Make.rules.in # plus all variables required by the global Make.rules.in
# #
...@@ -12,8 +11,6 @@ DLLFLAGS = @DLLFLAGS@ ...@@ -12,8 +11,6 @@ DLLFLAGS = @DLLFLAGS@
DEFS = -D__WINESRC__ $(EXTRADEFS) DEFS = -D__WINESRC__ $(EXTRADEFS)
BASEMODULE = $(MODULE:%.dll=%) BASEMODULE = $(MODULE:%.dll=%)
MAINSPEC = $(BASEMODULE).spec MAINSPEC = $(BASEMODULE).spec
WIN16_FILES = $(SPEC_SRCS16:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16)
ALL_OBJS = @WIN16_FILES@ $(OBJS)
ALL_LIBS = $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LIBS) ALL_LIBS = $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
IMPLIB_OBJS = $(IMPLIB_SRCS:.c=.o) IMPLIB_OBJS = $(IMPLIB_SRCS:.c=.o)
IMPLIBFLAGS = $(TARGETFLAGS) $(EXTRAIMPLIBFLAGS) IMPLIBFLAGS = $(TARGETFLAGS) $(EXTRAIMPLIBFLAGS)
...@@ -26,8 +23,8 @@ INSTALLDIRS = $(DESTDIR)$(dlldir) $(DESTDIR)$(fakedlldir) $(DESTDIR)$(datadir)/w ...@@ -26,8 +23,8 @@ INSTALLDIRS = $(DESTDIR)$(dlldir) $(DESTDIR)$(fakedlldir) $(DESTDIR)$(datadir)/w
all: $(MODULE)$(DLLEXT) $(MODULE)$(FAKEEXT) $(SUBDIRS) all: $(MODULE)$(DLLEXT) $(MODULE)$(FAKEEXT) $(SUBDIRS)
$(MODULE) $(MODULE).so $(MODULE).fake: $(MAINSPEC) $(ALL_OBJS) Makefile.in $(MODULE) $(MODULE).so $(MODULE).fake: $(MAINSPEC) $(OBJS) Makefile.in
$(WINEGCC) -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(EXTRADLLFLAGS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS) $(WINEGCC) -shared $(SRCDIR)/$(MAINSPEC) $(OBJS) $(EXTRADLLFLAGS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
# Rules for import libraries # Rules for import libraries
...@@ -59,16 +56,16 @@ crosstest:: $(SUBDIRS:%=%/__crosstest__) dummy ...@@ -59,16 +56,16 @@ crosstest:: $(SUBDIRS:%=%/__crosstest__) dummy
# Rules for auto documentation # Rules for auto documentation
man: $(C_SRCS) dummy man: $(C_SRCS) dummy
$(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -C$(SRCDIR) -S$(api_manext) $(INCLUDES) $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) $(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -C$(SRCDIR) -S$(api_manext) $(INCLUDES) $(MAINSPEC:%=-w %) $(C_SRCS)
doc-html: $(C_SRCS) dummy doc-html: $(C_SRCS) dummy
$(C2MAN) -o $(TOPOBJDIR)/documentation/html -R$(TOPOBJDIR) -C$(SRCDIR) $(INCLUDES) -Th $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) $(C2MAN) -o $(TOPOBJDIR)/documentation/html -R$(TOPOBJDIR) -C$(SRCDIR) $(INCLUDES) -Th $(MAINSPEC:%=-w %) $(C_SRCS)
doc-sgml: $(C_SRCS) dummy doc-sgml: $(C_SRCS) dummy
$(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide -R$(TOPOBJDIR) -C$(SRCDIR) $(INCLUDES) -Ts $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) $(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide -R$(TOPOBJDIR) -C$(SRCDIR) $(INCLUDES) -Ts $(MAINSPEC:%=-w %) $(C_SRCS)
doc-xml: $(C_SRCS) dummy doc-xml: $(C_SRCS) dummy
$(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide-xml -R$(TOPOBJDIR) -C$(SRCDIR) $(INCLUDES) -Tx $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) $(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide-xml -R$(TOPOBJDIR) -C$(SRCDIR) $(INCLUDES) -Tx $(MAINSPEC:%=-w %) $(C_SRCS)
.PHONY: man doc-html doc-sgml doc-xml .PHONY: man doc-html doc-sgml doc-xml
...@@ -111,6 +108,4 @@ uninstall:: ...@@ -111,6 +108,4 @@ uninstall::
clean:: clean::
$(RM) $(IMPORTLIBFILE) $(RM) $(IMPORTLIBFILE)
$(SPEC_DEF) $(SPEC_SRCS16:.spec=.spec.o): $(WINEBUILD)
# End of global dll rules # End of global dll rules
...@@ -15,18 +15,11 @@ BUILDSUBDIRS = $(DLLSUBDIRS) $(TESTSUBDIRS) ...@@ -15,18 +15,11 @@ BUILDSUBDIRS = $(DLLSUBDIRS) $(TESTSUBDIRS)
INSTALLSUBDIRS = $(DLLSUBDIRS) $(IMPLIBSUBDIRS) INSTALLSUBDIRS = $(DLLSUBDIRS) $(IMPLIBSUBDIRS)
DOCSUBDIRS = $(DLLSUBDIRS) DOCSUBDIRS = $(DLLSUBDIRS)
# 16-bit dlls
WIN16_FILES = \
@MAKE_RULES@ @MAKE_RULES@
# Main target # Main target
all: $(BUILDSUBDIRS) @WIN16_FILES@ all: $(BUILDSUBDIRS)
# Placeholders for 16-bit libraries
# Import libraries # Import libraries
...@@ -801,18 +794,8 @@ winecrt0/libwinecrt0.a: winecrt0 ...@@ -801,18 +794,8 @@ winecrt0/libwinecrt0.a: winecrt0
# Misc rules # Misc rules
.PHONY: $(WIN16_FILES:%=__install__/%)
WIN16_INSTALL = $(WIN16_FILES:%=__install__/%)
$(WIN16_FILES:%=__install__/%): $(WIN16_FILES) $(DESTDIR)$(dlldir) dummy
$(INSTALL_DATA) `basename $@` $(DESTDIR)$(dlldir)/`basename $@`
install install-lib:: @WIN16_INSTALL@
uninstall:: uninstall::
-cd $(DESTDIR)$(dlldir) && $(RM) $(WIN16_FILES)
-rmdir $(DESTDIR)$(fakedlldir) $(DESTDIR)$(dlldir) -rmdir $(DESTDIR)$(fakedlldir) $(DESTDIR)$(dlldir)
clean:: clean::
$(RM) $(IMPORT_SYMLINKS) $(WIN16_FILES) $(RM) $(IMPORT_SYMLINKS)
...@@ -283,7 +283,7 @@ sub parse_makefile($) ...@@ -283,7 +283,7 @@ sub parse_makefile($)
$make{$1} = $2; $make{$1} = $2;
next; next;
} }
if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_[CHIPS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|C_SRCS|MC_SRCS|RC_SRCS|SVG_SRCS|C_SRCS16|RC_SRCS16|SPEC_SRCS16|EXTRA_OBJS16|MANPAGES|PROGRAMS)\s*=\s*(.*)/) if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_[CHIPS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|C_SRCS|MC_SRCS|RC_SRCS|SVG_SRCS|MANPAGES|PROGRAMS)\s*=\s*(.*)/)
{ {
my @list = split(/\s+/, $2); my @list = split(/\s+/, $2);
$make{$1} = \@list; $make{$1} = \@list;
...@@ -369,8 +369,8 @@ sub update_makefiles(@) ...@@ -369,8 +369,8 @@ sub update_makefiles(@)
replace_makefile_variable( $file, "BISON_SRCS" ); replace_makefile_variable( $file, "BISON_SRCS" );
replace_makefile_variable( $file, "MC_SRCS" ); replace_makefile_variable( $file, "MC_SRCS" );
replace_makefile_variable( $file, "SVG_SRCS" ); replace_makefile_variable( $file, "SVG_SRCS" );
replace_makefile_variable( $file, "C_SRCS" ) unless defined $make{"C_SRCS16"}; replace_makefile_variable( $file, "C_SRCS" );
replace_makefile_variable( $file, "RC_SRCS" ) unless defined $make{"RC_SRCS16"}; replace_makefile_variable( $file, "RC_SRCS" );
} }
push @lines, "\ndnl Build dependencies for test files compiled into winetest\n"; push @lines, "\ndnl Build dependencies for test files compiled into winetest\n";
...@@ -448,51 +448,14 @@ sub update_dlls(@) ...@@ -448,51 +448,14 @@ sub update_dlls(@)
} }
$static_implibs{$module} = 1 if defined $makefile{"IMPLIB_SRCS"}; $static_implibs{$module} = 1 if defined $makefile{"IMPLIB_SRCS"};
if (defined $makefile{"SPEC_SRCS16"})
{
my @list = map { $_ =~ s/\.spec$//; $_ .= ".dll" unless $_ =~ /\./; $_; } @{$makefile{"SPEC_SRCS16"}};
$altnames{$module} = \@list;
}
if (defined $makefile{"EXTRA_OBJS16"})
{
foreach my $obj (@{$makefile{"EXTRA_OBJS16"}})
{
if ($obj =~ /^(.*\.(exe|mod))\.o/) { push @{$altnames{$module}}, $1; }
} }
}
}
# output the list of 16-bit files
my @targets16 = ();
foreach my $mod (sort keys %directories)
{
next unless defined $altnames{$mod};
foreach my $i (sort @{$altnames{$mod}})
{
push @targets16, $i . "16";
}
}
$text .= "# 16-bit dlls\n\n";
$text .= "WIN16_FILES = \\\n";
$text .= "\t" . join( " \\\n\t", sort @targets16 ) . "\n\n";
$text .= "\@MAKE_RULES\@\n\n"; $text .= "\@MAKE_RULES\@\n\n";
# output the all: target # output the all: target
$text .= "# Main target\n\n"; $text .= "# Main target\n\n";
$text .= "all: \$(BUILDSUBDIRS) \@WIN16_FILES\@\n\n"; $text .= "all: \$(BUILDSUBDIRS)\n\n";
# output the lib name -> directory rules
$text .= "# Placeholders for 16-bit libraries\n\n";
foreach my $mod (sort keys %directories)
{
next unless defined $altnames{$mod};
$text .= sprintf "%s:\n", join(" ", map { $_ . "16"; } sort @{$altnames{$mod}});
$text .= sprintf "\techo \"%s\" >\$\@\n\n", $mod;
}
# output the import libraries rules # output the import libraries rules
...@@ -526,10 +489,12 @@ sub update_dlls(@) ...@@ -526,10 +489,12 @@ sub update_dlls(@)
$text .= "\n\nCROSS_IMPLIBS ="; $text .= "\n\nCROSS_IMPLIBS =";
foreach my $mod (sort @lib_symlinks) foreach my $mod (sort @lib_symlinks)
{ {
next if $mod =~ /16$/;
$text .= sprintf " \\\n\tlib%s.a", $importlibs{$mod}; $text .= sprintf " \\\n\tlib%s.a", $importlibs{$mod};
} }
foreach my $mod (sort keys %importlibs) foreach my $mod (sort keys %importlibs)
{ {
next if $mod =~ /16$/;
next if defined $static_implibs{$mod}; next if defined $static_implibs{$mod};
$text .= " \\\n\t$directories{$mod}/lib$importlibs{$mod}.a"; $text .= " \\\n\t$directories{$mod}/lib$importlibs{$mod}.a";
} }
...@@ -583,7 +548,7 @@ sub update_dlls(@) ...@@ -583,7 +548,7 @@ sub update_dlls(@)
$text .= "\n# Misc rules\n"; $text .= "\n# Misc rules\n";
replace_in_file( "dlls/Makefile.in", replace_in_file( "dlls/Makefile.in",
'^# 16-bit dlls', '^\@MAKE_RULES\@',
'^# Misc rules', '^# Misc rules',
$text ); $text );
...@@ -593,12 +558,6 @@ sub update_dlls(@) ...@@ -593,12 +558,6 @@ sub update_dlls(@)
{ {
push @ignores, "dlls/lib$importlibs{$mod}.def"; push @ignores, "dlls/lib$importlibs{$mod}.def";
} }
foreach my $mod (sort keys %directories)
{
next unless defined $altnames{$mod};
push @ignores, map { "dlls/" . $_ . "16"; } @{$altnames{$mod}};
}
return @ignores; return @ignores;
} }
......
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