blob: 84c127b07b89c57da91d67e7466c8ce003fa7d1e [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
8# Copyright (C) 2003 - 2022, Gisle Vanem <gvanem@yahoo.no>.
9# Copyright (C) 2003 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
10#
11# This software is licensed as described in the file COPYING, which
12# you should have received as part of this distribution. The terms
13# are also available at https://curl.se/docs/copyright.html.
14#
15# You may opt to use, copy, modify, merge, publish, distribute and/or sell
16# copies of the Software, and permit persons to whom the Software is
17# furnished to do so, under the terms of the COPYING file.
18#
19# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20# KIND, either express or implied.
21#
22# SPDX-License-Identifier: curl
23#
24#***************************************************************************
25
26#
27# Adapted for djgpp2 / Watt-32 / DOS
28#
29
30DEPEND_PREREQ = # tool_hugehelp.c
31
32TOPDIR = ..
33
34vpath %.c ../lib
35
36include ../packages/DOS/common.dj
37include Makefile.inc
38
39CSOURCES = $(CURL_CFILES) $(CURLX_CFILES)
40
41ifeq ($(USE_OPENSSL),1)
42 EX_LIBS += $(OPENSSL_LIBS)
43endif
44
45ifeq ($(USE_ARES),1)
46 EX_LIBS += $(ARES_ROOT)/libcares.a
47endif
48
49ifeq ($(USE_ZLIB),1)
50 EX_LIBS += $(ZLIB_ROOT)/libz.a
51 CFLAGS += -DUSE_MANUAL
52endif
53
54ifeq ($(USE_IDNA),1)
55 EX_LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv
56endif
57
58EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a
59
60PROGRAM = curl.exe
61OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(CSOURCES:.c=.o)))
62
63all: $(OBJ_DIR) $(PROGRAM)
64 @echo Welcome to curl
65
66$(PROGRAM): $(OBJECTS) ../lib/libcurl.a
67 $(CC) -o $@ $^ $(LDFLAGS) $(EX_LIBS)
68
69#
70# groff 1.18+ requires "-P -c"
71# If 'USE_ZLIB = 1', create a compressed help-file.
72#
73ifeq ($(USE_ZLIB),1)
74 COMPRESS_OPT = -c
75endif
76
77tool_hugehelp.c: ../docs/curl.1 mkhelp.pl Makefile.dj
78 groff -Tascii -man $< | perl -w mkhelp.pl $(COMPRESS_OPT) $< > $@
79
80# clean generated files
81#
82genclean:
83 - $(DELETE) tool_hugehelp.c
84
85# clean object files and subdir
86#
87objclean: genclean
88 - $(DELETE) $(OBJ_DIR)$(DS)*.o
89 - $(RMDIR) $(OBJ_DIR)
90
91# clean without removing built program
92#
93clean: objclean
94 - $(DELETE) depend.dj
95
96# clean everything
97#
98realclean vclean: clean
99 - $(DELETE) $(PROGRAM)
100
101-include depend.dj