Improved make_dlls script. Moved dll list out of

Make.rules.in. Removed a few no longer used rules.
This commit is contained in:
Alexandre Julliard 2001-09-17 20:09:08 +00:00
parent e575ad292e
commit f33f7f0ed0
7 changed files with 948 additions and 908 deletions

View File

@ -29,7 +29,6 @@ OPTIONS = @OPTIONS@ -D_REENTRANT
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
XLIB = @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@
DLL_LINK = @DLL_LINK@
LIBS = @LIBS@
YACC = @YACC@
LEX = @LEX@
@ -94,86 +93,6 @@ OBJS = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(GEN_ASM_
LINTS = $(C_SRCS:.c=.ln)
# DLL list
X_DLLS = \
ddraw \
@OPENGL32_DLL@ \
@GLU32_DLL@ \
x11drv
DLLS = \
@X_DLLS@ \
advapi32 \
avifil32 \
comctl32 \
comdlg32 \
crtdll \
dciman32 \
dinput \
dplay \
dplayx \
dsound \
gdi32 \
icmp \
imagehlp \
imm32 \
joystick.drv \
kernel32 \
lz32 \
mapi32 \
mcianim.drv \
mciavi.drv \
mcicda.drv \
mciseq.drv \
mciwave.drv \
midimap.drv \
mpr \
msacm.drv \
msacm32 \
msimg32 \
msnet32 \
msvcrt \
msvfw32 \
odbc32 \
ole32 \
oleaut32 \
olecli32 \
oledlg \
olepro32 \
olesvr32 \
psapi \
quartz \
rasapi32 \
riched32 \
rpcrt4 \
serialui \
setupapi \
shdocvw \
shell32 \
shfolder \
shlwapi \
sti \
tapi32 \
ttydrv \
url \
urlmon \
user32 \
version \
w32skrnl \
winedos \
wineoss.drv \
wineps \
wininet \
winmm \
winnls32 \
winspool.drv \
wintrust \
wnaspi32 \
wow32 \
ws2_32 \
wsock32
# Implicit rules
.SUFFIXES: .mc .rc .mc.rc .res .spec .spec.c .glue.c

View File

@ -67,8 +67,6 @@ INSTALLSUBDIRS = \
EMUOBJS = \
miscemu/miscemu.o
DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) $(LIBSYMLINKS) wine
@echo "Wine build complete."
@ -81,7 +79,7 @@ Make.rules: Make.rules.in configure
@exit 1
wine: dlls $(EMUOBJS)
$(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS)
$(CC) -o wine $(EMUOBJS) -L$(DLLDIR) $(IMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS)
install:: all $(INSTALLSUBDIRS:%=%/__install__)
[ -d $(bindir) ] || $(MKDIR) $(bindir)
@ -92,7 +90,7 @@ install:: all $(INSTALLSUBDIRS:%=%/__install__)
uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
cd $(bindir) && $(RM) wine dosmod
$(EMUOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
$(EMUOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
@cd `dirname $@` && $(MAKE) `basename $@`
libwine.$(LIBEXT): library/libwine.$(LIBEXT)
@ -109,7 +107,7 @@ libwine_uuid.a: ole/libwine_uuid.a
# Dependencies between directories
$(DLLOBJS) $(PROGRAMS): tools
$(PROGRAMS): tools
$(EMUOBJS): tools dlls

562
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -133,18 +133,12 @@ AC_CHECK_HEADERS(jpeglib.h,
AC_SUBST(XLIB)
AC_SUBST(X_DLLS)
X_DLLS=""
AC_SUBST(XFILES)
XFILES=""
AC_SUBST(OPENGLFILES)
OPENGLFILES=""
AC_SUBST(OPENGL32_DLL)
OPENGL32_DLL=""
GLU32FILES=""
AC_SUBST(GLU32FILES)
GLU32_DLL=""
AC_SUBST(GLU32_DLL)
GLU32FILES=""
if test "$have_x" = "yes"
then
XLIB="-lXext -lX11"
@ -341,8 +335,6 @@ then
AC_DEFINE(HAVE_GLEXT_PROTOTYPES, 1,
[Define if the OpenGL headers define extension typedefs])
fi
OPENGL32_DLL=opengl32
fi
fi
@ -350,7 +342,6 @@ then
AC_CHECK_LIB(GLU,gluLookAt,
X_PRE_LIBS="$X_PRE_LIBS -lGLU"
GLU32FILES='$(GLU32FILES)'
GLU32_DLL=glu32
,,
$X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
)
@ -359,7 +350,6 @@ then
fi
CPPFLAGS="$ac_save_CPPFLAGS"
X_DLLS='$(X_DLLS)'
XFILES='$(XFILES)'
else
XLIB=""
@ -716,40 +706,12 @@ LDPATH=""
if test "$LIBEXT" = "so"; then
DLLFLAGS="-fPIC"
DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
LDPATH="LD_LIBRARY_PATH=\"\$(TOPOBJDIR)/unicode:\$\$LD_LIBRARY_PATH\""
elif test "$LIBEXT" = "dll"; then
#DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
LDPATH="PATH=\"\$(TOPOBJDIR)/unicode:\$\$PATH\""
else
DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) \$(LIBWINE) \$(LIBUNICODE) \$(X_LIBS) \$(XLIB)"
AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
ac_cv_c_whole_archive,
[saved_cflags=$CFLAGS
CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
CFLAGS=$saved_cflags
])
if test "$ac_cv_c_whole_archive" = "yes"
then
DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
else
AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
ac_cv_c_allextract,
[saved_cflags=$CFLAGS
CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
CFLAGS=$saved_cflags
])
if test "$ac_cv_c_allextract" = "yes"
then
DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
fi
fi
fi
AC_SUBST(DLL_LINK)
AC_SUBST(DLLFLAGS)
AC_SUBST(LDSHARED)
AC_SUBST(LDDLLFLAGS)

