Add link-library variable to Makefiles (GH #866)
This should help distros and Crypto++ test scriptspull/867/head
parent
5957b19fb8
commit
52ad132134
|
|
@ -14,6 +14,11 @@ TMPDIR ?= /tmp
|
|||
TOUT ?= a.out
|
||||
TOUT := $(strip $(TOUT))
|
||||
|
||||
# Allow override for the cryptest.exe recipe. Change to
|
||||
# ./libcryptopp.so or ./libcryptopp.dylib to suit your
|
||||
# taste. https://github.com/weidai11/cryptopp/issues/866
|
||||
LINK_LIBRARY ?= ./libcryptopp.a
|
||||
|
||||
# Command and arguments
|
||||
AR ?= ar
|
||||
ARFLAGS ?= -cr # ar needs the dash on OpenBSD
|
||||
|
|
@ -1320,8 +1325,8 @@ endif
|
|||
libcryptopp.dylib: $(LIBOBJS)
|
||||
$(CXX) -dynamiclib -o $@ $(strip $(CXXFLAGS)) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" -headerpad_max_install_names $(LDFLAGS) $(LIBOBJS)
|
||||
|
||||
cryptest.exe:libcryptopp.a $(TESTOBJS)
|
||||
$(CXX) -o $@ $(strip $(CXXFLAGS)) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
|
||||
cryptest.exe: $(LINK_LIBRARY) $(TESTOBJS)
|
||||
$(CXX) -o $@ $(strip $(CXXFLAGS)) $(TESTOBJS) $(LINK_LIBRARY) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
# Makes it faster to test changes
|
||||
nolib: $(OBJS)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ FP_ABI ?= hard
|
|||
TOUT ?= a.out
|
||||
TOUT := $(strip $(TOUT))
|
||||
|
||||
# Allow override for the cryptest.exe recipe. Change to
|
||||
# ./libcryptopp.so or ./libcryptopp.dylib to suit your
|
||||
# taste. https://github.com/weidai11/cryptopp/issues/866
|
||||
LINK_LIBRARY ?= ./libcryptopp.a
|
||||
|
||||
# Default CXXFLAGS if none were provided
|
||||
CXXFLAGS ?= -DNDEBUG -g2 -O3 -fPIC -pipe
|
||||
|
||||
|
|
@ -787,8 +792,8 @@ endif
|
|||
libcryptopp.dylib: $(LIBOBJS) $(AOSP_CPU_OBJ)
|
||||
$(CXX) -dynamiclib -o $@ $(strip $(CXXFLAGS)) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" -headerpad_max_install_names $(LDFLAGS) $(LIBOBJS) $(AOSP_CPU_OBJ)
|
||||
|
||||
cryptest.exe: libcryptopp.a $(TESTOBJS)
|
||||
$(CXX) -o $@ $(strip $(CXXFLAGS)) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
|
||||
cryptest.exe: $(LINK_LIBRARY) $(TESTOBJS)
|
||||
$(CXX) -o $@ $(strip $(CXXFLAGS)) $(TESTOBJS) $(LINK_LIBRARY) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
# Used to generate list of source files for Autotools, CMakeList and Android.mk
|
||||
.PHONY: sources
|
||||
|
|
|
|||
Loading…
Reference in New Issue