[10/13]docs/winelib: Update the Makefile analysis

André Hentschel nerv at dawncrow.de
Fri May 14 11:43:16 CDT 2010


---
 en/winelib-toolkit.sgml |   92 ++++++++--------------------------------------
 1 files changed, 16 insertions(+), 76 deletions(-)

diff --git a/en/winelib-toolkit.sgml b/en/winelib-toolkit.sgml
index ebd5c07..461d98b 100644
--- a/en/winelib-toolkit.sgml
+++ b/en/winelib-toolkit.sgml
@@ -214,21 +214,7 @@
           Here's a detailed description of its content:
         </para>
         <programlisting>
-### Generic autoconf variables
-
-TOPSRCDIR             = @top_srcdir@
-TOPOBJDIR             = .
-SRCDIR                = @srcdir@
-VPATH                 = @srcdir@
-        </programlisting>
-        <para>
-          The above is part of the standard autoconf boiler-plate. These 
-          variables make it possible to have per-architecture directories for 
-          compiled files and other similar goodies (But note that this kind 
-          of functionality has not been tested with winemaker generated 
-          <filename>Makefile</filename> files yet).
-        </para>
-        <programlisting>
+SRCDIR                = .
 SUBDIRS               =
 DLLS                  =
 EXES                  = hello.exe
@@ -241,7 +227,7 @@ EXES                  = hello.exe
           extension. Note that these names must be in all lowercase.
         </para>
         <programlisting>
-### Global settings
+### Common settings
 
 DEFINES               = -DSTRICT
 INCLUDE_PATH          =
@@ -262,13 +248,12 @@ LIBRARIES             =
         </para>
         <para>
           The other variable 
-          names should be self-explanatory. You can also use three additional 
-          variables that are usually not present in the file: 
+          names should be self-explanatory. There are also 
           <varname>CEXTRA</varname>, <varname>CXXEXTRA</varname> and 
-          <varname>WRCEXTRA</varname> which allow you to specify additional 
-          flags for, respectively, the C compiler, the C++ compiler and the 
-          resource compiler. Finally note that all these variable contain 
-          the option's name.
+          <varname>RCEXTRA</varname>(usually not present in the file) which
+          allow you to specify additional flags for, respectively,
+          the C compiler, the C++ compiler and the resource compiler.
+          Finally note that all these variable contain the option's name.
         </para>
         <para>
           Then come one section per target, each describing the various 
@@ -280,28 +265,20 @@ LIBRARIES             =
 hello_exe_C_SRCS          = hello.c
 hello_exe_CXX_SRCS        =
 hello_exe_RC_SRCS         =
-hello_exe_SPEC_SRCS       =
         </programlisting>
         <para>
-          Each section will start with a comment indicating the name of the 
-          target. Then come a series of variables prefixed with the name of 
+          The above variables list the sources that are used togenerate the 
+          target. Each section will start with a comment indicating the name of
+          the target. Then come a series of variables prefixed with the name of 
           that target. Note that the name of the prefix may be slightly 
           different from that of the target because of restrictions on the 
           variable names.
         </para>
-        <para>
-          The above variables list the sources that are used togenerate the 
-          target. Note that there should only be one resource file in 
-          <varname>RC_SRCS</varname>, and that <varname>SPEC_SRCS</varname> 
-          will usually be empty for executables, and will contain a single
-          spec file for libraries.
-        </para>
         <programlisting>
 hello_exe_DLL_PATH        =
 hello_exe_DLLS            =
 hello_exe_LIBRARY_PATH    =
 hello_exe_LIBRARIES       =
-hello_exe_DEPENDS         =
         </programlisting>
         <para>
           The above variables specify how to link the target. Note that they 
@@ -310,18 +287,11 @@ hello_exe_DEPENDS         =
         <para>
           The <varname>DLLS</> field is where you would enumerate the list of
           DLLs that executable imports. It should contain the full DLL name
-          including the '.dll' extension, but not the '-l' option.
-        </para>
-        <para>
-          <varname>DEPENDS</>, when present, specifies a list of other 
-          targets that this target depends on. Winemaker will automatically 
-          fill this field when an executable and a library are built in the
-          same directory.
+          , but not the '-l' option.
         </para>
         <programlisting>
 hello_exe_OBJS        = $(hello_exe_C_SRCS:.c=.o) \
-                        $(hello_exe_CXX_SRCS:.cpp=.o) \
-                        $(EXTRA_OBJS)
+                        $(hello_exe_CXX_SRCS:.cpp=.o)
         </programlisting>
         <para>
           The above just builds a list of all the object files that 
@@ -334,51 +304,21 @@ hello_exe_OBJS        = $(hello_exe_C_SRCS:.c=.o) \
 C_SRCS                = $(hello_exe_C_SRCS)
 CXX_SRCS              = $(hello_exe_CXX_SRCS)
 RC_SRCS               = $(hello_exe_RC_SRCS)
-SPEC_SRCS             = $(hello_exe_SPEC_SRCS)
         </programlisting>
         <para>
-          This section builds 'summary' lists of source files. These lists are 
-          used by the <filename>Make.rules</filename> file.
+          This section builds 'summary' lists of source files.
         </para>
-        <note><para>
-          FIXME:The following is not up-to-date.
-        </para></note>
         <programlisting>
-### Generic autoconf targets
-
-all: $(DLLS:%=%.so) $(EXES:%=%.so)
-
- at MAKE_RULES@
+### Generic targets
 
-install::
-        for i in $(EXES); do $(INSTALL_PROGRAM) $$i $(bindir); done
-        for i in $(EXES:%=%.so) $(DLLS); do $(INSTALL_LIBRARY) $$i $(libdir); done
-
-uninstall::
-        for i in $(EXES); do $(RM) $(bindir)/$$i;done
-        for i in $(EXES:%=%.so) $(DLLS); do $(RM) $(libdir)/$$i;done
+all: $(SUBDIRS) $(DLLS:%=%.so) $(EXES:%=%.so)
         </programlisting>
         <para>
           The above first defines the default target for this makefile. Here 
-          it consists in trying to build all the targets. Then it includes 
-          the <filename>Make.rules</filename> file which contains the build 
-          logic, and provides a few more standard targets to install / 
-          uninstall the targets. 
+          it consists in trying to build all the targets.
         </para>
         <programlisting>
 ### Target specific build rules
-
-$(hello_SPEC_SRCS:.spec=.tmp.o): $(hello_OBJS)
-        $(LDCOMBINE) $(hello_OBJS) -o $@
-        -$(STRIP) $(STRIPFLAGS) $@
-
-$(hello_SPEC_SRCS:.spec=.spec.c): $(hello_SPEC_SRCS:.spec) $(hello_SPEC_SRCS:.spec=.tmp.o) $(hello_RC_SRCS:.rc=.res)
-        $(WINEBUILD) -fPIC $(hello_LIBRARY_PATH) $(WINE_LIBRARY_PATH) -sym $(hello_SPEC_SRCS:.spec=.tmp.o) -o $@ -spec $(hello_SPEC_SRCS)
-
-hello.so: $(hello_SPEC_SRCS:.spec=.spec.o) $(hello_OBJS) $(hello_DEP
-ENDS) 
-        $(LDSHARED) $(LDDLLFLAGS) -o $@ $(hello_OBJS) $(hello_SPEC_SRCS:.spec=.spec.o) $(hello_LIBRARY_PATH) $(hello_LIBRARIES:%=-l%) $(DLL_LINK) $(LIBS)
-        test -f hello || $(LN_S) $(WINE) hello
         </programlisting>
         <para>
           Then come additional directives to link the executables and 
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list