Fixed ttydrv compile when using curses. Cleaned up a few #ifdefs.
[wine/multimedia.git] / dlls / Makedll.rules.in
blob67f9391a2bf48429be99ed56a7c31c3a79c0d67b
1 # Global rules for building dlls     -*-Makefile-*-
3 # Each individual makefile should define the following variables:
4 # MODULE       : name of the main module being built
5 # SOVERSION    : version of the .so file
6 # ALTNAMES     : alternate names for this dll (optional)
7 # IMPORTS      : dlls to import (optional)
9 # plus all variables required by the global Make.rules.in
12 DEFS       = @DLLFLAGS@ -D__WINE__
13 LIBEXT     = @LIBEXT@
14 LDSHARED   = @LDSHARED@
15 SONAME     = lib$(MODULE).so
16 IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(LIBEXT))
17 ALLNAMES   = lib$(MODULE).so $(ALTNAMES:%=lib%.so)
19 all: lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT))
21 @MAKE_RULES@
23 # Rules for .so files
25 lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
26         $(LDSHARED) $(OBJS) -o $@
28 $(ALLNAMES): lib$(MODULE).so.$(SOVERSION)
29         $(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
31 # Rules for .a files
33 lib$(MODULE).a: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
34         $(RM) $@
35         $(AR) $@ $(OBJS)
36         $(RANLIB) $@
38 $(ALTNAMES:%=lib%.a): lib$(MODULE).a
39         $(RM) $@ && $(LN_S) lib$(MODULE).a $@
41 # Rules for checking that no imports are missing
43 IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(LIBEXT))
45 checklink:: lib$(MODULE).$(LIBEXT) $(IMPORTLIBS)
46         $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -l$(MODULE) -L$(DLLDIR) $(IMPORTS:%=-l%) -L$(TOPOBJDIR) -lwine $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS) && $(RM) checklink
48 $(IMPORTLIBS): dummy
49         @cd $(DLLDIR) && $(MAKE) `basename $@`
51 # Rules for installation
53 .PHONY: install_so install_a
55 install_so: lib$(MODULE).so.$(SOVERSION)
56         [ -d $(libdir) ] || $(MKDIR) $(libdir)
57         $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION) $(libdir)/lib$(MODULE).so.$(SOVERSION)
58         cd $(libdir) && for i in $(ALLNAMES); do $(RM) $$i && $(LN_S) lib$(MODULE).so.$(SOVERSION) $$i; done
60 install_a: lib$(MODULE).a
61         [ -d $(libdir) ] || $(MKDIR) $(libdir)
62         $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
64 install:: $(LIBEXT:%=install_%)
66 uninstall::
67         cd $(libdir) && $(RM) $(ALLNAMES) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).a
69 clean::
70         $(RM) lib$(MODULE).so.$(SOVERSION)