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_ci# Specify our include paths here, and do it relative to $(top_srcdir) and
2713498266Sopenharmony_ci# $(top_builddir), to ensure that these paths which belong to the library
2813498266Sopenharmony_ci# being currently built and tested are searched before the library which
2913498266Sopenharmony_ci# might possibly already be installed in the system.
3013498266Sopenharmony_ci#
3113498266Sopenharmony_ci# $(top_srcdir)/include is for libcurl's external include files
3213498266Sopenharmony_ci# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
3313498266Sopenharmony_ci# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
3413498266Sopenharmony_ci
3513498266Sopenharmony_ciAM_CPPFLAGS = -I$(top_srcdir)/include        \
3613498266Sopenharmony_ci              -I$(top_builddir)/lib          \
3713498266Sopenharmony_ci              -I$(top_srcdir)/lib
3813498266Sopenharmony_ci
3913498266Sopenharmony_ciEXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl test1022.pl   \
4013498266Sopenharmony_ci  Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl .checksrc
4113498266Sopenharmony_ci
4213498266Sopenharmony_ciCFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
4313498266Sopenharmony_ci
4413498266Sopenharmony_ciCFLAGS += @CURL_CFLAG_EXTRAS@
4513498266Sopenharmony_ci
4613498266Sopenharmony_ciCLEANFILES = lib1521.c
4713498266Sopenharmony_ci
4813498266Sopenharmony_ci# Prevent LIBS from being used for all link targets
4913498266Sopenharmony_ciLIBS = $(BLANK_AT_MAKETIME)
5013498266Sopenharmony_ci
5113498266Sopenharmony_ciif USE_EXPLICIT_LIB_DEPS
5213498266Sopenharmony_ciSUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
5313498266Sopenharmony_ciTESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
5413498266Sopenharmony_cielse
5513498266Sopenharmony_ciSUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@
5613498266Sopenharmony_ciTESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@
5713498266Sopenharmony_ciendif
5813498266Sopenharmony_ci
5913498266Sopenharmony_ci# Dependencies (may need to be overridden)
6013498266Sopenharmony_ciLDADD = $(SUPPORTFILES_LIBS)
6113498266Sopenharmony_ci
6213498266Sopenharmony_ci# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
6313498266Sopenharmony_ci# noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
6413498266Sopenharmony_ciinclude Makefile.inc
6513498266Sopenharmony_ci
6613498266Sopenharmony_ci# Preloading of libhostname allows host name overriding,
6713498266Sopenharmony_ci# this is used to make some tests machine independent.
6813498266Sopenharmony_ci
6913498266Sopenharmony_ciif BUILD_LIBHOSTNAME
7013498266Sopenharmony_cinoinst_LTLIBRARIES = libhostname.la
7113498266Sopenharmony_cielse
7213498266Sopenharmony_cinoinst_LTLIBRARIES =
7313498266Sopenharmony_ciendif
7413498266Sopenharmony_ci
7513498266Sopenharmony_ciif USE_CPPFLAG_CURL_STATICLIB
7613498266Sopenharmony_ciAM_CPPFLAGS += -DCURL_STATICLIB
7713498266Sopenharmony_ciendif
7813498266Sopenharmony_ci
7913498266Sopenharmony_ciAM_LDFLAGS =
8013498266Sopenharmony_ciAM_CFLAGS =
8113498266Sopenharmony_ci
8213498266Sopenharmony_cilibhostname_la_CPPFLAGS_EXTRA =
8313498266Sopenharmony_cilibhostname_la_LDFLAGS_EXTRA = -module -avoid-version -rpath /nowhere
8413498266Sopenharmony_cilibhostname_la_CFLAGS_EXTRA =
8513498266Sopenharmony_ci
8613498266Sopenharmony_cilibstubgss_la_LDFLAGS_EXTRA =
8713498266Sopenharmony_ci
8813498266Sopenharmony_ciif CURL_LT_SHLIB_USE_NO_UNDEFINED
8913498266Sopenharmony_cilibhostname_la_LDFLAGS_EXTRA += -no-undefined
9013498266Sopenharmony_cilibstubgss_la_LDFLAGS_EXTRA += -no-undefined
9113498266Sopenharmony_ciendif
9213498266Sopenharmony_ci
9313498266Sopenharmony_ciif CURL_LT_SHLIB_USE_MIMPURE_TEXT
9413498266Sopenharmony_cilibhostname_la_LDFLAGS_EXTRA += -mimpure-text
9513498266Sopenharmony_ciendif
9613498266Sopenharmony_ci
9713498266Sopenharmony_ciif DOING_CURL_SYMBOL_HIDING
9813498266Sopenharmony_cilibhostname_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
9913498266Sopenharmony_cilibhostname_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
10013498266Sopenharmony_ciendif
10113498266Sopenharmony_ci
10213498266Sopenharmony_cilibhostname_la_CPPFLAGS = $(AM_CPPFLAGS) $(libhostname_la_CPPFLAGS_EXTRA)
10313498266Sopenharmony_cilibhostname_la_LDFLAGS = $(AM_LDFLAGS) $(libhostname_la_LDFLAGS_EXTRA)
10413498266Sopenharmony_cilibhostname_la_CFLAGS = $(AM_CFLAGS) $(libhostname_la_CFLAGS_EXTRA)
10513498266Sopenharmony_ci
10613498266Sopenharmony_cilibhostname_la_SOURCES = sethostname.c
10713498266Sopenharmony_ci
10813498266Sopenharmony_cilibhostname_la_LIBADD =
10913498266Sopenharmony_cilibhostname_la_DEPENDENCIES =
11013498266Sopenharmony_ci
11113498266Sopenharmony_ci# Build a stub gssapi implementation for testing
11213498266Sopenharmony_ciif BUILD_STUB_GSS
11313498266Sopenharmony_cinoinst_LTLIBRARIES += libstubgss.la
11413498266Sopenharmony_ci
11513498266Sopenharmony_cilibstubgss_la_CPPFLAGS = $(AM_CPPFLAGS)
11613498266Sopenharmony_cilibstubgss_la_LDFLAGS = $(AM_LDFLAGS) $(libstubgss_la_LDFLAGS_EXTRA) -avoid-version -rpath /nowhere
11713498266Sopenharmony_cilibstubgss_la_CFLAGS = $(AM_CFLAGS) -g
11813498266Sopenharmony_ci
11913498266Sopenharmony_cilibstubgss_la_SOURCES = stub_gssapi.c stub_gssapi.h
12013498266Sopenharmony_ci
12113498266Sopenharmony_cilibstubgss_la_LIBADD =
12213498266Sopenharmony_cilibstubgss_la_DEPENDENCIES =
12313498266Sopenharmony_ciendif
12413498266Sopenharmony_ci
12513498266Sopenharmony_ci
12613498266Sopenharmony_cilib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl $(top_srcdir)/include/curl/curl.h
12713498266Sopenharmony_ci	@PERL@ $(top_srcdir)/tests/libtest/mk-lib1521.pl < $(top_srcdir)/include/curl/curl.h > lib1521.c
12813498266Sopenharmony_ci
12913498266Sopenharmony_ciCHECKSRC = $(CS_$(V))
13013498266Sopenharmony_ciCS_0 = @echo "  RUN     " $@;
13113498266Sopenharmony_ciCS_1 =
13213498266Sopenharmony_ciCS_ = $(CS_0)
13313498266Sopenharmony_ci
13413498266Sopenharmony_cichecksrc:
13513498266Sopenharmony_ci	$(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.[ch]
13613498266Sopenharmony_ci
13713498266Sopenharmony_ciif CURLDEBUG
13813498266Sopenharmony_ci# for debug builds, we scan the sources on all regular make invokes
13913498266Sopenharmony_ciall-local: checksrc
14013498266Sopenharmony_ciendif
141