xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | #*************************************************************************** |
| 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 | |
| 30 | DEPEND_PREREQ = # tool_hugehelp.c |
| 31 | |
| 32 | TOPDIR = .. |
| 33 | |
| 34 | vpath %.c ../lib |
| 35 | |
| 36 | include ../packages/DOS/common.dj |
| 37 | include Makefile.inc |
| 38 | |
| 39 | CSOURCES = $(CURL_CFILES) $(CURLX_CFILES) |
| 40 | |
| 41 | ifeq ($(USE_OPENSSL),1) |
| 42 | EX_LIBS += $(OPENSSL_LIBS) |
| 43 | endif |
| 44 | |
| 45 | ifeq ($(USE_ARES),1) |
| 46 | EX_LIBS += $(ARES_ROOT)/libcares.a |
| 47 | endif |
| 48 | |
| 49 | ifeq ($(USE_ZLIB),1) |
| 50 | EX_LIBS += $(ZLIB_ROOT)/libz.a |
| 51 | CFLAGS += -DUSE_MANUAL |
| 52 | endif |
| 53 | |
| 54 | ifeq ($(USE_IDNA),1) |
| 55 | EX_LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv |
| 56 | endif |
| 57 | |
| 58 | EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a |
| 59 | |
| 60 | PROGRAM = curl.exe |
| 61 | OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(CSOURCES:.c=.o))) |
| 62 | |
| 63 | all: $(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 | # |
| 73 | ifeq ($(USE_ZLIB),1) |
| 74 | COMPRESS_OPT = -c |
| 75 | endif |
| 76 | |
| 77 | tool_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 | # |
| 82 | genclean: |
| 83 | - $(DELETE) tool_hugehelp.c |
| 84 | |
| 85 | # clean object files and subdir |
| 86 | # |
| 87 | objclean: genclean |
| 88 | - $(DELETE) $(OBJ_DIR)$(DS)*.o |
| 89 | - $(RMDIR) $(OBJ_DIR) |
| 90 | |
| 91 | # clean without removing built program |
| 92 | # |
| 93 | clean: objclean |
| 94 | - $(DELETE) depend.dj |
| 95 | |
| 96 | # clean everything |
| 97 | # |
| 98 | realclean vclean: clean |
| 99 | - $(DELETE) $(PROGRAM) |
| 100 | |
| 101 | -include depend.dj |