1 | #***************************************************************************
|
---|
2 | # _ _ ____ _
|
---|
3 | # Project ___| | | | _ \| |
|
---|
4 | # / __| | | | |_) | |
|
---|
5 | # | (__| |_| | _ <| |___
|
---|
6 | # \___|\___/|_| \_\_____|
|
---|
7 | #
|
---|
8 | # Copyright (C) 1998 - 2022, Daniel Stenberg, <[email protected]>, 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 | ###########################################################################
|
---|
22 | AUTOMAKE_OPTIONS = foreign nostdinc
|
---|
23 |
|
---|
24 | CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
|
---|
25 |
|
---|
26 | EXTRA_DIST = Makefile.m32 config-win32.h config-win32ce.h config-plan9.h \
|
---|
27 | config-riscos.h config-mac.h curl_config.h.in makefile.dj config-dos.h \
|
---|
28 | libcurl.plist libcurl.rc config-amigaos.h makefile.amiga config-win32ce.h \
|
---|
29 | config-os400.h setup-os400.h $(CMAKE_DIST) setup-win32.h .checksrc
|
---|
30 |
|
---|
31 | lib_LTLIBRARIES = libcurl.la
|
---|
32 |
|
---|
33 | if BUILD_UNITTESTS
|
---|
34 | noinst_LTLIBRARIES = libcurlu.la
|
---|
35 | else
|
---|
36 | noinst_LTLIBRARIES =
|
---|
37 | endif
|
---|
38 |
|
---|
39 | # This might hold -Werror
|
---|
40 | CFLAGS += @CURL_CFLAG_EXTRAS@
|
---|
41 |
|
---|
42 | # Specify our include paths here, and do it relative to $(top_srcdir) and
|
---|
43 | # $(top_builddir), to ensure that these paths which belong to the library
|
---|
44 | # being currently built and tested are searched before the library which
|
---|
45 | # might possibly already be installed in the system.
|
---|
46 | #
|
---|
47 | # $(top_srcdir)/include is for libcurl's external include files
|
---|
48 | # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
|
---|
49 | # $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files
|
---|
50 |
|
---|
51 | AM_CPPFLAGS = -I$(top_srcdir)/include \
|
---|
52 | -I$(top_builddir)/lib \
|
---|
53 | -I$(top_srcdir)/lib
|
---|
54 |
|
---|
55 | # Prevent LIBS from being used for all link targets
|
---|
56 | LIBS = $(BLANK_AT_MAKETIME)
|
---|
57 |
|
---|
58 | VERSIONINFO=-version-info 12:0:8
|
---|
59 | # This flag accepts an argument of the form current[:revision[:age]]. So,
|
---|
60 | # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
|
---|
61 | # 1.
|
---|
62 | #
|
---|
63 | # Here's the simplified rule guide on how to change -version-info:
|
---|
64 | # (current version is C:R:A)
|
---|
65 | #
|
---|
66 | # 1. if there are only source changes, use C:R+1:A
|
---|
67 | # 2. if interfaces were added use C+1:0:A+1
|
---|
68 | # 3. if interfaces were removed, then use C+1:0:0
|
---|
69 | #
|
---|
70 | # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
|
---|
71 |
|
---|
72 | AM_CPPFLAGS += -DBUILDING_LIBCURL
|
---|
73 | AM_LDFLAGS =
|
---|
74 | AM_CFLAGS =
|
---|
75 |
|
---|
76 | libcurl_la_CPPFLAGS_EXTRA =
|
---|
77 | libcurl_la_LDFLAGS_EXTRA =
|
---|
78 | libcurl_la_CFLAGS_EXTRA =
|
---|
79 |
|
---|
80 | if CURL_LT_SHLIB_USE_VERSION_INFO
|
---|
81 | libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO)
|
---|
82 | endif
|
---|
83 |
|
---|
84 | if CURL_LT_SHLIB_USE_NO_UNDEFINED
|
---|
85 | libcurl_la_LDFLAGS_EXTRA += -no-undefined
|
---|
86 | endif
|
---|
87 |
|
---|
88 | if CURL_LT_SHLIB_USE_MIMPURE_TEXT
|
---|
89 | libcurl_la_LDFLAGS_EXTRA += -mimpure-text
|
---|
90 | endif
|
---|
91 |
|
---|
92 | if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS
|
---|
93 | libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
|
---|
94 | else
|
---|
95 | # if symbol-hiding is enabled, hide them!
|
---|
96 | if DOING_CURL_SYMBOL_HIDING
|
---|
97 | libcurl_la_LDFLAGS_EXTRA += -export-symbols-regex '^curl_.*'
|
---|
98 | endif
|
---|
99 | endif
|
---|
100 |
|
---|
101 | if USE_CPPFLAG_CURL_STATICLIB
|
---|
102 | libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
|
---|
103 | endif
|
---|
104 |
|
---|
105 | if DOING_CURL_SYMBOL_HIDING
|
---|
106 | libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
|
---|
107 | libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
|
---|
108 | endif
|
---|
109 |
|
---|
110 | libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
|
---|
111 | libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
|
---|
112 | libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
|
---|
113 |
|
---|
114 | libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
|
---|
115 | libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS)
|
---|
116 | libcurlu_la_CFLAGS = $(AM_CFLAGS)
|
---|
117 |
|
---|
118 | # Makefile.inc provides the CSOURCES and HHEADERS defines
|
---|
119 | include Makefile.inc
|
---|
120 |
|
---|
121 | libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
|
---|
122 | libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
|
---|
123 |
|
---|
124 | CHECKSRC = $(CS_$(V))
|
---|
125 | CS_0 = @echo " RUN " $@;
|
---|
126 | CS_1 =
|
---|
127 | CS_ = $(CS_0)
|
---|
128 |
|
---|
129 | checksrc:
|
---|
130 | $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \
|
---|
131 | -W$(srcdir)/curl_config.h $(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] \
|
---|
132 | $(srcdir)/vtls/*.[ch] $(srcdir)/vquic/*.[ch] $(srcdir)/vssh/*.[ch])
|
---|
133 |
|
---|
134 | if CURLDEBUG
|
---|
135 | # for debug builds, we scan the sources on all regular make invokes
|
---|
136 | all-local: checksrc
|
---|
137 | endif
|
---|
138 |
|
---|
139 | # disable the tests that are mostly causing false positives
|
---|
140 | TIDYFLAGS=-checks=-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-valist.Uninitialized,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference -quiet
|
---|
141 |
|
---|
142 | TIDY:=clang-tidy
|
---|
143 |
|
---|
144 | tidy:
|
---|
145 | $(TIDY) $(CSOURCES) $(TIDYFLAGS) -- $(AM_CPPFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H
|
---|
146 |
|
---|
147 | optiontable:
|
---|
148 | perl optiontable.pl < $(top_srcdir)/include/curl/curl.h > easyoptions.c
|
---|