Am 21.04.2018 um 06:57 schrieb Johann 'Myrkraverk' Oskarsson:
> Hi all,
>
> I've gotten to the stage in my OpenSSL port where the the makefile is
> trying to build the first library.
>
> The typical generated make file rule is something like
>
> $(O_CRYPTO): $(CRYPTOOBJ)
> $(RM) $(O_CRYPTO)
> $(MKLIB) file $(O_CRYPTO) $(CRYPTOOBJ)
> $(RANLIB) $(O_CRYPTO)
>
> where I have added the "file" directive in the make file generator.
>
> However, if I just add the "name" directive for Wlink before the
> objects, how do I make it comma separated, as I understand the Wlink
> manual to require?
>
> Note: I can easily remove the $(RM) and $(RANLIB) lines, by editing the
> generator; a perl script. I am not so sure I can easily make it build
> a comma separated list directly in the make file since it just generates
> variable expansions, like you see above.
>
> Is this simpler to do with owcc? Right now I'm attempting to build a
> static library, and not a DLL on OS/2. Can I create .LIB files with
> owcc?
owcc is a wrapper/driver for using without makefiles. If you sue
makefiles, why not call the wcc, ... directly.
> Does Wmake have any magic I can use to convert the space separated
> objects into a comma separated list?
>
> Right now I'm trying to get a feel for my options, about how I can
> do this with OpenWatcom, without requiring external tools. I have
> not seen anything immediately obvious to use, in the Wmake, Wlink
> and owcc manuals.
>
>
From the lguide.pdf with cut&paste, so formatting is not good:
The Open Watcom Linker
library %libdir%\mylib
is equivalent to the following linker directive.
library \test\mylib
Note that a space must precede a reference to an environment variable.
Many directives can take a list of one or more arguments separated by
commas. Instead of a
comma-delimited list, you can specify a space-separated list provided
the list is enclosed in braces (e.g., {
space delimited list }). For example, the "FILE" directive can take a
list of object file names as an
argument.
file first,second,third,fourth
The alternate way of specifying this is as follows.
file {first second third fourth}
Where this comes in handy is in make files, where a list of dependents
is usually a space-delimited list.
OBJS = first second third fourth
.
.
.
wlink file {$(objs)}
The following notation is used to describe the syntax of linker
directives and options.
ABC All items in upper case are required.
[abc] The item abc is optional.
{abc} The item abc may be repeated zero or more times.
{abc}+ The item abc may be repeated one or more times.
a|b|c One of a, b or c may be specified.
a ::= b The item a is defined in terms of b.
Certain characters have special meaning to the linker. When a special
character must appear in a name, you
can imbed the string that makes up the name inside apostrophes (e.g.,
’name@8’). This prevents the linker
from interpreting the special character in its usual manner. This is
also true for file or path names that
contain spaces (e.g., ’\program files\software\mylib’). Normally, the
linker would interpret a space or
blank in a file name as a separator. The special characters are listed
below:
18
Linker Directives and Options
CU/2
Frank