2 # GNU Makefile for wget / djgpp / MSDOS.
3 # By Gisle Vanem <gvanem@broadpark.no> 2009.
5 # `cd' to `./src' and issue the command:
6 # make -f ../msdos/Makefile.dj depend
8 # make -f ../msdos/Makefile.dj
10 VERSION = 1.12 (djgpp/DOS)
14 VPATH = ../lib ../md5 ../msdos
22 OPENSSL_ROOT = e:/net/OpenSSL.099
23 ZLIB_ROOT = e:/djgpp/contrib/zlib
27 CFLAGS = -O2 -g -Wall -Wcast-align -I. -I../msdos -I../lib -I../md5 \
28 -I/dev/env/WATT_ROOT/inc -DHAVE_CONFIG_H -DENABLE_DEBUG \
33 ifeq ($(USE_OPENSSL),1)
34 CFLAGS += -DHAVE_OPENSSL -DHAVE_SSL -DOPENSSL_NO_KRB5 -I$(OPENSSL_ROOT)
35 EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a \
37 SOURCES += openssl.c http-ntlm.c
41 CFLAGS += -DENABLE_IPV6
44 EX_LIBS += /dev/env/WATT_ROOT/lib/libwatt.a
46 SOURCES += cmpt.c connect.c cookies.c exits.c ftp.c ftp-basic.c ftp-ls.c \
47 ftp-opie.c hash.c host.c html-parse.c html-url.c http.c \
48 init.c log.c main.c gen-md5.c netrc.c progress.c recur.c \
49 res.c retr.c snprintf.c url.c utils.c version.c convert.c \
50 ptimer.c spider.c css.c css-url.c build_info.c ../md5/md5.c \
52 $(addprefix ../lib/, error.c exitfail.c quote.c \
53 quotearg.c getopt.c getopt1.c xalloc-die.c xmalloc.c)
55 OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(SOURCES:.c=.o)))
57 all: $(OBJ_DIR) wget.exe
58 @echo 'Welcome to Wget'
64 $(CC) $(LDFLAGS) -o $@ $^ $(EX_LIBS)
70 rm -f $(OBJ_DIR)/*.o $(MAPFILE)
72 vclean realclean: clean
73 rm -f wget.exe depend.dj version.c
77 $(CC) $(CFLAGS) -o $@ -c $<
80 version.c: ../msdos/Makefile.DJ
81 @echo 'char *version_string = "$(VERSION)";' > $@
82 @echo 'char *compilation_string = "$(CC) $(CFLAGS)";' >> $@
83 @echo 'char *link_string = "$(CC) $(LDFLAGS) -o wget.exe $$(OBJECTS) $(EX_LIBS)";' >> $@
86 $(CC) -MM $(CFLAGS) $(SOURCES) | \
87 sed -e 's/^\([a-zA-Z0-9_-]*\.o:\)/$$(OBJ_DIR)\/\1/' > depend.dj