Moved rules for building shared libraries into a global Makelib.rules

file.
This commit is contained in:
Alexandre Julliard 2003-05-01 00:39:29 +00:00
parent f0025e2adc
commit 117436e08e
6 changed files with 77 additions and 94 deletions

10
configure vendored

File diff suppressed because one or more lines are too long

View File

@ -1349,6 +1349,9 @@ AC_SUBST_FILE(MAKE_DLL_RULES)
MAKE_TEST_RULES=dlls/Maketest.rules MAKE_TEST_RULES=dlls/Maketest.rules
AC_SUBST_FILE(MAKE_TEST_RULES) AC_SUBST_FILE(MAKE_TEST_RULES)
MAKE_LIB_RULES=libs/Makelib.rules
AC_SUBST_FILE(MAKE_LIB_RULES)
MAKE_PROG_RULES=programs/Makeprog.rules MAKE_PROG_RULES=programs/Makeprog.rules
AC_SUBST_FILE(MAKE_PROG_RULES) AC_SUBST_FILE(MAKE_PROG_RULES)
@ -1356,6 +1359,7 @@ AC_CONFIG_FILES([
Make.rules Make.rules
dlls/Makedll.rules dlls/Makedll.rules
dlls/Maketest.rules dlls/Maketest.rules
libs/Makelib.rules
programs/Makeprog.rules programs/Makeprog.rules
Makefile Makefile
dlls/Makefile dlls/Makefile

View File

@ -1 +1,2 @@
Makefile Makefile
Makelib.rules

58
libs/Makelib.rules.in Normal file
View File

@ -0,0 +1,58 @@
# Global rules for building shared libraries -*-Makefile-*-
#
# Each individual makefile should define the following variables:
# LIBRARY : name of the library being built (without the lib prefix)
# SOVERSION : the .so file version
#
# plus all variables required by the global Make.rules.in
#
DEFS = @DLLFLAGS@ $(EXTRADEFS)
LIBEXT = @LIBEXT@
LIBNAME = lib$(LIBRARY)
DEFNAME = $(LIBRARY).def
SONAME = $(LIBNAME).so.$(SOVERSION)
MODULE = $(LIBNAME).$(LIBEXT)
all: $(MODULE) $(MODULE:.dll=.a)
@MAKE_RULES@
$(LIBNAME).so.$(SOVERSION): $(OBJS) Makefile.in
$(LDSHARED) $(OBJS) $(EXTRALIBS) $(LIBS) -o $@
$(LIBNAME).so: $(LIBNAME).so.$(SOVERSION)
$(RM) $@ && $(LN_S) $(LIBNAME).so.$(SOVERSION) $@
$(LIBNAME).a: $(DEFNAME)
$(DLLTOOL) -l $@ -d $(SRCDIR)/$(DEFNAME)
$(LIBNAME).dll: $(OBJS) $(DEFNAME) Makefile.in
$(DLLWRAP) --def $(SRCDIR)/$(DEFNAME) -o $@ $(OBJS) $(EXTRALIBS)
.PHONY: install-lib-so install-lib-dll install-dev-so install-dev-dll
install-lib-so: $(LIBNAME).so.$(SOVERSION) dummy
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_PROGRAM) $(LIBNAME).so.$(SOVERSION) $(libdir)/$(LIBNAME).so.$(SOVERSION)
install-lib-dll: $(LIBNAME).dll dummy
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_DATA) $(LIBNAME).dll $(libdir)/$(LIBNAME).dll
install-dev-so: dummy
$(MKINSTALLDIRS) $(libdir)
cd $(libdir) && $(RM) $(LIBNAME).so && $(LN_S) $(LIBNAME).so.$(SOVERSION) $(LIBNAME).so
install-dev-dll: $(LIBNAME).a dummy
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_DATA) $(LIBNAME).a $(libdir)/$(LIBNAME).a
install install-lib:: $(LIBEXT:%=install-lib-%)
install install-dev:: $(LIBEXT:%=install-dev-%)
uninstall::
$(RM) $(libdir)/$(LIBNAME).a $(libdir)/$(LIBNAME).dll $(libdir)/$(LIBNAME).so $(libdir)/$(LIBNAME).so.$(SOVERSION)
clean::
$(RM) $(LIBNAME).so.$(SOVERSION) $(LIBNAME).dll

View File

