1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00
wget/msdos/Makefile.DJ

91 lines
2.3 KiB
Makefile
Raw Normal View History

2007-09-28 17:47:46 -04:00
#
# GNU Makefile for wget / djgpp / MSDOS.
2009-09-05 14:27:52 -04:00
# By Gisle Vanem <gvanem@broadpark.no> 2009.
2007-09-28 17:47:46 -04:00
#
# `cd' to `./src' and issue the command:
2009-09-05 14:27:52 -04:00
# make -f ../msdos/Makefile.dj depend
# followed by:
# make -f ../msdos/Makefile.dj
#
2009-09-05 14:27:52 -04:00
VERSION = 1.12 (djgpp/DOS)
.SUFFIXES: .exe
2007-09-28 17:47:46 -04:00
2009-09-08 12:33:28 -04:00
VPATH = ../lib ../md5 ../msdos
2007-10-15 14:57:46 -04:00
2007-09-28 17:47:46 -04:00
USE_OPENSSL = 0
USE_IPV6 = 1
#
# Change to suite.
#
2007-09-28 17:47:46 -04:00
OPENSSL_ROOT = e:/net/OpenSSL.099
ZLIB_ROOT = e:/djgpp/contrib/zlib
OBJ_DIR = djgpp.obj
CC = gcc
2009-09-05 14:27:52 -04:00
CFLAGS = -O2 -g -Wall -Wcast-align -I. -I../msdos -I../lib -I../md5 \
-I/dev/env/WATT_ROOT/inc -DHAVE_CONFIG_H -DENABLE_DEBUG \
-DUSE_WATT32
2007-09-28 17:47:46 -04:00
# LDFLAGS = -s
ifeq ($(USE_OPENSSL),1)
CFLAGS += -DHAVE_OPENSSL -DHAVE_SSL -DOPENSSL_NO_KRB5 -I$(OPENSSL_ROOT)
2007-09-28 17:47:46 -04:00
EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a \
$(ZLIB_ROOT)/libz.a
SOURCES += openssl.c http-ntlm.c
2007-09-28 17:47:46 -04:00
endif
ifeq ($(USE_IPV6),1)
CFLAGS += -DENABLE_IPV6
endif
EX_LIBS += /dev/env/WATT_ROOT/lib/libwatt.a
2009-09-05 14:27:52 -04:00
SOURCES += cmpt.c connect.c cookies.c exits.c ftp.c ftp-basic.c ftp-ls.c \
2007-10-15 14:57:46 -04:00
ftp-opie.c hash.c host.c html-parse.c html-url.c http.c \
init.c log.c main.c gen-md5.c netrc.c progress.c recur.c \
2009-09-05 14:27:52 -04:00
res.c retr.c snprintf.c url.c utils.c version.c convert.c \
ptimer.c spider.c css.c css-url.c build_info.c ../md5/md5.c \
2009-09-08 12:33:28 -04:00
../msdos/msdos.c \
2009-09-05 14:27:52 -04:00
$(addprefix ../lib/, error.c exitfail.c quote.c \
quotearg.c getopt.c getopt1.c xalloc-die.c xmalloc.c)
2007-09-28 17:47:46 -04:00
2007-10-15 14:57:46 -04:00
OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(SOURCES:.c=.o)))
2007-09-28 17:47:46 -04:00
all: $(OBJ_DIR) wget.exe
2007-09-28 17:47:46 -04:00
@echo 'Welcome to Wget'
$(OBJ_DIR):
mkdir $(OBJ_DIR)
wget.exe: $(OBJECTS)
2007-09-28 17:47:46 -04:00
$(CC) $(LDFLAGS) -o $@ $^ $(EX_LIBS)
2009-09-05 14:27:52 -04:00
css.c: css.l
flex -8 -o$@ $^
2007-09-28 17:47:46 -04:00
clean:
2007-10-15 14:57:46 -04:00
rm -f $(OBJ_DIR)/*.o $(MAPFILE)
2007-09-28 17:47:46 -04:00
vclean realclean: clean
2009-09-05 14:27:52 -04:00
rm -f wget.exe depend.dj version.c
2007-09-28 17:47:46 -04:00
- rmdir $(OBJ_DIR)
$(OBJ_DIR)/%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
@echo
2009-09-05 14:27:52 -04:00
version.c: ../msdos/Makefile.DJ
@echo 'char *version_string = "$(VERSION)";' > $@
@echo 'char *compilation_string = "$(CC) $(CFLAGS)";' >> $@
@echo 'char *link_string = "$(CC) $(LDFLAGS) -o wget.exe $$(OBJECTS) $(EX_LIBS)";' >> $@
depend: version.c
2007-09-28 17:47:46 -04:00
$(CC) -MM $(CFLAGS) $(SOURCES) | \
sed -e 's/^\([a-zA-Z0-9_-]*\.o:\)/$$(OBJ_DIR)\/\1/' > depend.dj
-include depend.dj