xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | #*************************************************************************** |
| 2 | # _ _ ____ _ |
| 3 | # Project ___| | | | _ \| | |
| 4 | # / __| | | | |_) | | |
| 5 | # | (__| |_| | _ <| |___ |
| 6 | # \___|\___/|_| \_\_____| |
| 7 | # |
| 8 | # Copyright (C) 1998 - 2022, 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 | ########################################################################### |
| 24 | AUTOMAKE_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 | |
| 35 | AM_CPPFLAGS = -I$(top_srcdir)/include \ |
| 36 | -I$(top_builddir)/lib \ |
| 37 | -I$(top_srcdir)/lib |
| 38 | |
| 39 | EXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl test1022.pl \ |
| 40 | Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl .checksrc |
| 41 | |
| 42 | CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ |
| 43 | |
| 44 | CFLAGS += @CURL_CFLAG_EXTRAS@ |
| 45 | |
| 46 | CLEANFILES = lib1521.c |
| 47 | |
| 48 | # Prevent LIBS from being used for all link targets |
| 49 | LIBS = $(BLANK_AT_MAKETIME) |
| 50 | |
| 51 | if USE_EXPLICIT_LIB_DEPS |
| 52 | SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@ |
| 53 | TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@ |
| 54 | else |
| 55 | SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@ @NSS_LIBS@ |
| 56 | TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@ @NSS_LIBS@ |
| 57 | endif |
| 58 | |
| 59 | # Dependencies (may need to be overridden) |
| 60 | LDADD = $(SUPPORTFILES_LIBS) |
| 61 | |
| 62 | # Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES, |
| 63 | # noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS) |
| 64 | include Makefile.inc |
| 65 | |
| 66 | # Preloading of libhostname allows host name overriding, |
| 67 | # this is used to make some tests machine independent. |
| 68 | |
| 69 | if BUILD_LIBHOSTNAME |
| 70 | noinst_LTLIBRARIES = libhostname.la |
| 71 | else |
| 72 | noinst_LTLIBRARIES = |
| 73 | endif |
| 74 | |
| 75 | if USE_CPPFLAG_CURL_STATICLIB |
| 76 | AM_CPPFLAGS += -DCURL_STATICLIB |
| 77 | endif |
| 78 | |
| 79 | AM_LDFLAGS = |
| 80 | AM_CFLAGS = |
| 81 | |
| 82 | libhostname_la_CPPFLAGS_EXTRA = |
| 83 | libhostname_la_LDFLAGS_EXTRA = -module -avoid-version -rpath /nowhere |
| 84 | libhostname_la_CFLAGS_EXTRA = |
| 85 | |
| 86 | libstubgss_la_LDFLAGS_EXTRA = |
| 87 | |
| 88 | if CURL_LT_SHLIB_USE_NO_UNDEFINED |
| 89 | libhostname_la_LDFLAGS_EXTRA += -no-undefined |
| 90 | libstubgss_la_LDFLAGS_EXTRA += -no-undefined |
| 91 | endif |
| 92 | |
| 93 | if CURL_LT_SHLIB_USE_MIMPURE_TEXT |
| 94 | libhostname_la_LDFLAGS_EXTRA += -mimpure-text |
| 95 | endif |
| 96 | |
| 97 | if DOING_CURL_SYMBOL_HIDING |
| 98 | libhostname_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS |
| 99 | libhostname_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING) |
| 100 | endif |
| 101 | |
| 102 | libhostname_la_CPPFLAGS = $(AM_CPPFLAGS) $(libhostname_la_CPPFLAGS_EXTRA) |
| 103 | libhostname_la_LDFLAGS = $(AM_LDFLAGS) $(libhostname_la_LDFLAGS_EXTRA) |
| 104 | libhostname_la_CFLAGS = $(AM_CFLAGS) $(libhostname_la_CFLAGS_EXTRA) |
| 105 | |
| 106 | libhostname_la_SOURCES = sethostname.c sethostname.h |
| 107 | |
| 108 | libhostname_la_LIBADD = |
| 109 | libhostname_la_DEPENDENCIES = |
| 110 | |
| 111 | # Build a stub gssapi implementation for testing |
| 112 | if BUILD_STUB_GSS |
| 113 | noinst_LTLIBRARIES += libstubgss.la |
| 114 | |
| 115 | libstubgss_la_CPPFLAGS = $(AM_CPPFLAGS) |
| 116 | libstubgss_la_LDFLAGS = $(AM_LDFLAGS) $(libstubgss_la_LDFLAGS_EXTRA) -avoid-version -rpath /nowhere |
| 117 | libstubgss_la_CFLAGS = $(AM_CFLAGS) -g |
| 118 | |
| 119 | libstubgss_la_SOURCES = stub_gssapi.c stub_gssapi.h |
| 120 | |
| 121 | libstubgss_la_LIBADD = |
| 122 | libstubgss_la_DEPENDENCIES = |
| 123 | endif |
| 124 | |
| 125 | |
| 126 | lib1521.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 | |
| 129 | CHECKSRC = $(CS_$(V)) |
| 130 | CS_0 = @echo " RUN " $@; |
| 131 | CS_1 = |
| 132 | CS_ = $(CS_0) |
| 133 | |
| 134 | checksrc: |
| 135 | $(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.[ch] |
| 136 | |
| 137 | if CURLDEBUG |
| 138 | # for debug builds, we scan the sources on all regular make invokes |
| 139 | all-local: checksrc |
| 140 | endif |