113498266Sopenharmony_ci#*************************************************************************** 213498266Sopenharmony_ci# _ _ ____ _ 313498266Sopenharmony_ci# Project ___| | | | _ \| | 413498266Sopenharmony_ci# / __| | | | |_) | | 513498266Sopenharmony_ci# | (__| |_| | _ <| |___ 613498266Sopenharmony_ci# \___|\___/|_| \_\_____| 713498266Sopenharmony_ci# 813498266Sopenharmony_ci# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 913498266Sopenharmony_ci# 1013498266Sopenharmony_ci# This software is licensed as described in the file COPYING, which 1113498266Sopenharmony_ci# you should have received as part of this distribution. The terms 1213498266Sopenharmony_ci# are also available at https://curl.se/docs/copyright.html. 1313498266Sopenharmony_ci# 1413498266Sopenharmony_ci# You may opt to use, copy, modify, merge, publish, distribute and/or sell 1513498266Sopenharmony_ci# copies of the Software, and permit persons to whom the Software is 1613498266Sopenharmony_ci# furnished to do so, under the terms of the COPYING file. 1713498266Sopenharmony_ci# 1813498266Sopenharmony_ci# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 1913498266Sopenharmony_ci# KIND, either express or implied. 2013498266Sopenharmony_ci# 2113498266Sopenharmony_ci# SPDX-License-Identifier: curl 2213498266Sopenharmony_ci# 2313498266Sopenharmony_ci#*************************************************************************** 2413498266Sopenharmony_ci 2513498266Sopenharmony_ci# See usage in lib/Makefile.mk 2613498266Sopenharmony_ci 2713498266Sopenharmony_ciPROOT := .. 2813498266Sopenharmony_ci 2913498266Sopenharmony_ci### Common 3013498266Sopenharmony_ci 3113498266Sopenharmony_ciinclude $(PROOT)/lib/Makefile.mk 3213498266Sopenharmony_ci 3313498266Sopenharmony_ci### Local 3413498266Sopenharmony_ci 3513498266Sopenharmony_ciCPPFLAGS += -I$(PROOT)/lib 3613498266Sopenharmony_ciLDFLAGS += -L$(PROOT)/lib 3713498266Sopenharmony_ciLIBS := -lcurl $(LIBS) 3813498266Sopenharmony_ci 3913498266Sopenharmony_ci### Sources and targets 4013498266Sopenharmony_ci 4113498266Sopenharmony_ci# Provides CURL_CFILES, CURLX_CFILES 4213498266Sopenharmony_ciinclude Makefile.inc 4313498266Sopenharmony_ci 4413498266Sopenharmony_ciTARGETS := curl$(BIN_EXT) 4513498266Sopenharmony_ci 4613498266Sopenharmony_ciCURL_CFILES += $(notdir $(CURLX_CFILES)) 4713498266Sopenharmony_ci 4813498266Sopenharmony_cicurl_OBJECTS := $(patsubst %.c,$(OBJ_DIR)/%.o,$(strip $(CURL_CFILES))) 4913498266Sopenharmony_ciifdef MAP 5013498266Sopenharmony_ciCURL_MAP := curl.map 5113498266Sopenharmony_ciLDFLAGS += -Wl,-Map,$(CURL_MAP) 5213498266Sopenharmony_ciTOVCLEAN := $(CURL_MAP) 5313498266Sopenharmony_ciendif 5413498266Sopenharmony_civpath %.c $(PROOT)/lib 5513498266Sopenharmony_ci 5613498266Sopenharmony_ciTOCLEAN := $(curl_OBJECTS) 5713498266Sopenharmony_ci 5813498266Sopenharmony_ci### Rules 5913498266Sopenharmony_ci 6013498266Sopenharmony_ciifneq ($(wildcard tool_hugehelp.c.cvs),) 6113498266Sopenharmony_ciPERL ?= perl 6213498266Sopenharmony_ciNROFF ?= groff 6313498266Sopenharmony_ci 6413498266Sopenharmony_ciTOCLEAN += tool_hugehelp.c 6513498266Sopenharmony_ci 6613498266Sopenharmony_ciifneq ($(shell $(call WHICH, $(NROFF))),) 6713498266Sopenharmony_ci$(PROOT)/docs/curl.1: $(wildcard $(PROOT)/docs/cmdline-opts/*.d) 6813498266Sopenharmony_ci cd $(PROOT)/docs/cmdline-opts && \ 6913498266Sopenharmony_ci $(PERL) gen.pl mainpage $(notdir $^) > ../curl.1 7013498266Sopenharmony_ci 7113498266Sopenharmony_ci# Necessary for the generated tools_hugehelp.c 7213498266Sopenharmony_ciCPPFLAGS += -DUSE_MANUAL 7313498266Sopenharmony_ci 7413498266Sopenharmony_ciifdef ZLIB 7513498266Sopenharmony_ci_MKHELPOPT += -c 7613498266Sopenharmony_ciendif 7713498266Sopenharmony_citool_hugehelp.c: $(PROOT)/docs/curl.1 mkhelp.pl 7813498266Sopenharmony_ci $(NROFF) -man -Tascii $(MANOPT) $< | \ 7913498266Sopenharmony_ci $(PERL) mkhelp.pl $(_MKHELPOPT) $< > $@ 8013498266Sopenharmony_cielse 8113498266Sopenharmony_citool_hugehelp.c: 8213498266Sopenharmony_ci @echo Creating $@ 8313498266Sopenharmony_ci @$(call COPY, $@.cvs, $@) 8413498266Sopenharmony_ciendif 8513498266Sopenharmony_ciendif 8613498266Sopenharmony_ci 8713498266Sopenharmony_ci$(TARGETS): $(curl_OBJECTS) $(PROOT)/lib/libcurl.a 8813498266Sopenharmony_ci $(CC) $(LDFLAGS) -o $@ $(curl_OBJECTS) $(LIBS) 8913498266Sopenharmony_ci 9013498266Sopenharmony_ciall: $(OBJ_DIR) $(TARGETS) 91