View File

@ -13,12 +13,11 @@ DEFS = @DLLFLAGS@ -D__WINE__ $(EXTRADEFS)
LIBEXT = @LIBEXT@
SONAME = lib$(MODULE).so
IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(LIBEXT))
ALLNAMES = lib$(MODULE).so $(ALTNAMES:%=lib%.so)
SPEC_SRCS = $(ALTNAMES:%=%.spec)
ALL_OBJS = $(MODULE).spec.o $(OBJS)
ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS)
all: lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT))
all: lib$(MODULE).$(LIBEXT)
@MAKE_RULES@
@ -27,17 +26,8 @@ all: lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT))
lib$(MODULE).so: $(ALL_OBJS) Makefile.in
$(LDSHARED) $(LDDLLFLAGS) $(ALL_OBJS) -o $@ -L$(DLLDIR) $(IMPORTS:%=-l%) $(ALL_LIBS)
$(ALTNAMES:%=lib%.$(LIBEXT)): lib$(MODULE).$(LIBEXT)
$(RM) $@ && $(LN_S) lib$(MODULE).$(LIBEXT) $@
# Rules for .a files
lib$(MODULE).a: $(ALL_OBJS) Makefile.in
$(RM) $@
$(AR) $@ $(ALL_OBJS)
$(RANLIB) $@
# Rules for .dll files
lib$(MODULE).dll: $(ALL_OBJS) Makefile.in
$(DLLWRAP) $(DLLWRAPFLAGS) --implib lib$(MODULE).a -o lib$(MODULE).dll $(ALL_OBJS) -L$(DLLDIR) $(IMPORTS:%=-l%) $(ALL_LIBS)
@ -59,20 +49,18 @@ Makedll.rules: $(TOPSRCDIR)/Makedll.rules.in $(TOPSRCDIR)/configure
# Rules for installation
.PHONY: install_so install_a
.PHONY: install_lib $(ALTNAMES:%=_install_/lib%.$(LIBEXT))
$(ALTNAMES:%=_install_/lib%.$(LIBEXT)): $(LIBEXT:%=install_%)
$(ALTNAMES:%=_install_/lib%.$(LIBEXT)): install_lib
cd $(libdir) && $(RM) `basename $@` && $(LN_S) lib$(MODULE).$(LIBEXT) `basename $@`
install_so: lib$(MODULE).so
install_lib: lib$(MODULE).$(LIBEXT)
[ -d $(libdir) ] || $(MKDIR) $(libdir)
$(INSTALL_PROGRAM) lib$(MODULE).so $(libdir)/lib$(MODULE).so
$(INSTALL_PROGRAM) lib$(MODULE).$(LIBEXT) $(libdir)/lib$(MODULE).$(LIBEXT)
install_a: lib$(MODULE).a
[ -d $(libdir) ] || $(MKDIR) $(libdir)
$(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
install:: $(LIBEXT:%=install_%) $(ALTNAMES:%=_install_/lib%.$(LIBEXT))
install:: install_lib $(ALTNAMES:%=_install_/lib%.$(LIBEXT))
uninstall::
cd $(libdir) && $(RM) lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT))
# End of global dll rules

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/perl -w
#
# Update the dll dependencies in the dlls main Makefile.in.
# Must be run in the dlls/ directory of the Wine tree.
@ -12,6 +12,15 @@ $makefiles = `find . -name Makefile.in -print`;
%directories = ();
%altnames = ();
# list of special dlls that can be switched on or off by configure
%special_dlls =
(
"ddraw" => "XFILES",
"glu32" => "GLU32FILES",
"opengl32" => "OPENGLFILES",
"x11drv" => "XFILES"
);
foreach $i (split(/\s/,$makefiles))
{
open MAKE,$i;
@ -55,91 +64,153 @@ foreach $mod (sort keys %directories)
}
}
open OLDMAKE,"Makefile.in" or die "cannot open Makefile.in";
open NEWMAKE,">Makefile.in.new" or die "cannot create Makefile.in.new";
while (<OLDMAKE>)
{
last if (/^EXTRADLLNAMES/);
print NEWMAKE $_;
}
close OLDMAKE;
################################################################
# makefile header
printf NEWMAKE "EXTRADLLNAMES =";
foreach $extra (values %altnames) { push @extra, @$extra; }
foreach $extra (sort @extra)
{
printf NEWMAKE " \\\n\t%s", $extra;
}
print NEWMAKE <<EOF;
# Automatically generated by make_dlls; DO NOT EDIT!!
printf NEWMAKE "\n\nSUBDIRS =";
TOPSRCDIR = \@top_srcdir\@
TOPOBJDIR = ..
SRCDIR = \@srcdir\@
VPATH = \@srcdir\@
LIBEXT = \@LIBEXT\@
EOF
################################################################
# output special dlls configure definitions
printf NEWMAKE "# special configure-dependent targets\n\n";
my %specials = ();
foreach $mod (sort keys %special_dlls)
{
$specials{$special_dlls{$mod}} .= " " . $mod;
}
foreach $i (sort keys %specials)
{
printf NEWMAKE "%s =%s\n", $i, $specials{$i};
}
printf NEWMAKE "EXTRADIRS =";
foreach $i (sort keys %specials) { printf NEWMAKE " \@%s\@", $i; }
printf NEWMAKE "\n\n";
################################################################
# output the subdirs list
print NEWMAKE <<EOF;
# Subdir list
SUBDIRS = \\
EOF
printf NEWMAKE "\t\$(EXTRADIRS)";
foreach $dir (sort values %directories)
{
next if defined($special_dlls{$dir}); # skip special dlls
printf NEWMAKE " \\\n\t%s", $dir;
}
printf NEWMAKE "\n";
################################################################
# output the all: target
my %targets = (); # use a hash to get rid of duplicate target names
foreach $mod (sort keys %directories)
{
next if defined($special_dlls{$mod}); # skip special dlls
$targets{sprintf("lib%s.\$(LIBEXT)",$mod)} = 1;
next unless defined $altnames{$mod};
foreach $i (sort @{$altnames{$mod}})
{
$targets{sprintf("lib%s.\$(LIBEXT)",$i)} = 1;
}
}
print NEWMAKE <<EOF;
# Main target
all: \\
\$(EXTRADIRS:%=lib%.\$(LIBEXT)) \\
EOF
printf NEWMAKE "\t%s\n", join( " \\\n\t", sort keys %targets );
################################################################
# output the lib name -> directory rules
print NEWMAKE <<EOF;
\@MAKE_RULES\@
all: \$(DLLS:%=lib%.\@LIBEXT\@) \$(EXTRADLLNAMES:%=lib%.\@LIBEXT\@)
# Map library name to directory
EOF
foreach $mod (sort keys %directories)
{
my $count = 0;
printf NEWMAKE "lib%s.\@LIBEXT\@", $mod;
printf NEWMAKE "lib%s.\$(LIBEXT)", $mod;
if (defined $altnames{$mod})
{
my $count = 1;
foreach $i (sort @{$altnames{$mod}})
{
if ($count++ >= 3)
{
$count = 0;
printf NEWMAKE " \\\n ";
if (!($count++ % 3)) { printf NEWMAKE " \\\n "; }
printf NEWMAKE " lib%s.\$(LIBEXT)", $i;
}
printf NEWMAKE " lib%s.\@LIBEXT\@", $i;
}
printf NEWMAKE ": %s/lib%s.\@LIBEXT\@\n", $directories{$mod}, $mod;
printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s/lib%s.\@LIBEXT\@ \$@\n\n", $directories{$mod}, $mod;
printf NEWMAKE ": %s/lib%s.\$(LIBEXT)\n", $directories{$mod}, $mod;
printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s/lib%s.\$(LIBEXT) \$@\n\n", $directories{$mod}, $mod;
}
print NEWMAKE "# Inter-dll dependencies (only necessary for dynamic libs)\n\n";
################################################################
# output the inter-dll dependencies and rules
print NEWMAKE "# Inter-dll dependencies\n\n";
my @depends = ();
foreach $mod (sort keys %imports)
{
next unless $#{$imports{$mod}} >= 0;
my $dep = sprintf("%s/lib%s.\@LIBEXT\@:", $directories{$mod}, $mod);
my $count = 1;
my $dep = sprintf("%s/lib%s.\$(LIBEXT): dummy", $directories{$mod}, $mod);
foreach $i (@{$imports{$mod}})
{
$dep .= sprintf(" lib%s.\@LIBEXT\@", $i);
if ($count++ >= 3)
{
$count = 0;
$dep .= " \\\n ";
}
push @depends, $dep . "\n";
$dep .= sprintf(" lib%s.\$(LIBEXT)", $i);
}
$dep .= sprintf("\n\t\@cd %s && \$(MAKE) lib%s.\$(LIBEXT)\n\n",$directories{$mod}, $mod);
push @depends, $dep;
}
print NEWMAKE sort @depends;
################################################################
# makefile trailer
print NEWMAKE <<EOF;
# Misc rules
\$(DLLFILES): dummy
\@cd `dirname \$\@` && \$(MAKE)
\$(DLLFILES:%=%_install_): dummy
\@cd `dirname \$\@` && \$(MAKE) install
\$(DLLFILES:%=%_uninstall_): dummy
\@cd `dirname \$\@` && \$(MAKE) uninstall
\$(DLLFILES:%=%_checklink_): dummy
\$(SUBDIRS:%=%/__checklink__): dummy
\@cd `dirname \$\@` && \$(MAKE) checklink
install:: \$(DLLFILES:%=%_install_)
\$(SUBDIRS:%=%/__debug_channels__): dummy
\@cd `dirname \$\@` && \$(MAKE) debug_channels
uninstall:: \$(DLLFILES:%=%_uninstall_)
install:: \$(SUBDIRS:%=%/__install__)
checklink:: \$(DLLFILES:%=%_checklink_)
uninstall:: \$(SUBDIRS:%=%/__uninstall__)
checklink:: \$(SUBDIRS:%=%/__checklink__)
debug_channels:: \$(SUBDIRS:%=%/__debug_channels__)
EOF
close NEWMAKE;