@ -1,12 +1,10 @@
DEFS = @DLLFLAGS@ -D__WINESRC__ -DNO_LIBWINE_PORT
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
LIBEXT = @LIBEXT@ LIBRARY = wine_unicode
SOVERSION = 1 SOVERSION = 1
SONAME = libwine_unicode.so.$(SOVERSION) EXTRADEFS = -D__WINESRC__ -DNO_LIBWINE_PORT
MODULE = libwine_unicode.$(LIBEXT)
CODEPAGES = \ CODEPAGES = \
037 \ 037 \
@ -81,47 +79,6 @@ C_SRCS = \
wctype.c \ wctype.c \
$(CODEPAGES:%=c_%.c) $(CODEPAGES:%=c_%.c)
all: $(MODULE) $(MODULE:.dll=.a) @MAKE_LIB_RULES@
@MAKE_RULES@
libwine_unicode.so.$(SOVERSION): $(OBJS) Makefile.in
$(LDSHARED) $(OBJS) -o $@
libwine_unicode.so: libwine_unicode.so.$(SOVERSION)
$(RM) $@ && $(LN_S) libwine_unicode.so.$(SOVERSION) $@
libwine_unicode.a: wine_unicode.def
$(DLLTOOL) -l $@ -d $(SRCDIR)/wine_unicode.def
libwine_unicode.dll: $(OBJS) wine_unicode.def Makefile.in
$(DLLWRAP) --def $(SRCDIR)/wine_unicode.def -o $@ $(OBJS)
.PHONY: install-lib-so install-lib-dll install-dev-so install-dev-dll
install-lib-so: libwine_unicode.so.$(SOVERSION) dummy
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_PROGRAM) libwine_unicode.so.$(SOVERSION) $(libdir)/libwine_unicode.so.$(SOVERSION)
install-lib-dll: libwine_unicode.dll dummy
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_DATA) libwine_unicode.dll $(libdir)/libwine_unicode.dll
install-dev-so: dummy
$(MKINSTALLDIRS) $(libdir)
cd $(libdir) && $(RM) libwine_unicode.so && $(LN_S) libwine_unicode.so.$(SOVERSION) libwine_unicode.so
install-dev-dll: libwine_unicode.a dummy
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_DATA) libwine_unicode.a $(libdir)/libwine_unicode.a
install install-lib:: $(LIBEXT:%=install-lib-%)
install install-dev:: $(LIBEXT:%=install-dev-%)
uninstall::
$(RM) $(libdir)/libwine_unicode.a $(libdir)/libwine_unicode.dll $(libdir)/libwine_unicode.so $(libdir)/libwine_unicode.so.$(SOVERSION)
clean::
$(RM) libwine_unicode.so.$(SOVERSION) libwine_unicode.dll
### Dependencies: ### Dependencies:

View File

@ -1,12 +1,10 @@
DEFS = @DLLFLAGS@ -D__WINESRC__ -DDLLDIR="\"$(dlldir)\""
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
LIBEXT = @LIBEXT@ LIBRARY = wine
SOVERSION = 1 SOVERSION = 1
SONAME = libwine.so.$(SOVERSION) EXTRADEFS = -D__WINESRC__ -DDLLDIR="\"$(dlldir)\""
MODULE = libwine.$(LIBEXT)
EXTRALIBS = $(LIBPORT) @DLLIBS@ @CRTLIBS@ EXTRALIBS = $(LIBPORT) @DLLIBS@ @CRTLIBS@
C_SRCS = \ C_SRCS = \
@ -16,47 +14,6 @@ C_SRCS = \
ldt.c \ ldt.c \
loader.c loader.c
all: $(MODULE) $(MODULE:.dll=.a) @MAKE_LIB_RULES@
@MAKE_RULES@
libwine.so.$(SOVERSION): $(OBJS) Makefile.in
$(LDSHARED) $(OBJS) $(EXTRALIBS) $(LIBS) -o $@
libwine.so: libwine.so.$(SOVERSION)
$(RM) $@ && $(LN_S) libwine.so.$(SOVERSION) $@
libwine.a: wine.def
$(DLLTOOL) -l $@ -d $(SRCDIR)/wine.def
libwine.dll: $(OBJS) wine.def Makefile.in
$(DLLWRAP) --def $(SRCDIR)/wine.def -o $@ $(OBJS) $(EXTRALIBS)
.PHONY: install-lib-so install-lib-dll install-dev-so install-dev-dll
install-lib-so: libwine.so.$(SOVERSION) dummy
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_PROGRAM) libwine.so.$(SOVERSION) $(libdir)/libwine.so.$(SOVERSION)
install-lib-dll: libwine.dll dummy
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_DATA) libwine.dll $(libdir)/libwine.dll
install-dev-so: dummy
$(MKINSTALLDIRS) $(libdir)
cd $(libdir) && $(RM) libwine.so && $(LN_S) libwine.so.$(SOVERSION) libwine.so
install-dev-dll: libwine.a dummy
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_DATA) libwine.a $(libdir)/libwine.a
install install-lib:: $(LIBEXT:%=install-lib-%)
install install-dev:: $(LIBEXT:%=install-dev-%)
uninstall::
$(RM) $(libdir)/libwine.a $(libdir)/libwine.dll $(libdir)/libwine.so $(libdir)/libwine.so.$(SOVERSION)
clean::
$(RM) libwine.so.$(SOVERSION) libwine.dll
### Dependencies: ### Dependencies: