• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#***************************************************************************
2#                                  _   _ ____  _
3#  Project                     ___| | | |  _ \| |
4#                             / __| | | | |_) | |
5#                            | (__| |_| |  _ <| |___
6#                             \___|\___/|_| \_\_____|
7#
8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21# SPDX-License-Identifier: curl
22#
23###########################################################################
24AUTOMAKE_OPTIONS = foreign nostdinc
25
26# Specify our include paths here, and do it relative to $(top_srcdir) and
27# $(top_builddir), to ensure that these paths which belong to the library
28# being currently built and tested are searched before the library which
29# might possibly already be installed in the system.
30#
31# $(top_srcdir)/include is for libcurl's external include files
32# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
33# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
34
35AM_CPPFLAGS = -I$(top_srcdir)/include        \
36              -I$(top_builddir)/lib          \
37              -I$(top_srcdir)/lib
38
39EXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl test1022.pl   \
40  Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl .checksrc
41
42CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
43
44CFLAGS += @CURL_CFLAG_EXTRAS@
45
46CLEANFILES = lib1521.c
47
48# Prevent LIBS from being used for all link targets
49LIBS = $(BLANK_AT_MAKETIME)
50
51if USE_EXPLICIT_LIB_DEPS
52SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
53TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
54else
55SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@
56TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@
57endif
58
59# Dependencies (may need to be overridden)
60LDADD = $(SUPPORTFILES_LIBS)
61
62# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
63# noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
64include Makefile.inc
65
66# Preloading of libhostname allows host name overriding,
67# this is used to make some tests machine independent.
68
69if BUILD_LIBHOSTNAME
70noinst_LTLIBRARIES = libhostname.la
71else
72noinst_LTLIBRARIES =
73endif
74
75if USE_CPPFLAG_CURL_STATICLIB
76AM_CPPFLAGS += -DCURL_STATICLIB
77endif
78
79AM_LDFLAGS =
80AM_CFLAGS =
81
82libhostname_la_CPPFLAGS_EXTRA =
83libhostname_la_LDFLAGS_EXTRA = -module -avoid-version -rpath /nowhere
84libhostname_la_CFLAGS_EXTRA =
85
86libstubgss_la_LDFLAGS_EXTRA =
87
88if CURL_LT_SHLIB_USE_NO_UNDEFINED
89libhostname_la_LDFLAGS_EXTRA += -no-undefined
90libstubgss_la_LDFLAGS_EXTRA += -no-undefined
91endif
92
93if CURL_LT_SHLIB_USE_MIMPURE_TEXT
94libhostname_la_LDFLAGS_EXTRA += -mimpure-text
95endif
96
97if DOING_CURL_SYMBOL_HIDING
98libhostname_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
99libhostname_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
100endif
101
102libhostname_la_CPPFLAGS = $(AM_CPPFLAGS) $(libhostname_la_CPPFLAGS_EXTRA)
103libhostname_la_LDFLAGS = $(AM_LDFLAGS) $(libhostname_la_LDFLAGS_EXTRA)
104libhostname_la_CFLAGS = $(AM_CFLAGS) $(libhostname_la_CFLAGS_EXTRA)
105
106libhostname_la_SOURCES = sethostname.c sethostname.h
107
108libhostname_la_LIBADD =
109libhostname_la_DEPENDENCIES =
110
111# Build a stub gssapi implementation for testing
112if BUILD_STUB_GSS
113noinst_LTLIBRARIES += libstubgss.la
114
115libstubgss_la_CPPFLAGS = $(AM_CPPFLAGS)
116libstubgss_la_LDFLAGS = $(AM_LDFLAGS) $(libstubgss_la_LDFLAGS_EXTRA) -avoid-version -rpath /nowhere
117libstubgss_la_CFLAGS = $(AM_CFLAGS) -g
118
119libstubgss_la_SOURCES = stub_gssapi.c stub_gssapi.h
120
121libstubgss_la_LIBADD =
122libstubgss_la_DEPENDENCIES =
123endif
124
125
126lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl $(top_srcdir)/include/curl/curl.h
127	@PERL@ $(top_srcdir)/tests/libtest/mk-lib1521.pl < $(top_srcdir)/include/curl/curl.h > lib1521.c
128
129CHECKSRC = $(CS_$(V))
130CS_0 = @echo "  RUN     " $@;
131CS_1 =
132CS_ = $(CS_0)
133
134checksrc:
135	$(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.[ch]
136
137if CURLDEBUG
138# for debug builds, we scan the sources on all regular make invokes
139all-local: checksrc
140endif
141