]> sjero.net Git - wget/blobdiff - windows/Makefile.watcom
[svn] Removed string_t.c from the list of source files in Makefiles.
[wget] / windows / Makefile.watcom
index 60d839f905b032787c5d6f773b8bc317a1d8e618..4a2a61e7f829d2a96962d422cc897ebe75c25a53 100644 (file)
@@ -1,71 +1,95 @@
 ## Compiler, linker, and lib stuff
 ## Makefile for use with watcom win95/winnt executable.
+#
+# Copy this file to the ..\src directory (maybe rename to Makefile).
+#
 
 CC=wcc386 /zq
 LINK=wlink
 
-#disabled for faster compiler
-LFLAGS=sys nt op st=32767 op vers=1.7 op map op q op de 'GNU wget 1.7dev'
-CFLAGS=/zp4 /d1 /w4 /fpd /5s /fp5 /bm /mf /os /bt=nt /DWINDOWS /DHAVE_CONFIG_H /I=$(%WATCOM)\h;$(%WATCOM)\h\nt;.
+#
+# Note: this will wipe anything in the env.var PATH !
+#
+.BEFORE
+       @SET INCLUDE=$(%WATCOM)\h;$(%WATCOM)\h\nt;.
+
+LFLAGS=op q sys nt op st=32767 op map op de 'GNU Wget' de dw op symf
+#
+# op q              : quiet !
+# sys nt            : producing an NT app
+# op st(ack)=32768  : stack size
+# op vers(ion)=1.7  : "Image version" in the EXE header ( major.minor )
+# op map            : produce a map file
+# op de             : textual description, placed in the executable
+# de dw             : debug info on Dwarf format
+# op symf           : place debug info in a separate wget.sym
+#
+
+CFLAGS=/zp4 /w4 /fpd /5s /fp5 /bm /mf /bt=nt /I. /DWINDOWS /DHAVE_CONFIG_H
+#                    ^^^^^^^^ wget will run on NT. We can safely assume a Pentium :-)
 # /zp4= pack structure members with this alignment
 # /d1 = line number debug info
 # /w4 = warning level
-# /fpd= ??? no such switch !
+# /fpd= Pentium floatingpoint bug workaround
 # /5s = Pentium stack-based calling
 # /fp5= Pentium floating point
 # /bm = build multi-threaded
 # /mf = flat memory model
-# /os = optimize for size
 # /bt = "build target" (nt)
 
-OBJS = FILE cmpt.obj,connect.obj,fnmatch.obj,ftp.obj,ftp-basic.obj, &
-      ftp-ls.obj,ftpparse.obj,ftp-opie.obj,getopt.obj,hash.obj,headers.obj,host.obj,html-parse.obj,html-url.obj, &
-      http.obj,init.obj,log.obj,main.obj,md5.obj,netrc.obj,rbuf.obj, &
-      recur.obj,retr.obj,url.obj,utils.obj,version.obj,mswindows.obj
 #
-# NOTE: these two MUST be kept absolutely in sync
-# alas, no text functions in Watcom make :-(
+# Choose one of the following three:
+# /od /d2  for no optimization, full debug info
+# /os /d2  to optimize for size, full debug info (or /d1 for line number debug info)
+# /othexan for "heavy-duty" optimizations, no debug info
 #
-LINKOBJS = cmpt.obj connect.obj fnmatch.obj ftp.obj ftp-basic.obj &
-      ftp-ls.obj ftpparse.obj ftp-opie.obj getopt.obj hash.obj headers.obj host.obj html-parse.obj html-url.obj &
-      http.obj init.obj log.obj main.obj md5.obj netrc.obj rbuf.obj &
-      recur.obj retr.obj url.obj utils.obj version.obj mswindows.obj
+#CFLAGS+= /od /d2
+CFLAGS+= /os /d2
+#CFLAGS+= /othexan
+#       ^^-- mind the gap !!
+
+#CFLAGS+= /DDEBUG_MALLOC
+#       ^^-- mind the gap !!
 
+OBJS = cmpt.obj convert.obj connect.obj cookies.obj ftp.obj ftp-basic.obj  &
+      ftp-ls.obj ftp-opie.obj getopt.obj hash.obj host.obj html-parse.obj html-url.obj  &
+      http.obj init.obj log.obj main.obj gen-md5.obj gnu-md5.obj netrc.obj progress.obj  &
+      recur.obj res.obj retr.obj safe-ctype.obj url.obj utils.obj version.obj & 
+      mswindows.obj xmalloc.obj
 
