quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

Makefile.am (5968B)


      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 ###########################################################################
     24 AUTOMAKE_OPTIONS = foreign nostdinc
     25 
     26 # Get CSOURCES, HHEADERS, LIB_RCFILES variables
     27 include Makefile.inc
     28 
     29 CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
     30 
     31 CHECKSRC_DIST = .checksrc \
     32   curlx/.checksrc vauth/.checksrc vquic/.checksrc vssh/.checksrc vtls/.checksrc
     33 
     34 EXTRA_DIST = config-mac.h config-os400.h config-plan9.h config-riscos.h \
     35   config-win32.h curl_config.h.in $(LIB_RCFILES) libcurl.def            \
     36   $(CMAKE_DIST) Makefile.soname optiontable.pl $(CHECKSRC_DIST)
     37 
     38 lib_LTLIBRARIES = libcurl.la
     39 
     40 if BUILD_UNITTESTS
     41 noinst_LTLIBRARIES = libcurlu.la
     42 
     43 # generate a file with "private" prototypes for unit testing
     44 UNITPROTOS = unitprotos.h
     45 
     46 else
     47 noinst_LTLIBRARIES =
     48 endif
     49 
     50 # This might hold -Werror
     51 CFLAGS += @CURL_CFLAG_EXTRAS@
     52 
     53 # Specify our include paths here, and do it relative to $(top_srcdir) and
     54 # $(top_builddir), to ensure that these paths which belong to the library
     55 # being currently built and tested are searched before the library which
     56 # might possibly already be installed in the system.
     57 #
     58 # $(top_srcdir)/include is for libcurl's external include files
     59 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
     60 # $(srcdir) for the generated unity source to find included sources
     61 
     62 AM_CPPFLAGS = -I$(top_srcdir)/include   \
     63               -I$(top_builddir)/lib     \
     64               -I$(srcdir)
     65 
     66 # Prevent LIBS from being used for all link targets
     67 LIBS = $(BLANK_AT_MAKETIME)
     68 
     69 AM_CPPFLAGS += -DBUILDING_LIBCURL
     70 AM_LDFLAGS =
     71 AM_CFLAGS =
     72 if DEBUGBUILD
     73 AM_CPPFLAGS += -DDEBUGBUILD
     74 endif
     75 if CURLDEBUG
     76 AM_CPPFLAGS += -DCURLDEBUG
     77 endif
     78 
     79 if DOING_NATIVE_WINDOWS
     80 CSOURCES += dllmain.c
     81 endif
     82 
     83 if USE_UNITY
     84 libcurl_unity.c: $(top_srcdir)/scripts/mk-unity.pl $(CSOURCES)
     85 	@PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(CSOURCES) > libcurl_unity.c
     86 
     87 nodist_libcurl_la_SOURCES = libcurl_unity.c
     88 libcurl_la_SOURCES =
     89 nodist_libcurlu_la_SOURCES = libcurl_unity.c
     90 libcurlu_la_SOURCES =
     91 CLEANFILES = libcurl_unity.c
     92 else
     93 libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
     94 libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
     95 CLEANFILES =
     96 endif
     97 
     98 CLEANFILES += $(UNITPROTOS)
     99 
    100 libcurl_la_CPPFLAGS_EXTRA =
    101 libcurl_la_LDFLAGS_EXTRA =
    102 libcurl_la_CFLAGS_EXTRA =
    103 
    104 if CURL_LT_SHLIB_USE_VERSION_INFO
    105 # Get VERSIONCHANGE, VERSIONADD, VERSIONDEL, VERSIONINFO variables
    106 include Makefile.soname
    107 libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO)
    108 endif
    109 
    110 if CURL_LT_SHLIB_USE_NO_UNDEFINED
    111 libcurl_la_LDFLAGS_EXTRA += -no-undefined
    112 endif
    113 
    114 if CURL_LT_SHLIB_USE_MIMPURE_TEXT
    115 libcurl_la_LDFLAGS_EXTRA += -mimpure-text
    116 endif
    117 
    118 if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS
    119 libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
    120 else
    121 # if symbol-hiding is enabled, hide them!
    122 if DOING_CURL_SYMBOL_HIDING
    123 libcurl_la_LDFLAGS_EXTRA += -export-symbols-regex '^curl_.*'
    124 endif
    125 endif
    126 
    127 if USE_CPPFLAG_CURL_STATICLIB
    128 libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
    129 else
    130 if HAVE_WINDRES
    131 libcurl_la_SOURCES += $(LIB_RCFILES)
    132 $(LIB_RCFILES): $(top_srcdir)/include/curl/curlver.h
    133 endif
    134 endif
    135 
    136 if DOING_CURL_SYMBOL_HIDING
    137 libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
    138 libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
    139 endif
    140 
    141 libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
    142 libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(CURL_LDFLAGS_LIB) $(LIBCURL_PC_LIBS_PRIVATE)
    143 libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
    144 
    145 libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
    146 libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_PC_LIBS_PRIVATE)
    147 libcurlu_la_CFLAGS = $(AM_CFLAGS)
    148 
    149 CHECKSRC = $(CS_$(V))
    150 CS_0 = @echo "  RUN     " $@;
    151 CS_1 =
    152 CS_ = $(CS_0)
    153 
    154 checksrc:
    155 	$(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \
    156 	$(CSOURCES) $(HHEADERS))
    157 
    158 if NOT_CURL_CI
    159 if DEBUGBUILD
    160 # for debug builds, we scan the sources on all regular make invokes
    161 CHECKSOURCES = checksrc
    162 endif
    163 endif
    164 
    165 all-local: $(CHECKSOURCES) $(UNITPROTOS)
    166 
    167 UNIT_V = $(UNITV_$(V))
    168 UNITV_0 = @echo "  UNITPR  " $@;
    169 UNITV_1 =
    170 UNITV_ = $(UNITV_0)
    171 
    172 # UNITPROTOS depends on every C file in the lib/ dir
    173 $(UNITPROTOS): $(CSOURCES)
    174 	$(UNIT_V)(cd $(srcdir) && @PERL@ ../scripts/extract-unit-protos $(CSOURCES) > $(top_builddir)/lib/$(UNITPROTOS))
    175 
    176 # disable the tests that are mostly causing false positives
    177 TIDYFLAGS := -checks=-clang-analyzer-security.insecureAPI.bzero,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling -quiet
    178 if CURL_WERROR
    179 TIDYFLAGS += --warnings-as-errors=*
    180 endif
    181 
    182 TIDY := clang-tidy
    183 
    184 tidy:
    185 	(_csources=`echo ' $(CSOURCES)' | sed -E -e 's/ +$$//' -e 's/ +/ /g' -e 's| | $(srcdir)/|g'`; \
    186 	$(TIDY) $$_csources $(TIDYFLAGS) $(CURL_CLANG_TIDYFLAGS) -- $(AM_CPPFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H)
    187 
    188 optiontable:
    189 	@PERL@ $(srcdir)/optiontable.pl < $(top_srcdir)/include/curl/curl.h > $(srcdir)/easyoptions.c
    190 
    191 if HAVE_WINDRES
    192 .rc.lo:
    193 	$(LIBTOOL) --tag=RC --mode=compile $(RC) -I$(top_srcdir)/include $(RCFLAGS) -i $< -o $@
    194 endif