status-lib/Makefile

187 lines
5.7 KiB
Makefile
Raw Permalink Normal View History

# Copyright (c) 2021 Status Research & Development GmbH. Licensed under
# either of:
# - Apache License, version 2.0
# - MIT license
# at your option. This file may not be copied, modified, or distributed except
# according to those terms.
SHELL := bash # the shell used internally by Make
# used inside the included makefiles
BUILD_SYSTEM_DIR := vendor/nimbus-build-system
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
.PHONY: \
all \
bottles \
clean \
deps \
libstatuslib \
status-go \
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
keycard-go \
update \
build_ctest \
ctest \
test
ifeq ($(NIM_PARAMS),)
# "variables.mk" was not included, so we update the submodules.
GIT_SUBMODULE_UPDATE := git submodule update --init --recursive
.DEFAULT:
+@ echo -e "Git submodules not found. Running '$(GIT_SUBMODULE_UPDATE)'.\n"; \
$(GIT_SUBMODULE_UPDATE); \
echo
# Now that the included *.mk files appeared, and are newer than this file, Make will restart itself:
# https://www.gnu.org/software/make/manual/make.html#Remaking-Makefiles
#
# After restarting, it will execute its original goal, so we don't have to start a child Make here
# with "$(MAKE) $(MAKECMDGOALS)". Isn't hidden control flow great?
else # "variables.mk" was included. Business as usual until the end of this file.
all: libstatuslib
# must be included after the default target
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
detected_OS := Windows
else
detected_OS := $(strip $(shell uname))
endif
ifeq ($(detected_OS),Darwin)
CFLAGS := -mmacosx-version-min=10.14
export CFLAGS
CGO_CFLAGS := -mmacosx-version-min=10.14
export CGO_CFLAGS
LIBSTATUS_EXT := dylib
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
LIBKEYCARD_EXT := dylib
MACOSX_DEPLOYMENT_TARGET := 10.14
export MACOSX_DEPLOYMENT_TARGET
else ifeq ($(detected_OS),Windows)
LIBSTATUS_EXT := dll
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
LIBKEYCARD_EXT := dll
else
LIBSTATUS_EXT := so
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
LIBKEYCARD_EXT := so
endif
# ifeq ($(detected_OS),Darwin)
# BOTTLES_DIR := $(shell pwd)/bottles
# BOTTLES := $(addprefix $(BOTTLES_DIR)/,openssl@1.1 pcre)
#
# $(BOTTLES): | $(BOTTLES_DIR)
# echo -e "\e[92mFetching:\e[39m $(notdir $@) bottle"
# ./scripts/fetch-brew-bottle.sh $(notdir $@)
#
# $(BOTTLES_DIR):
# echo -e "\e[92mUpdating:\e[39m macOS Homebrew"
# if [[ $$(stat -f %u /usr/local/var/homebrew) -ne "$${UID}" ]]; then \
# echo "Missing permissions to update Homebrew formulae!" >&2; \
# else \
# brew update >/dev/null; \
# mkdir -p $(BOTTLES_DIR); \
# fi
#
# bottles: $(BOTTLES)
# endif
deps: | deps-common bottles
update: | update-common
RELEASE ?= false
ifeq ($(RELEASE),false)
# We need `-d:debug` to get Nim's default stack traces
NIM_PARAMS += -d:debug
# Enable debugging symbols in DOtherSide, in case we need GDB backtraces
CFLAGS += -g
CXXFLAGS += -g
else
# Additional optimization flags for release builds are not included at present;
# adding them will involve refactoring config.nims in the root of this repo
NIM_PARAMS += -d:release
endif
NIM_PARAMS += --outdir:./build
STATUSGO := vendor/status-go/build/bin/libstatus.$(LIBSTATUS_EXT)
STATUSGO_LIBDIR := $(shell pwd)/$(shell dirname "$(STATUSGO)")
export STATUSGO
export STATUSGO_LIBDIR
export LIBSTATUS_EXT
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
KEYCARDGO := vendor/nim-keycard-go/go/keycard/build/libkeycard/libkeycard.$(LIBKEYCARD_EXT)
KEYCARDGO_LIBDIR := $(shell pwd)/$(shell dirname "$(KEYCARDGO)")
export KEYCARDGO
export KEYCARDGO_LIBDIR
export LIBKEYCARD_EXT
status-go: $(STATUSGO)
$(STATUSGO): | deps
echo -e $(BUILD_MSG) "status-go"
+ cd vendor/status-go && \
$(MAKE) statusgo-shared-library $(HANDLE_OUTPUT)
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
keycard-go: $(KEYCARDGO)
$(KEYCARDGO): | deps
echo -e $(BUILD_MSG) "keycard-go"
+ cd vendor/nim-keycard-go && \
$(MAKE) build-keycard-go $(HANDLE_OUTPUT)
LIBSTATUSLIB := build/$@.$(LIBSTATUS_EXT).0
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
libstatuslib: | $(STATUSGO) $(KEYCARDGO)
echo -e $(BUILD_MSG) "$@" && \
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
$(ENV_SCRIPT) nim c $(NIM_PARAMS) $(NIM_EXTRA_PARAMS) --passL:"-L$(STATUSGO_LIBDIR)" --passL:"-lstatus" --passL:"-L$(KEYCARDGO_LIBDIR)" --passL="-lkeycard" -o:build/$@.$(LIBSTATUS_EXT).0 -d:ssl --app:lib --noMain --header --nimcache:nimcache/libstatuslib statuslib.nim && \
rm -f build/$@.$(LIBSTATUS_EXT) && \
ln -s $@.$(LIBSTATUS_EXT).0 build/$@.so && \
cp nimcache/libstatuslib/*.h build/. && \
[[ $$? = 0 ]]
# libraries for dynamic linking of non-Nim objects
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
EXTRA_LIBS_DYNAMIC := -L"$(CURDIR)/build" -lstatuslib -lm -L"$(STATUSGO_LIBDIR)" -lstatus -L"$(KEYCARDGO_LIBDIR)" -lkeycard
build_ctest: | $(LIBSTATUSLIB) build deps
echo -e $(BUILD_MSG) "build/ctest" && \
$(CC) test/main.c -Wl,-rpath,'$$ORIGIN' -I./vendor/nimbus-build-system/vendor/Nim/lib $(EXTRA_LIBS_DYNAMIC) -g -o build/ctest
LD_LIBRARY_PATH_NIMBLE := $${LD_LIBRARY_PATH}
ifneq ($(detected_OS),Windows)
ifneq ($(detected_OS),Darwin)
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
LD_LIBRARY_PATH_NIMBLE := $(STATUSGO_LIBDIR):$(KEYCARDGO_LIBDIR):$(LD_LIBRARY_PATH_NIMBLE)
endif
endif
PATH_NIMBLE := $${PATH}
ifeq ($(detected_OS),Windows)
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
PATH_NIMBLE := $(STATUSGO_LIBDIR):$(KEYCARDGO_LIBDIR):$(PATH_NIMBLE)
endif
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
RUN_AFTER_BUILD ?= true
NIMBLE_ENV = \
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
RELEASE=$(RELEASE) \
RUN_AFTER_BUILD=$(RUN_AFTER_BUILD)
ifeq ($(detected_OS),Windows)
NIMBLE_ENV += PATH="$(PATH_NIMBLE)"
PCRE_LDFLAGS := -L$(shell cygpath -m /ucrt64/lib) -lpcre
NIMBLE_ENV += PCRE_LDFLAGS="$(PCRE_LDFLAGS)"
else ifneq ($(detected_OS),Darwin)
NIMBLE_ENV += LD_LIBRARY_PATH="$(LD_LIBRARY_PATH_NIMBLE)"
endif
ctest: | build_ctest
echo -e "Running ctest:" && \
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
LD_LIBRARY_PATH="$(STATUSGO_LIBDIR):$(KEYCARDGO_LIBDIR)" \
./build/ctest
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
test: | $(STATUSGO) $(KEYCARDGO)
$(NIMBLE_ENV) $(ENV_SCRIPT) nimble tests
clean: | clean-common
Keycard initial integration (#63) * add nim-keycard-go to makefile * fix keycard-go build * add keycard.nim * remove test make task * remove debug line from makefile * fix import keycard_go * add keycard-go to .PHONY * add keycard start/stop/select methods * use https url for submodule * add KeycardApplication info and return it from select * update nim-keycard-go version * fix select return type * actually return the result * update nim-keycard-go * add keycard methods to backend * add base/mock keycard backends * imports * export keycard methods in backend * update start/stop keycard implementation * add KeycardStarted signal * fix keycard started signal * rename to KeycardConnected signal * fix keycard signal renamed * add keycardgo in makefile tasks * add back build/.gitignore * fix .gitignore * fix .gitignore * Makefile: export keycard vars * add keycard lib to nimble file * use spaces instead of tabs in non-recipe sections of Makefile * use install_name_tool on libkeycard on macOS * in GHA ubuntu environment install libpcsclite-dev with apt at start of workflow * add Keycard exceptions * remove useless test * remove useless return * move keycard types to /types * reraise exception from status/keycard.nim * remove unused import * add keycard commands: opensecure channel, pair, verify pin, export key * fix last keycard commands * add exportKey params * update nim-keycard-go Co-authored-by: Michele Balistreri <michele@bitgamma.com> Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
2021-10-04 21:21:07 +00:00
rm -rf bin/* node_modules bottles/* pkg/* tmp/* $(STATUSGO) $(KEYCARDGO)
endif # "variables.mk" was not included