Added d3d9 guids.
[wine] / libs / Makelib.rules.in
1 # Global rules for building shared libraries     -*-Makefile-*-
2 #
3 # Each individual makefile should define the following variables:
4 # LIBRARY      : name of the library being built (without the lib prefix)
5 # SOVERSION    : the .so file version
6 #
7 # plus all variables required by the global Make.rules.in
8 #
9
10 DEFS      = @DLLFLAGS@ $(EXTRADEFS)
11 LIBEXT    = @LIBEXT@
12 LIBNAME   = lib$(LIBRARY)
13 DEFNAME   = $(LIBRARY).def
14 SONAME    = $(LIBNAME).so.$(SOVERSION)
15 MODULE    = $(LIBNAME).$(LIBEXT)
16
17 all: $(MODULE) $(MODULE:.dll=.a)
18
19 @MAKE_RULES@
20
21 $(LIBNAME).so.$(SOVERSION): $(OBJS) Makefile.in
22         $(LDSHARED) $(OBJS) $(EXTRALIBS) $(LDFLAGS) $(LIBS) -o $@
23
24 $(LIBNAME).so: $(LIBNAME).so.$(SOVERSION)
25         $(RM) $@ && $(LN_S) $(LIBNAME).so.$(SOVERSION) $@
26
27 $(LIBNAME).a: $(DEFNAME)
28         $(DLLTOOL) -l $@ -d $(SRCDIR)/$(DEFNAME)
29
30 $(LIBNAME).dll: $(OBJS) $(DEFNAME) Makefile.in
31         $(DLLWRAP) --def $(SRCDIR)/$(DEFNAME) -o $@ $(OBJS) $(EXTRALIBS)
32
33 .PHONY: install-lib-so install-lib-dll install-dev-so install-dev-dll
34
35 install-lib-so: $(LIBNAME).so.$(SOVERSION) dummy
36         $(MKINSTALLDIRS) $(libdir)
37         $(INSTALL_PROGRAM) $(LIBNAME).so.$(SOVERSION) $(libdir)/$(LIBNAME).so.$(SOVERSION)
38
39 install-lib-dll: $(LIBNAME).dll dummy
40         $(MKINSTALLDIRS) $(libdir)
41         $(INSTALL_DATA) $(LIBNAME).dll $(libdir)/$(LIBNAME).dll
42
43 install-dev-so: dummy
44         $(MKINSTALLDIRS) $(libdir)
45         cd $(libdir) && $(RM) $(LIBNAME).so && $(LN_S) $(LIBNAME).so.$(SOVERSION) $(LIBNAME).so
46
47 install-dev-dll: $(LIBNAME).a dummy
48         $(MKINSTALLDIRS) $(libdir)
49         $(INSTALL_DATA) $(LIBNAME).a $(libdir)/$(LIBNAME).a
50
51 install install-lib:: $(LIBEXT:%=install-lib-%)
52 install install-dev:: $(LIBEXT:%=install-dev-%)
53
54 uninstall::
55         $(RM) $(libdir)/$(LIBNAME).a $(libdir)/$(LIBNAME).dll $(libdir)/$(LIBNAME).so $(libdir)/$(LIBNAME).so.$(SOVERSION)
56
57 clean::
58         $(RM) $(LIBNAME).so.$(SOVERSION) $(LIBNAME).dll