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).
11 @SET INCLUDE=$(%WATCOM)\h;$(%WATCOM)\h\nt;.
13 LFLAGS=op q sys nt op st=32767 op vers=1.7 op map op de 'GNU wget 1.7dev' de dw op symf
16 # sys nt : producing an NT app
17 # op st(ack)=32768 : stack size
18 # op vers(ion)=1.7 : "Image version" in the EXE header ( major.minor )
19 # op map : produce a map file
20 # op de : textual description, placed in the executable
21 # de dw : debug info on Dwarf format
22 # op symf : place debug info in a separate wget.sym
25 CFLAGS=/zp4 /w4 /fpd /5s /fp5 /bm /mf /bt=nt /DWINDOWS /DHAVE_CONFIG_H
26 # ^^^^^^^^ wget will run on NT. We can safely assume a Pentium :-)
27 # /zp4= pack structure members with this alignment
28 # /d1 = line number debug info
30 # /fpd= ??? no such switch !
31 # /5s = Pentium stack-based calling
32 # /fp5= Pentium floating point
33 # /bm = build multi-threaded
34 # /mf = flat memory model
35 # /bt = "build target" (nt)
38 # Choose one of the following three:
39 # /od /d2 for no optimization, full debug info
40 # /os /d2 to optimize for size, full debug info (or /d1 for line number debug info)
41 # /othexan for "heavy-duty" optimizations, no debug info
46 # ^^-- mind the gap !!
48 #CFLAGS+= /DDEBUG_MALLOC
49 # ^^-- mind the gap !!
52 # The trouble: dependencies need to be space-separated (exe : obj1 obj2)
53 # wlink wants them comma-separated ( wlink FILE obj1,obj2 )
54 # The trick : Use wmake's "immediate expansion" feautre ( $+ turns it on,
55 # end-of-line and $_ turns it off ) to construct
56 # Background : wmake expands macros in macro definitions at the place of
57 # the macro call (GNU make's = behaviour)
58 # $+ changes this behaviour to expand the macros at the
59 # place of the macro *definition* (kinda like gmake's := does)
61 # See the "Macros" topic in the Watcom Tools Guide
65 # Add new object files to OBJS, with $_ appended
66 # Note: There MUST NOT be a $_ on the last one !!
67 # & is the line continuation character (also shouldn't be present at the end)
69 OBJS = cmpt.obj$_ connect.obj$_ cookies.obj$_ fnmatch.obj$_ ftp.obj$_ ftp-basic.obj$_ &
70 ftp-ls.obj$_ ftp-opie.obj$_ getopt.obj$_ hash.obj$_ headers.obj$_ host.obj$_ html-parse.obj$_ html-url.obj$_ &
71 http.obj$_ init.obj$_ log.obj$_ main.obj$_ md5.obj$_ netrc.obj$_ rbuf.obj$_ &
72 recur.obj$_ retr.obj$_ safe-ctype.obj$_ url.obj$_ utils.obj$_ version.obj$_ mswindows.obj
76 # For LINKOBJS, $_ is defined as a comma
79 LINKOBJS=FILE $+$(OBJS)$-
82 # Empty $_ again. OBJS can now be used as the dependency list for wget.exe
90 # Add extra libs like this :
91 #LIBFILES = LIBF lz32.lib,gdi32.lib
95 all : config.h $(BINNAME) .SYMBOLIC
100 config.h : ..\windows\config.h.ms
103 $(BINNAME): $(OBJS) Makefile
104 $(LINK) $(LFLAGS) NAME $(BINNAME) $(LINKOBJS) $(LIBPATH) $(LIBFILES)
108 # Explicit dependencies not needed because Watcom C stores
109 # dependency information in the object file. Wmake can read this information
110 # if prompted by .AUTODEPEND