-LIBFILES =
+LIBFILES = 
+#
+# Add extra libs like this :
+#LIBFILES = LIBF lz32.lib,gdi32.lib
 
 BINNAME=wget.exe
 
-$(BINNAME): $(LINKOBJS)
-        $(LINK) $(LFLAGS) NAME $(BINNAME) $(OBJS) $(LIBPATH) $(LIBFILES)
-
-cmpt.obj: cmpt.c wget.h sysdep.h options.h
-connect.obj: connect.c wget.h sysdep.h options.h connect.h host.h
-fnmatch.obj: fnmatch.c wget.h sysdep.h options.h fnmatch.h
-ftp-basic.obj: ftp-basic.c wget.h sysdep.h options.h utils.h rbuf.h connect.h host.h ftp.h
-ftp-ls.obj: ftp-ls.c wget.h sysdep.h options.h utils.h ftp.h rbuf.h url.h ftpparse.h
-ftp-opie.obj: ftp-opie.c wget.h sysdep.h options.h md5.h
-ftp.obj: ftp.c wget.h sysdep.h options.h utils.h url.h rbuf.h retr.h ftp.h connect.h host.h fnmatch.h netrc.h
-ftpparse.obj: ftpparse.c ftpparse.h
-getopt.obj: getopt.c wget.h sysdep.h options.h getopt.h
-hash.obj: hash.c wget.h sysdep.h options.h utils.h hash.h
-headers.obj: headers.c wget.h sysdep.h options.h connect.h rbuf.h headers.h
-host.obj: host.c wget.h sysdep.h options.h utils.h host.h url.h hash.h
-html-parse.obj: html-parse.c wget.h sysdep.h options.h html-parse.h
-html-url.obj: html-url.c wget.h sysdep.h options.h html-parse.h url.h utils.h
-http.obj: http.c wget.h sysdep.h options.h utils.h url.h host.h rbuf.h retr.h headers.h connect.h fnmatch.h netrc.h md5.h
-init.obj: init.c wget.h sysdep.h options.h utils.h init.h host.h recur.h netrc.h
-log.obj: log.c wget.h sysdep.h options.h utils.h
-main.obj: main.c wget.h sysdep.h options.h utils.h getopt.h init.h retr.h rbuf.h recur.h host.h
-md5.obj: md5.c wget.h sysdep.h options.h md5.h
-netrc.obj: netrc.c wget.h sysdep.h options.h utils.h netrc.h init.h
-rbuf.obj: rbuf.c wget.h sysdep.h options.h rbuf.h connect.h
-recur.obj: recur.c wget.h sysdep.h options.h url.h recur.h utils.h retr.h rbuf.h ftp.h fnmatch.h host.h hash.h
-retr.obj: retr.c wget.h sysdep.h options.h utils.h retr.h rbuf.h url.h recur.h ftp.h host.h connect.h hash.h
-snprintf.obj: snprintf.c
-url.obj: url.c wget.h sysdep.h options.h utils.h url.h host.h
-utils.obj: utils.c wget.h sysdep.h options.h utils.h fnmatch.h hash.h
-version.obj: version.c
-
-.c.obj:
+all : config.h $(BINNAME) .SYMBOLIC
+
+#
+# We use config.h.ms
+#
+config.h : ..\windows\config.h.ms
+       copy $[@ $^@
+
+#
+# Note: this will pass all the OBJ files to wlink,
+# resulting in a very long command line (410 chars, last I counted)
+# This might fail on Win9x (works with NT's cmd.exe)
+#
+$(BINNAME): $(OBJS) Makefile
+       $(LINK) $(LFLAGS) NAME $(BINNAME) FILE { $(OBJS) } $(LIBPATH) $(LIBFILES)
+
+
+#
+# Explicit dependencies not needed because Watcom C stores
+# dependency information in the object file. Wmake can read this information
+# if prompted by .AUTODEPEND
+#
+
+.c.obj: .AUTODEPEND
        $(CC) $(CFLAGS) $[@
+
+.c.i: .AUTODEPEND
+       $(CC) $(CFLAGS) -fo=$@ /Pc $[@
+