summaryrefslogtreecommitdiff
path: root/src/makefile.dj
blob: 1259b650197b38e20a286b61faa145b4b4696b42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 2003 - 2007, Gisle Vanem <gvanem@broadpark.no>.
# Copyright (C) 2003 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
#***************************************************************************

#
#  Adapted for djgpp2 / Watt-32 / DOS
#

DEPEND_PREREQ = # tool_hugehelp.c

TOPDIR = ..

include ../packages/DOS/common.dj
include Makefile.inc

CSOURCES = $(CURL_CFILES)

ifeq ($(USE_SSL),1)
  EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a
endif

ifeq ($(USE_ARES),1)
  EX_LIBS += $(ARES_ROOT)/libcares.a
endif

ifeq ($(USE_ZLIB),1)
  EX_LIBS += $(ZLIB_ROOT)/libz.a
  CFLAGS  += -DUSE_MANUAL
endif

ifeq ($(USE_IDNA),1)
  EX_LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv
endif

EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a

CFLAGS += -DUSE_ENVIRONMENT

PROGRAM  = curl.exe
OBJECTS += $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))

all: $(OBJ_DIR) $(PROGRAM)
	@echo Welcome to cURL

$(PROGRAM): $(OBJECTS) ../lib/libcurl.a
	$(CC) -o $@ $^ $(LDFLAGS) $(EX_LIBS)

#
# groff 1.18+ requires "-P -c"
#
tool_hugehelp.c: ../docs/MANUAL ../docs/curl.1 mkhelp.pl
	groff -Tascii -man ../docs/curl.1 | \
	perl -w mkhelp.pl ../docs/MANUAL > $@

# clean generated files
#
genclean:
	- $(DELETE) tool_hugehelp.c

# clean object files and subdir
#
objclean: genclean
	- $(DELETE) $(OBJ_DIR)$(DS)*.o
	- $(RMDIR) $(OBJ_DIR)

# clean without removing built program
#
clean: objclean
	- $(DELETE) depend.dj

# clean everything
#
realclean vclean: clean
	- $(DELETE) $(PROGRAM)

-include depend.dj