Commit 82a2b186 authored by Alexandre Julliard's avatar Alexandre Julliard

Added support for creating extra symlinks for .so files that contain

multiple dlls.
parent d0edc5fe
......@@ -3,6 +3,7 @@
# Each individual makefile should define the following variables:
# MODULE : name of the main module being built
# SOVERSION : version of the .so file
# ALTNAMES : alternate names for this dll (optional)
# IMPORTS : dlls to import (optional)
#
# plus all variables required by the global Make.rules.in
......@@ -13,22 +14,30 @@ LIBEXT = @LIBEXT@
LDSHARED = @LDSHARED@
SONAME = lib$(MODULE).so
IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(LIBEXT))
ALLNAMES = lib$(MODULE).so $(ALTNAMES:%=lib%.so)
all: lib$(MODULE).$(LIBEXT)
all: lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT))
@MAKE_RULES@
# Rules for .so files
lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
$(LDSHARED) $(OBJS) -o $@
lib$(MODULE).so: lib$(MODULE).so.$(SOVERSION)
$(ALLNAMES): lib$(MODULE).so.$(SOVERSION)
$(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
# Rules for .a files
lib$(MODULE).a: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
$(RM) $@
$(AR) $@ $(OBJS)
$(RANLIB) $@
$(ALTNAMES:%=lib%.a): lib$(MODULE).a
$(RM) $@ && $(LN_S) lib$(MODULE).a $@
# Rules for checking that no imports are missing
IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(LIBEXT))
......@@ -46,7 +55,7 @@ $(IMPORTLIBS): dummy
install_so: lib$(MODULE).so.$(SOVERSION)
[ -d $(libdir) ] || $(MKDIR) $(libdir)
$(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION) $(libdir)/lib$(MODULE).so.$(SOVERSION)
cd $(libdir) && $(RM) lib$(MODULE).so && $(LN_S) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).so
cd $(libdir) && for i in $(ALLNAMES); do $(RM) $$i && $(LN_S) lib$(MODULE).so.$(SOVERSION) $$i; done
install_a: lib$(MODULE).a
[ -d $(libdir) ] || $(MKDIR) $(libdir)
......@@ -55,7 +64,7 @@ install_a: lib$(MODULE).a
install:: $(LIBEXT:%=install_%)
uninstall::
cd $(libdir) && $(RM) lib$(MODULE).so lib$(MODULE).so.$(SOVERSION) lib$(MODULE).a
cd $(libdir) && $(RM) $(ALLNAMES) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).a
clean::
$(RM) lib$(MODULE).so.$(SOVERSION)
......@@ -51,197 +51,172 @@ DLLFILES = \
winspool/libwinspool.@LIBEXT@ \
wnaspi32/libwnaspi32.@LIBEXT@
all: dlls
# extra names for dlls containing multiple spec files
EXTRADLLNAMES = \
avifile \
commdlg \
compobj \
dplay \
lzexpand \
mmsystem \
msvideo \
ole2 \
ole2disp \
olecli \
olesvr \
rasapi16 \
shell \
shlwapi \
storage \
typelib \
ver \
w32sys \
win32s16 \
winsock
@MAKE_RULES@
dlls: $(DLLS:%=lib%.@LIBEXT@)
all: $(DLLS:%=lib%.@LIBEXT@) $(EXTRADLLNAMES:%=lib%.@LIBEXT@)
# Map library name to directory
libavifil32.@LIBEXT@: avifil32/libavifil32.@LIBEXT@
$(RM) $@
$(LN_S) avifil32/libavifil32.@LIBEXT@ $@
libavifil32.@LIBEXT@ libavifile.@LIBEXT@: avifil32/libavifil32.@LIBEXT@
$(RM) $@ && $(LN_S) avifil32/libavifil32.@LIBEXT@ $@
libcomctl32.@LIBEXT@: comctl32/libcomctl32.@LIBEXT@
$(RM) $@
$(LN_S) comctl32/libcomctl32.@LIBEXT@ $@
$(RM) $@ && $(LN_S) comctl32/libcomctl32.@LIBEXT@ $@
libcomdlg32.@LIBEXT@: commdlg/libcomdlg32.@LIBEXT@
$(RM) $@
$(LN_S) commdlg/libcomdlg32.@LIBEXT@ $@
libcomdlg32.@LIBEXT@ libcommdlg.@LIBEXT@: commdlg/libcomdlg32.@LIBEXT@
$(RM) $@ && $(LN_S) commdlg/libcomdlg32.@LIBEXT@ $@
libdciman32.@LIBEXT@: dciman32/libdciman32.@LIBEXT@
$(RM) $@
$(LN_S) dciman32/libdciman32.@LIBEXT@ $@
$(RM) $@ && $(LN_S) dciman32/libdciman32.@LIBEXT@ $@
libdplayx.@LIBEXT@: dplayx/libdplayx.@LIBEXT@
$(RM) $@
$(LN_S) dplayx/libdplayx.@LIBEXT@ $@
libdplayx.@LIBEXT@ libdplay.@LIBEXT@: dplayx/libdplayx.@LIBEXT@
$(RM) $@ && $(LN_S) dplayx/libdplayx.@LIBEXT@ $@
libdsound.@LIBEXT@: dsound/libdsound.@LIBEXT@
$(RM) $@
$(LN_S) dsound/libdsound.@LIBEXT@ $@
$(RM) $@ && $(LN_S) dsound/libdsound.@LIBEXT@ $@
libicmp.@LIBEXT@: icmp/libicmp.@LIBEXT@
$(RM) $@
$(LN_S) icmp/libicmp.@LIBEXT@ $@
$(RM) $@ && $(LN_S) icmp/libicmp.@LIBEXT@ $@
libimagehlp.@LIBEXT@: imagehlp/libimagehlp.@LIBEXT@
$(RM) $@
$(LN_S) imagehlp/libimagehlp.@LIBEXT@ $@
$(RM) $@ && $(LN_S) imagehlp/libimagehlp.@LIBEXT@ $@
libimm32.@LIBEXT@: imm32/libimm32.@LIBEXT@
$(RM) $@
$(LN_S) imm32/libimm32.@LIBEXT@ $@
$(RM) $@ && $(LN_S) imm32/libimm32.@LIBEXT@ $@
libjoystick.drv.@LIBEXT@: winmm/joystick/libjoystick.drv.@LIBEXT@
$(RM) $@
$(LN_S) winmm/joystick/libjoystick.drv.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winmm/joystick/libjoystick.drv.@LIBEXT@ $@
liblz32.@LIBEXT@: lzexpand/liblz32.@LIBEXT@
$(RM) $@
$(LN_S) lzexpand/liblz32.@LIBEXT@ $@
liblz32.@LIBEXT@ liblzexpand.@LIBEXT@: lzexpand/liblz32.@LIBEXT@
$(RM) $@ && $(LN_S) lzexpand/liblz32.@LIBEXT@ $@
libmcianim.drv.@LIBEXT@: winmm/mcianim/libmcianim.drv.@LIBEXT@
$(RM) $@
$(LN_S) winmm/mcianim/libmcianim.drv.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winmm/mcianim/libmcianim.drv.@LIBEXT@ $@
libmciavi.drv.@LIBEXT@: winmm/mciavi/libmciavi.drv.@LIBEXT@
$(RM) $@
$(LN_S) winmm/mciavi/libmciavi.drv.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winmm/mciavi/libmciavi.drv.@LIBEXT@ $@
libmcicda.drv.@LIBEXT@: winmm/mcicda/libmcicda.drv.@LIBEXT@
$(RM) $@
$(LN_S) winmm/mcicda/libmcicda.drv.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winmm/mcicda/libmcicda.drv.@LIBEXT@ $@
libmciseq.drv.@LIBEXT@: winmm/mciseq/libmciseq.drv.@LIBEXT@
$(RM) $@
$(LN_S) winmm/mciseq/libmciseq.drv.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winmm/mciseq/libmciseq.drv.@LIBEXT@ $@
libmciwave.drv.@LIBEXT@: winmm/mciwave/libmciwave.drv.@LIBEXT@
$(RM) $@
$(LN_S) winmm/mciwave/libmciwave.drv.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winmm/mciwave/libmciwave.drv.@LIBEXT@ $@
libmidimap.drv.@LIBEXT@: winmm/midimap/libmidimap.drv.@LIBEXT@
$(RM) $@
$(LN_S) winmm/midimap/libmidimap.drv.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winmm/midimap/libmidimap.drv.@LIBEXT@ $@
libmsacm.@LIBEXT@: msacm/libmsacm.@LIBEXT@
$(RM) $@
$(LN_S) msacm/libmsacm.@LIBEXT@ $@
$(RM) $@ && $(LN_S) msacm/libmsacm.@LIBEXT@ $@
libmsacm.drv.@LIBEXT@: winmm/wavemap/libmsacm.drv.@LIBEXT@
$(RM) $@
$(LN_S) winmm/wavemap/libmsacm.drv.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winmm/wavemap/libmsacm.drv.@LIBEXT@ $@
libmsacm32.@LIBEXT@: msacm32/libmsacm32.@LIBEXT@
$(RM) $@
$(LN_S) msacm32/libmsacm32.@LIBEXT@ $@
$(RM) $@ && $(LN_S) msacm32/libmsacm32.@LIBEXT@ $@
libmsnet32.@LIBEXT@: msnet32/libmsnet32.@LIBEXT@
$(RM) $@
$(LN_S) msnet32/libmsnet32.@LIBEXT@ $@
$(RM) $@ && $(LN_S) msnet32/libmsnet32.@LIBEXT@ $@
libmsvfw32.@LIBEXT@: msvideo/libmsvfw32.@LIBEXT@
$(RM) $@
$(LN_S) msvideo/libmsvfw32.@LIBEXT@ $@
libmsvfw32.@LIBEXT@ libmsvideo.@LIBEXT@: msvideo/libmsvfw32.@LIBEXT@
$(RM) $@ && $(LN_S) msvideo/libmsvfw32.@LIBEXT@ $@
libodbc32.@LIBEXT@: odbc32/libodbc32.@LIBEXT@
$(RM) $@
$(LN_S) odbc32/libodbc32.@LIBEXT@ $@
$(RM) $@ && $(LN_S) odbc32/libodbc32.@LIBEXT@ $@
libole32.@LIBEXT@: ole32/libole32.@LIBEXT@
$(RM) $@
$(LN_S) ole32/libole32.@LIBEXT@ $@
libole32.@LIBEXT@ libole2.@LIBEXT@ libstorage.@LIBEXT@ libcompobj.@LIBEXT@: ole32/libole32.@LIBEXT@
$(RM) $@ && $(LN_S) ole32/libole32.@LIBEXT@ $@
liboleaut32.@LIBEXT@: oleaut32/liboleaut32.@LIBEXT@
$(RM) $@
$(LN_S) oleaut32/liboleaut32.@LIBEXT@ $@
liboleaut32.@LIBEXT@ libole2disp.@LIBEXT@ libtypelib.@LIBEXT@: oleaut32/liboleaut32.@LIBEXT@
$(RM) $@ && $(LN_S) oleaut32/liboleaut32.@LIBEXT@ $@
libolecli32.@LIBEXT@: olecli/libolecli32.@LIBEXT@
$(RM) $@
$(LN_S) olecli/libolecli32.@LIBEXT@ $@
libolecli32.@LIBEXT@ libolecli.@LIBEXT@: olecli/libolecli32.@LIBEXT@
$(RM) $@ && $(LN_S) olecli/libolecli32.@LIBEXT@ $@
liboledlg.@LIBEXT@: oledlg/liboledlg.@LIBEXT@
$(RM) $@
$(LN_S) oledlg/liboledlg.@LIBEXT@ $@
$(RM) $@ && $(LN_S) oledlg/liboledlg.@LIBEXT@ $@
libolepro32.@LIBEXT@: olepro32/libolepro32.@LIBEXT@
$(RM) $@
$(LN_S) olepro32/libolepro32.@LIBEXT@ $@
$(RM) $@ && $(LN_S) olepro32/libolepro32.@LIBEXT@ $@
libolesvr32.@LIBEXT@: olesvr/libolesvr32.@LIBEXT@
$(RM) $@
$(LN_S) olesvr/libolesvr32.@LIBEXT@ $@
libolesvr32.@LIBEXT@ libolesvr.@LIBEXT@: olesvr/libolesvr32.@LIBEXT@
$(RM) $@ && $(LN_S) olesvr/libolesvr32.@LIBEXT@ $@
libpsapi.@LIBEXT@: psapi/libpsapi.@LIBEXT@
$(RM) $@
$(LN_S) psapi/libpsapi.@LIBEXT@ $@
$(RM) $@ && $(LN_S) psapi/libpsapi.@LIBEXT@ $@
librasapi32.@LIBEXT@: rasapi32/librasapi32.@LIBEXT@
$(RM) $@
$(LN_S) rasapi32/librasapi32.@LIBEXT@ $@
librasapi32.@LIBEXT@ librasapi16.@LIBEXT@: rasapi32/librasapi32.@LIBEXT@
$(RM) $@ && $(LN_S) rasapi32/librasapi32.@LIBEXT@ $@
libsetupx.@LIBEXT@: setupx/libsetupx.@LIBEXT@
$(RM) $@
$(LN_S) setupx/libsetupx.@LIBEXT@ $@
$(RM) $@ && $(LN_S) setupx/libsetupx.@LIBEXT@ $@
libshell32.@LIBEXT@: shell32/libshell32.@LIBEXT@
$(RM) $@
$(LN_S) shell32/libshell32.@LIBEXT@ $@
libshell32.@LIBEXT@ libshell.@LIBEXT@ libshlwapi.@LIBEXT@: shell32/libshell32.@LIBEXT@
$(RM) $@ && $(LN_S) shell32/libshell32.@LIBEXT@ $@
libsound.@LIBEXT@: sound/libsound.@LIBEXT@
$(RM) $@
$(LN_S) sound/libsound.@LIBEXT@ $@
$(RM) $@ && $(LN_S) sound/libsound.@LIBEXT@ $@
libstress.@LIBEXT@: stress/libstress.@LIBEXT@
$(RM) $@
$(LN_S) stress/libstress.@LIBEXT@ $@
$(RM) $@ && $(LN_S) stress/libstress.@LIBEXT@ $@
libtapi32.@LIBEXT@: tapi32/libtapi32.@LIBEXT@
$(RM) $@
$(LN_S) tapi32/libtapi32.@LIBEXT@ $@
$(RM) $@ && $(LN_S) tapi32/libtapi32.@LIBEXT@ $@
libversion.@LIBEXT@: version/libversion.@LIBEXT@
$(RM) $@
$(LN_S) version/libversion.@LIBEXT@ $@
libversion.@LIBEXT@ libver.@LIBEXT@: version/libversion.@LIBEXT@
$(RM) $@ && $(LN_S) version/libversion.@LIBEXT@ $@
libw32skrnl.@LIBEXT@: win32s/libw32skrnl.@LIBEXT@
$(RM) $@
$(LN_S) win32s/libw32skrnl.@LIBEXT@ $@
libw32skrnl.@LIBEXT@ libw32sys.@LIBEXT@ libwin32s16.@LIBEXT@: win32s/libw32skrnl.@LIBEXT@
$(RM) $@ && $(LN_S) win32s/libw32skrnl.@LIBEXT@ $@
libwin87em.@LIBEXT@: win87em/libwin87em.@LIBEXT@
$(RM) $@
$(LN_S) win87em/libwin87em.@LIBEXT@ $@
$(RM) $@ && $(LN_S) win87em/libwin87em.@LIBEXT@ $@
libwindebug.@LIBEXT@: windebug/libwindebug.@LIBEXT@
$(RM) $@
$(LN_S) windebug/libwindebug.@LIBEXT@ $@
$(RM) $@ && $(LN_S) windebug/libwindebug.@LIBEXT@ $@
libwineoss.drv.@LIBEXT@: winmm/wineoss/libwineoss.drv.@LIBEXT@
$(RM) $@
$(LN_S) winmm/wineoss/libwineoss.drv.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winmm/wineoss/libwineoss.drv.@LIBEXT@ $@
libwing.@LIBEXT@: wing/libwing.@LIBEXT@
$(RM) $@
$(LN_S) wing/libwing.@LIBEXT@ $@
$(RM) $@ && $(LN_S) wing/libwing.@LIBEXT@ $@
libwinmm.@LIBEXT@: winmm/libwinmm.@LIBEXT@
$(RM) $@
$(LN_S) winmm/libwinmm.@LIBEXT@ $@
libwinmm.@LIBEXT@ libmmsystem.@LIBEXT@: winmm/libwinmm.@LIBEXT@
$(RM) $@ && $(LN_S) winmm/libwinmm.@LIBEXT@ $@
libwinspool.@LIBEXT@: winspool/libwinspool.@LIBEXT@
$(RM) $@
$(LN_S) winspool/libwinspool.@LIBEXT@ $@
$(RM) $@ && $(LN_S) winspool/libwinspool.@LIBEXT@ $@
libwnaspi32.@LIBEXT@: wnaspi32/libwnaspi32.@LIBEXT@
$(RM) $@
$(LN_S) wnaspi32/libwnaspi32.@LIBEXT@ $@
$(RM) $@ && $(LN_S) wnaspi32/libwnaspi32.@LIBEXT@ $@
libwsock32.@LIBEXT@: winsock/libwsock32.@LIBEXT@
$(RM) $@
$(LN_S) winsock/libwsock32.@LIBEXT@ $@
libwsock32.@LIBEXT@ libwinsock.@LIBEXT@: winsock/libwsock32.@LIBEXT@
$(RM) $@ && $(LN_S) winsock/libwsock32.@LIBEXT@ $@
$(DLLFILES): dummy
@cd `dirname $@` && $(MAKE)
......@@ -270,4 +245,3 @@ uninstall:: $(DLLFILES:%=%_uninstall_)
checklink:: $(DLLFILES:%=%_checklink_)
clean:: $(DLLFILES:%=%_clean_)
$(RM) $(DLLLIBS)
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = avifil32
SOVERSION = 1.0
ALTNAMES = avifile
IMPORTS = msvfw32 winmm
SPEC_SRCS = avifil32.spec avifile.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = comdlg32
SOVERSION = 1.0
ALTNAMES = commdlg
IMPORTS = shell32 ole32 comctl32 winspool winmm
WRCEXTRA = -s -pcomdlg32
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = dplayx
SOVERSION = 1.0
ALTNAMES = dplay
IMPORTS = ole32
SPEC_SRCS = dplay.spec dplayx.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = lz32
SOVERSION = 1.0
ALTNAMES = lzexpand
SPEC_SRCS = lz32.spec lzexpand.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = msvfw32
SOVERSION = 1.0
ALTNAMES = msvideo
IMPORTS = winmm
SPEC_SRCS = msvfw32.spec msvideo.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = ole32
SOVERSION = 1.0
ALTNAMES = ole2 storage compobj
SPEC_SRCS = ole32.spec ole2.spec storage.spec compobj.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = oleaut32
SOVERSION = 1.0
ALTNAMES = ole2disp typelib
IMPORTS = ole32 comctl32 winmm
SPEC_SRCS = oleaut32.spec ole2disp.spec typelib.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = olecli32
SOVERSION = 1.0
ALTNAMES = olecli
IMPORTS = olesvr32 ole32
SPEC_SRCS = olecli32.spec olecli.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = olesvr32
SOVERSION = 1.0
ALTNAMES = olesvr
SPEC_SRCS = olesvr32.spec olesvr.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = rasapi32
SOVERSION = 1.0
ALTNAMES = rasapi16
SPEC_SRCS = rasapi32.spec rasapi16.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = shell32
SOVERSION = 1.0
ALTNAMES = shell shlwapi
IMPORTS = ole32 comctl32 winmm
WRCEXTRA = -s -p$(MODULE)
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = version
SOVERSION = 1.0
ALTNAMES = ver
IMPORTS = lz32
SPEC_SRCS = ver.spec version.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = w32skrnl
SOVERSION = 1.0
ALTNAMES = w32sys win32s16
SPEC_SRCS = w32sys.spec win32s16.spec w32skrnl.spec
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winmm
SOVERSION = 1.0
ALTNAMES = mmsystem
WRCEXTRA = -s -pwinmm
SPEC_SRCS = \
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = wsock32
SOVERSION = 1.0
ALTNAMES = winsock
SPEC_SRCS = winsock.spec wsock32.spec
......
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