1 ## Compiler, linker, and lib stuff
2 ## Makefile for use with watcom win95/winnt executable.
4 # Copy this file to the ..\src directory (maybe rename to Makefile). Also:
5 # copy config.h.ms ..\src\config.h
11 #disabled for faster compiler
12 LFLAGS=sys nt op st=32767 op vers=1.7 op map op q op de 'GNU wget 1.7dev' de all
13 CFLAGS=/zp4 /d1 /w4 /fpd /5s /fp5 /bm /mf /os /bt=nt /DWINDOWS /DHAVE_CONFIG_H /I=$(%WATCOM)\h;$(%WATCOM)\h\nt;.
14 # /zp4= pack structure members with this alignment
15 # /d1 = line number debug info
17 # /fpd= ??? no such switch !
18 # /5s = Pentium stack-based calling
19 # /fp5= Pentium floating point
20 # /bm = build multi-threaded
21 # /mf = flat memory model
22 # /os = optimize for size
23 # /bt = "build target" (nt)
26 # The trouble: dependencies need to be space-separated (exe : obj1 obj2)
27 # wlink wants them comma-separated ( wlink FILE obj1,obj2 )
28 # The trick : Use wmake's "immediate expansion" feautre ( $+ turns it on,
29 # end-of-line and $_ turns it off ) to construct
30 # Background : wmake expands macros in macro definitions at the place of
31 # the macro call (GNU make's = behaviour)
32 # $+ changes this behaviour to expand the macros at the
33 # place of the macro *definition* (kinda like gmake's := does)
35 # See the "Macros" topic in the Watcom Tools Guide
39 # Add new object files to OBJS, with $_ appended
40 # Note: There MUST NOT be a $_ on the last one !!
41 # & is the line continuation character (also shouldn't be present at the end)
43 OBJS = cmpt.obj$_ connect.obj$_ cookies.obj$_ fnmatch.obj$_ ftp.obj$_ ftp-basic.obj$_ &
44 ftp-ls.obj$_ ftp-opie.obj$_ getopt.obj$_ hash.obj$_ headers.obj$_ host.obj$_ html-parse.obj$_ html-url.obj$_ &
45 http.obj$_ init.obj$_ log.obj$_ main.obj$_ md5.obj$_ netrc.obj$_ rbuf.obj$_ &
46 recur.obj$_ retr.obj$_ safe-ctype.obj$_ url.obj$_ utils.obj$_ version.obj$_ mswindows.obj
50 # For LINKOBJS, $_ is defined as a comma
53 LINKOBJS=FILE $+$(OBJS)$-
56 # Empty $_ again. OBJS now can be used as the dependency list for wget.exe
64 # Add extra libs like this :
65 #LIBFILES = LIBF lz32.lib,gdi32.lib
69 $(BINNAME): $(OBJS) Makefile
70 $(LINK) $(LFLAGS) NAME $(BINNAME) $(LINKOBJS) $(LIBPATH) $(LIBFILES)
74 # Explicit dependencies not needed because Watcom C stores
75 # dependency information in the object file. Wmake can read this information
76 # if prompted by .AUTODEPEND