We do not need to set SOVERSION for dlls.
[wine] / dlls / Makedll.rules.in
1 # Global rules for building dlls     -*-Makefile-*-
2 #
3 # Each individual makefile should define the following variables:
4 # MODULE       : name of the main module being built
5 # ALTNAMES     : alternate names for this dll (optional)
6 # IMPORTS      : dlls to import (optional)
7 # EXTRALIBS    : extra libraries to link in (optional)
8 #
9 # plus all variables required by the global Make.rules.in
10 #
11
12 DEFS       = @DLLFLAGS@ -D__WINE__
13 LIBEXT     = @LIBEXT@
14 SONAME     = lib$(MODULE).so
15 IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(LIBEXT))
16 ALLNAMES   = lib$(MODULE).so $(ALTNAMES:%=lib%.so)
17 SPEC_SRCS  = $(ALTNAMES:%=%.spec)
18 ALL_OBJS   = $(OBJS) $(MODULE).spec.o
19 ALL_LIBS   = -L$(TOPOBJDIR) -lwine $(EXTRALIBS) $(LIBS)
20
21 all: lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT))
22
23 @MAKE_RULES@
24
25 # Rules for .so files
26
27 lib$(MODULE).so: $(ALL_OBJS) Makefile.in
28         $(LDSHARED) $(LDDLLFLAGS) $(ALL_OBJS) -o $@ -L$(DLLDIR) $(IMPORTS:%=-l%) $(ALL_LIBS)
29
30 $(ALTNAMES:%=lib%.$(LIBEXT)): lib$(MODULE).$(LIBEXT)
31         $(RM) $@ && $(LN_S) lib$(MODULE).$(LIBEXT) $@
32
33 # Rules for .a files
34
35 lib$(MODULE).a: $(ALL_OBJS) Makefile.in
36         $(RM) $@
37         $(AR) $@ $(ALL_OBJS)
38         $(RANLIB) $@
39
40 # Rules for checking that no imports are missing
41
42 checklink:: lib$(MODULE).$(LIBEXT)
43         $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -l$(MODULE) $(ALL_LIBS) && $(RM) checklink
44
45 # Rules for debug channels
46
47 debug_channels: dummy
48         $(TOPSRCDIR)/tools/make_debug $(MODULE).spec $(C_SRCS) $(SUBDIRS:%=%/*.c)
49
50 # Rules for installation
51
52 .PHONY: install_so install_a
53
54 $(ALTNAMES:%=_install_/lib%.$(LIBEXT)): $(LIBEXT:%=install_%)
55         cd $(libdir) && $(RM) `basename $@` && $(LN_S) lib$(MODULE).$(LIBEXT) `basename $@`
56
57 install_so: lib$(MODULE).so
58         [ -d $(libdir) ] || $(MKDIR) $(libdir)
59         $(INSTALL_PROGRAM) lib$(MODULE).so $(libdir)/lib$(MODULE).so
60
61 install_a: lib$(MODULE).a
62         [ -d $(libdir) ] || $(MKDIR) $(libdir)
63         $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
64
65 install:: $(LIBEXT:%=install_%) $(ALTNAMES:%=_install_/lib%.$(LIBEXT))
66
67 uninstall::
68         cd $(libdir) && $(RM) lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT))