Removed install_libdir targets and centralized the symlinks creation

in the main dll makefile.
This commit is contained in:
Alexandre Julliard 2002-06-14 02:09:08 +00:00
parent d2d08f0c28
commit 1c40426e95
9 changed files with 46 additions and 31 deletions

View File

@ -72,14 +72,4 @@ install:: install_lib $(ALTNAMES:%=_install_/%$(DLLEXT))
uninstall::
$(RM) $(dlldir)/$(MODULE)$(DLLEXT) $(ALTNAMES:%=$(dlldir)/%$(DLLEXT))
# Extra install rules for dlls not yet properly separated
install_libdir:: install_lib
cd $(libdir) && $(RM) lib$(MODULE).$(LIBEXT) && if [ "$(dlldir)" = "$(libdir)/wine" ]; \
then $(LN_S) wine/$(MODULE)$(DLLEXT) lib$(MODULE).$(LIBEXT); \
else $(LN_S) $(dlldir)/$(MODULE)$(DLLEXT) lib$(MODULE).$(LIBEXT); fi
uninstall_libdir::
$(RM) $(libdir)/lib$(MODULE).$(LIBEXT)
# End of global dll rules

View File

@ -741,6 +741,8 @@ x11drv: user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.
# Special targets for dlls that we need to link to
LINKABLE_DLLS = ntdll.dll gdi32.dll user32.dll kernel32.dll
libntdll.dll.$(LIBEXT): ntdll
$(RM) $@ && $(LN_S) ntdll/ntdll.dll$(DLLEXT) $@
@ -753,14 +755,31 @@ libuser32.dll.$(LIBEXT): user
libkernel32.dll.$(LIBEXT): kernel
$(RM) $@ && $(LN_S) kernel/kernel32.dll$(DLLEXT) $@
uninstall-links: dummy
$(RM) $(LINKABLE_DLLS:%=$(libdir)/lib%.$(LIBEXT))
install-links: uninstall-links dummy
cd $(libdir) && if [ "$(dlldir)" = "$(libdir)/wine" ]; \
then \
$(LN_S) wine/ntdll.dll$(DLLEXT) libntdll.dll.$(LIBEXT); \
$(LN_S) wine/gdi32.dll$(DLLEXT) libgdi32.dll.$(LIBEXT); \
$(LN_S) wine/user32.dll$(DLLEXT) libuser32.dll.$(LIBEXT); \
$(LN_S) wine/kernel32.dll$(DLLEXT) libkernel32.dll.$(LIBEXT); \
else \
$(LN_S) $(dlldir)/ntdll.dll$(DLLEXT) libntdll.dll.$(LIBEXT); \
$(LN_S) $(dlldir)/gdi32.dll$(DLLEXT) libgdi32.dll.$(LIBEXT); \
$(LN_S) $(dlldir)/user32.dll$(DLLEXT) libuser32.dll.$(LIBEXT); \
$(LN_S) $(dlldir)/kernel32.dll$(DLLEXT) libkernel32.dll.$(LIBEXT); \
fi
# Misc rules
$(BUILDSUBDIRS:%=%/__checklink__): dummy
@cd `dirname $@` && $(MAKE) checklink
install:: $(BUILDSUBDIRS:%=%/__install__)
install:: $(BUILDSUBDIRS:%=%/__install__) install-links
uninstall:: $(BUILDSUBDIRS:%=%/__uninstall__)
uninstall:: $(BUILDSUBDIRS:%=%/__uninstall__) uninstall-links
-rmdir $(dlldir)
check test:: $(BUILDSUBDIRS:%=%/__test__)

View File

@ -87,7 +87,4 @@ version16.res: version16.rc
gdi.exe.spec.c: version16.res
install:: install_libdir
uninstall:: uninstall_libdir
### Dependencies:

View File

@ -62,7 +62,4 @@ version16.res: version16.rc
krnl386.exe.spec.c: version16.res
install:: install_libdir
uninstall:: uninstall_libdir
### Dependencies:

View File

@ -240,12 +240,33 @@ foreach my $mod (keys %imports)
}
print NEWMAKE "\n# Special targets for dlls that we need to link to\n\n";
printf NEWMAKE "LINKABLE_DLLS = %s\n\n", join( " ", keys %linkable_dlls );
foreach my $mod (keys %linkable_dlls)
{
printf NEWMAKE "lib%s.\$(LIBEXT): %s\n", $mod, $directories{$mod};
printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s/%s\$(DLLEXT) \$@\n\n", $directories{$mod}, $mod;
}
print NEWMAKE <<EOF;
uninstall-links: dummy
\$(RM) \$(LINKABLE_DLLS:%=\$(libdir)/lib%.\$(LIBEXT))
install-links: uninstall-links dummy
cd \$(libdir) && if [ "\$(dlldir)" = "\$(libdir)/wine" ]; \\
then \\
EOF
foreach my $mod (keys %linkable_dlls)
{
printf NEWMAKE "\t \$(LN_S) wine/%s\$(DLLEXT) lib%s.\$(LIBEXT); \\\n", $mod, $mod;
}
print NEWMAKE "\telse \\\n";
foreach my $mod (keys %linkable_dlls)
{
printf NEWMAKE "\t \$(LN_S) \$(dlldir)/%s\$(DLLEXT) lib%s.\$(LIBEXT); \\\n", $mod, $mod;
}
print NEWMAKE "\tfi\n\n";
################################################################
# makefile trailer
@ -255,9 +276,9 @@ print NEWMAKE <<EOF;
\$(BUILDSUBDIRS:%=%/__checklink__): dummy
\@cd `dirname \$\@` && \$(MAKE) checklink
install:: \$(BUILDSUBDIRS:%=%/__install__)
install:: \$(BUILDSUBDIRS:%=%/__install__) install-links
uninstall:: \$(BUILDSUBDIRS:%=%/__uninstall__)
uninstall:: \$(BUILDSUBDIRS:%=%/__uninstall__) uninstall-links
-rmdir \$(dlldir)
check test:: \$(BUILDSUBDIRS:%=%/__test__)

View File

@ -147,7 +147,4 @@ relay16.s: $(WINEBUILD)
relay32.s: $(WINEBUILD)
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -relay32
install:: install_libdir
uninstall:: uninstall_libdir
### Dependencies:

View File

@ -123,7 +123,4 @@ mouse.spec.c: resources/mouse.res
user.exe.spec.c: resources/version16.res
install:: install_libdir
uninstall:: uninstall_libdir
### Dependencies:

View File

@ -16,7 +16,4 @@ C_SRCS = \
@MAKE_DLL_RULES@
install:: install_libdir
uninstall:: uninstall_libdir
### Dependencies:

View File

@ -48,11 +48,11 @@ all: $(PROGRAMS)
wineclipsrv: wineclipsrv.c
$(CC) $(ALLCFLAGS) -o wineclipsrv $(SRCDIR)/wineclipsrv.c $(X_LIBS) $(XLIB) $(LIBS)
install:: $(PROGRAMS) install_libdir
install:: $(PROGRAMS)
$(MKINSTALLDIRS) $(bindir)
$(INSTALL_PROGRAM) wineclipsrv $(bindir)/wineclipsrv
uninstall:: uninstall_libdir
uninstall::
$(RM) $(bindir)/wineclipsrv
### Dependencies: