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_ciAUTOMAKE_OPTIONS = foreign nostdinc 2513498266Sopenharmony_ci 2613498266Sopenharmony_ciCMAKE_DIST = CMakeLists.txt curl_config.h.cmake 2713498266Sopenharmony_ci 2813498266Sopenharmony_ciEXTRA_DIST = Makefile.mk config-win32.h config-win32ce.h config-plan9.h \ 2913498266Sopenharmony_ci config-riscos.h config-mac.h curl_config.h.in config-dos.h \ 3013498266Sopenharmony_ci libcurl.plist libcurl.rc config-amigaos.h config-win32ce.h \ 3113498266Sopenharmony_ci config-os400.h setup-os400.h $(CMAKE_DIST) setup-win32.h .checksrc \ 3213498266Sopenharmony_ci Makefile.soname 3313498266Sopenharmony_ci 3413498266Sopenharmony_cilib_LTLIBRARIES = libcurl.la 3513498266Sopenharmony_ci 3613498266Sopenharmony_ciif BUILD_UNITTESTS 3713498266Sopenharmony_cinoinst_LTLIBRARIES = libcurlu.la 3813498266Sopenharmony_cielse 3913498266Sopenharmony_cinoinst_LTLIBRARIES = 4013498266Sopenharmony_ciendif 4113498266Sopenharmony_ci 4213498266Sopenharmony_ci# This might hold -Werror 4313498266Sopenharmony_ciCFLAGS += @CURL_CFLAG_EXTRAS@ 4413498266Sopenharmony_ci 4513498266Sopenharmony_ci# Specify our include paths here, and do it relative to $(top_srcdir) and 4613498266Sopenharmony_ci# $(top_builddir), to ensure that these paths which belong to the library 4713498266Sopenharmony_ci# being currently built and tested are searched before the library which 4813498266Sopenharmony_ci# might possibly already be installed in the system. 4913498266Sopenharmony_ci# 5013498266Sopenharmony_ci# $(top_srcdir)/include is for libcurl's external include files 5113498266Sopenharmony_ci# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file 5213498266Sopenharmony_ci# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files 5313498266Sopenharmony_ci 5413498266Sopenharmony_ciAM_CPPFLAGS = -I$(top_srcdir)/include \ 5513498266Sopenharmony_ci -I$(top_builddir)/lib \ 5613498266Sopenharmony_ci -I$(top_srcdir)/lib 5713498266Sopenharmony_ci 5813498266Sopenharmony_ci# Prevent LIBS from being used for all link targets 5913498266Sopenharmony_ciLIBS = $(BLANK_AT_MAKETIME) 6013498266Sopenharmony_ci 6113498266Sopenharmony_ciinclude Makefile.soname 6213498266Sopenharmony_ci 6313498266Sopenharmony_ciAM_CPPFLAGS += -DBUILDING_LIBCURL 6413498266Sopenharmony_ciAM_LDFLAGS = 6513498266Sopenharmony_ciAM_CFLAGS = 6613498266Sopenharmony_ci 6713498266Sopenharmony_ci# Makefile.inc provides the CSOURCES and HHEADERS defines 6813498266Sopenharmony_ciinclude Makefile.inc 6913498266Sopenharmony_ci 7013498266Sopenharmony_cilibcurl_la_SOURCES = $(CSOURCES) $(HHEADERS) 7113498266Sopenharmony_cilibcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS) 7213498266Sopenharmony_ci 7313498266Sopenharmony_cilibcurl_la_CPPFLAGS_EXTRA = 7413498266Sopenharmony_cilibcurl_la_LDFLAGS_EXTRA = 7513498266Sopenharmony_cilibcurl_la_CFLAGS_EXTRA = 7613498266Sopenharmony_ci 7713498266Sopenharmony_ciif CURL_LT_SHLIB_USE_VERSION_INFO 7813498266Sopenharmony_cilibcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO) 7913498266Sopenharmony_ciendif 8013498266Sopenharmony_ci 8113498266Sopenharmony_ciif CURL_LT_SHLIB_USE_NO_UNDEFINED 8213498266Sopenharmony_cilibcurl_la_LDFLAGS_EXTRA += -no-undefined 8313498266Sopenharmony_ciendif 8413498266Sopenharmony_ci 8513498266Sopenharmony_ciif CURL_LT_SHLIB_USE_MIMPURE_TEXT 8613498266Sopenharmony_cilibcurl_la_LDFLAGS_EXTRA += -mimpure-text 8713498266Sopenharmony_ciendif 8813498266Sopenharmony_ci 8913498266Sopenharmony_ciif CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS 9013498266Sopenharmony_cilibcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers 9113498266Sopenharmony_cielse 9213498266Sopenharmony_ci# if symbol-hiding is enabled, hide them! 9313498266Sopenharmony_ciif DOING_CURL_SYMBOL_HIDING 9413498266Sopenharmony_cilibcurl_la_LDFLAGS_EXTRA += -export-symbols-regex '^curl_.*' 9513498266Sopenharmony_ciendif 9613498266Sopenharmony_ciendif 9713498266Sopenharmony_ci 9813498266Sopenharmony_ciif USE_CPPFLAG_CURL_STATICLIB 9913498266Sopenharmony_cilibcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB 10013498266Sopenharmony_cielse 10113498266Sopenharmony_ciif HAVE_WINDRES 10213498266Sopenharmony_cilibcurl_la_SOURCES += $(LIB_RCFILES) 10313498266Sopenharmony_ci$(LIB_RCFILES): $(top_srcdir)/include/curl/curlver.h 10413498266Sopenharmony_ciendif 10513498266Sopenharmony_ciendif 10613498266Sopenharmony_ci 10713498266Sopenharmony_ciif DOING_CURL_SYMBOL_HIDING 10813498266Sopenharmony_cilibcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS 10913498266Sopenharmony_cilibcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING) 11013498266Sopenharmony_ciendif 11113498266Sopenharmony_ci 11213498266Sopenharmony_cilibcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA) 11313498266Sopenharmony_cilibcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(CURL_LDFLAGS_LIB) $(LIBCURL_LIBS) 11413498266Sopenharmony_cilibcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA) 11513498266Sopenharmony_ci 11613498266Sopenharmony_cilibcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS 11713498266Sopenharmony_cilibcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS) 11813498266Sopenharmony_cilibcurlu_la_CFLAGS = $(AM_CFLAGS) 11913498266Sopenharmony_ci 12013498266Sopenharmony_ciCHECKSRC = $(CS_$(V)) 12113498266Sopenharmony_ciCS_0 = @echo " RUN " $@; 12213498266Sopenharmony_ciCS_1 = 12313498266Sopenharmony_ciCS_ = $(CS_0) 12413498266Sopenharmony_ci 12513498266Sopenharmony_cichecksrc: 12613498266Sopenharmony_ci $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ 12713498266Sopenharmony_ci -W$(srcdir)/curl_config.h $(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] \ 12813498266Sopenharmony_ci $(srcdir)/vtls/*.[ch] $(srcdir)/vquic/*.[ch] $(srcdir)/vssh/*.[ch]) 12913498266Sopenharmony_ci 13013498266Sopenharmony_ciif CURLDEBUG 13113498266Sopenharmony_ci# for debug builds, we scan the sources on all regular make invokes 13213498266Sopenharmony_ciall-local: checksrc 13313498266Sopenharmony_ciendif 13413498266Sopenharmony_ci 13513498266Sopenharmony_ci# disable the tests that are mostly causing false positives 13613498266Sopenharmony_ciTIDYFLAGS=-checks=-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-valist.Uninitialized,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference -quiet 13713498266Sopenharmony_ci 13813498266Sopenharmony_ciTIDY:=clang-tidy 13913498266Sopenharmony_ci 14013498266Sopenharmony_citidy: 14113498266Sopenharmony_ci $(TIDY) $(CSOURCES) $(TIDYFLAGS) -- $(AM_CPPFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H 14213498266Sopenharmony_ci 14313498266Sopenharmony_cioptiontable: 14413498266Sopenharmony_ci perl optiontable.pl < $(top_srcdir)/include/curl/curl.h > easyoptions.c 14513498266Sopenharmony_ci 14613498266Sopenharmony_ciif HAVE_WINDRES 14713498266Sopenharmony_ci.rc.lo: 14813498266Sopenharmony_ci $(LIBTOOL) --tag=RC --mode=compile $(RC) -I$(top_srcdir)/include $(RCFLAGS) -i $< -o $@ 14913498266Sopenharmony_ciendif 150