| 1 | ## Compiler, linker, and lib stuff
|
|---|
| 2 | ## Makefile for use with watcom win95/winnt executable.
|
|---|
| 3 | #
|
|---|
| 4 | # Copy this file to the ..\src directory (maybe rename to Makefile).
|
|---|
| 5 | #
|
|---|
| 6 |
|
|---|
| 7 | CC=wcc386 /zq
|
|---|
| 8 | LINK=wlink
|
|---|
| 9 |
|
|---|
| 10 | #
|
|---|
| 11 | # Note: this will wipe anything in the env.var PATH !
|
|---|
| 12 | #
|
|---|
| 13 | .BEFORE
|
|---|
| 14 | @SET INCLUDE=$(%WATCOM)\h;$(%WATCOM)\h\nt;.
|
|---|
| 15 |
|
|---|
| 16 | LFLAGS=op q sys nt op st=32767 op map op de 'GNU Wget' de dw op symf
|
|---|
| 17 | #
|
|---|
| 18 | # op q : quiet !
|
|---|
| 19 | # sys nt : producing an NT app
|
|---|
| 20 | # op st(ack)=32768 : stack size
|
|---|
| 21 | # op vers(ion)=1.7 : "Image version" in the EXE header ( major.minor )
|
|---|
| 22 | # op map : produce a map file
|
|---|
| 23 | # op de : textual description, placed in the executable
|
|---|
| 24 | # de dw : debug info on Dwarf format
|
|---|
| 25 | # op symf : place debug info in a separate wget.sym
|
|---|
| 26 | #
|
|---|
| 27 |
|
|---|
| 28 | CFLAGS=/zp4 /w4 /fpd /5s /fp5 /bm /mf /bt=nt /I. /DWINDOWS /DHAVE_CONFIG_H
|
|---|
| 29 | # ^^^^^^^^ wget will run on NT. We can safely assume a Pentium :-)
|
|---|
| 30 | # /zp4= pack structure members with this alignment
|
|---|
| 31 | # /d1 = line number debug info
|
|---|
| 32 | # /w4 = warning level
|
|---|
| 33 | # /fpd= Pentium floatingpoint bug workaround
|
|---|
| 34 | # /5s = Pentium stack-based calling
|
|---|
| 35 | # /fp5= Pentium floating point
|
|---|
| 36 | # /bm = build multi-threaded
|
|---|
| 37 | # /mf = flat memory model
|
|---|
| 38 | # /bt = "build target" (nt)
|
|---|
| 39 |
|
|---|
| 40 | #
|
|---|
| 41 | # Choose one of the following three:
|
|---|
| 42 | # /od /d2 for no optimization, full debug info
|
|---|
| 43 | # /os /d2 to optimize for size, full debug info (or /d1 for line number debug info)
|
|---|
| 44 | # /othexan for "heavy-duty" optimizations, no debug info
|
|---|
| 45 | #
|
|---|
| 46 | #CFLAGS+= /od /d2
|
|---|
| 47 | CFLAGS+= /os /d2
|
|---|
| 48 | #CFLAGS+= /othexan
|
|---|
| 49 | # ^^-- mind the gap !!
|
|---|
| 50 |
|
|---|
| 51 | #CFLAGS+= /DDEBUG_MALLOC
|
|---|
| 52 | # ^^-- mind the gap !!
|
|---|
| 53 |
|
|---|
| 54 | OBJS = cmpt.obj convert.obj connect.obj cookies.obj ftp.obj ftp-basic.obj &
|
|---|
| 55 | ftp-ls.obj ftp-opie.obj getopt.obj hash.obj host.obj html-parse.obj html-url.obj &
|
|---|
| 56 | http.obj init.obj log.obj main.obj gen-md5.obj gnu-md5.obj netrc.obj progress.obj &
|
|---|
| 57 | recur.obj res.obj retr.obj safe-ctype.obj url.obj utils.obj version.obj &
|
|---|
| 58 | mswindows.obj xmalloc.obj
|
|---|
| 59 |
|
|---|
| 60 | LIBFILES =
|
|---|
| 61 | #
|
|---|
| 62 | # Add extra libs like this :
|
|---|
| 63 | #LIBFILES = LIBF lz32.lib,gdi32.lib
|
|---|
| 64 |
|
|---|
| 65 | BINNAME=wget.exe
|
|---|
| 66 |
|
|---|
| 67 | all : config.h $(BINNAME) .SYMBOLIC
|
|---|
| 68 |
|
|---|
| 69 | #
|
|---|
| 70 | # We use config.h.ms
|
|---|
| 71 | #
|
|---|
| 72 | config.h : ..\windows\config.h.ms
|
|---|
| 73 | copy $[@ $^@
|
|---|
| 74 |
|
|---|
| 75 | #
|
|---|
| 76 | # Note: this will pass all the OBJ files to wlink,
|
|---|
| 77 | # resulting in a very long command line (410 chars, last I counted)
|
|---|
| 78 | # This might fail on Win9x (works with NT's cmd.exe)
|
|---|
| 79 | #
|
|---|
| 80 | $(BINNAME): $(OBJS) Makefile
|
|---|
| 81 | $(LINK) $(LFLAGS) NAME $(BINNAME) FILE { $(OBJS) } $(LIBPATH) $(LIBFILES)
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 | #
|
|---|
| 85 | # Explicit dependencies not needed because Watcom C stores
|
|---|
| 86 | # dependency information in the object file. Wmake can read this information
|
|---|
| 87 | # if prompted by .AUTODEPEND
|
|---|
| 88 | #
|
|---|
| 89 |
|
|---|
| 90 | .c.obj: .AUTODEPEND
|
|---|
| 91 | $(CC) $(CFLAGS) $[@
|
|---|
| 92 |
|
|---|
| 93 | .c.i: .AUTODEPEND
|
|---|
| 94 | $(CC) $(CFLAGS) -fo=$@ /Pc $[@
|
|---|
| 95 |
|
|---|