comparison libtomcrypt/makefile_include.mk @ 1739:13d834efc376 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Thu, 15 Oct 2020 19:55:15 +0800
parents e9dba7abd939
children
comparison
equal deleted inserted replaced
1562:768ebf737aa0 1739:13d834efc376
1 # 1 #
2 # Include makefile used by makefile + makefile.shared 2 # Include makefile used by makefile + makefile.shared
3 # (GNU make only) 3 # (GNU make only)
4 4
5 # The version - BEWARE: VERSION, VERSION_PC and VERSION_LT are updated via ./updatemakes.sh 5 # The version - BEWARE: VERSION, VERSION_PC and VERSION_LT are updated via ./updatemakes.sh
6 VERSION=1.18.1 6 VERSION=1.18.2
7 VERSION_PC=1.18.1 7 VERSION_PC=1.18.2
8 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html 8 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
9 VERSION_LT=1:1 9 VERSION_LT=1:1
10 10
11 # Compiler and Linker Names 11 # Compiler and Linker Names
12 ifndef CROSS_COMPILE 12 ifndef CROSS_COMPILE
13 CROSS_COMPILE:= 13 CROSS_COMPILE:=
14 endif 14 endif
15 15
16 ifeq ($(CC),cc) 16 # We only need to go through this dance of determining the right compiler if we're using
17 # cross compilation, otherwise $(CC) is fine as-is.
18 ifneq (,$(CROSS_COMPILE))
19 ifeq ($(origin CC),default)
20 CSTR := "\#ifdef __clang__\nCLANG\n\#endif\n"
21 ifeq ($(PLATFORM),FreeBSD)
22 # XXX: FreeBSD needs extra escaping for some reason
23 CSTR := $$$(CSTR)
24 endif
25 ifneq (,$(shell echo $(CSTR) | $(CC) -E - | grep CLANG))
26 CC := $(CROSS_COMPILE)clang
27 else
17 CC := $(CROSS_COMPILE)gcc 28 CC := $(CROSS_COMPILE)gcc
18 endif 29 endif # Clang
30 endif # cc is Make's default
31 endif # CROSS_COMPILE non-empty
32
19 LD:=$(CROSS_COMPILE)ld 33 LD:=$(CROSS_COMPILE)ld
20 AR:=$(CROSS_COMPILE)ar 34 AR:=$(CROSS_COMPILE)ar
21 35
22 # Archiver [makes .a files] 36 # Archiver [makes .a files]
23 #AR=ar 37 #AR=ar
24 ARFLAGS:=r 38 ARFLAGS:=r
25 39
26 ifndef MAKE 40 ifndef MAKE
27 MAKE:=make 41 # BSDs refer to GNU Make as gmake
42 ifneq (,$(findstring $(PLATFORM),FreeBSD OpenBSD DragonFly NetBSD))
43 MAKE=gmake
44 else
45 MAKE=make
46 endif
28 endif 47 endif
29 48
30 ifndef INSTALL_CMD 49 ifndef INSTALL_CMD
31 $(error your makefile must define INSTALL_CMD) 50 $(error your makefile must define INSTALL_CMD)
32 endif 51 endif
387 406
388 doc/crypt.pdf: $(call print-help,doc/crypt.pdf,Builds the Developer Manual) 407 doc/crypt.pdf: $(call print-help,doc/crypt.pdf,Builds the Developer Manual)
389 $(MAKE) -C doc/ crypt.pdf V=$(V) 408 $(MAKE) -C doc/ crypt.pdf V=$(V)
390 409
391 410
392 install_all: $(call print-help,install_all,Install everything - library bins docs tests) install install_bins install_docs install_test 411 install_all: $(call print-help,install_all,Install everything - library bins docs tests) install install_bins install_docs
393 412
394 INSTALL_OPTS ?= -m 644 413 INSTALL_OPTS ?= -m 644
395 414
396 .common_install: $(LIBNAME) 415 .common_install: $(LIBNAME)
397 install -p -d $(DESTDIR)$(INCPATH) 416 install -p -d $(DESTDIR)$(INCPATH)