From cd63149204c36b677c3175da8aab16ae43966b92 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 28 Nov 2018 20:47:51 +0100 Subject: rename external lib crypto to rweather-crypto --- .gitignore | 4 ++-- contrib/Makefile | 14 +++++++------- crypto.mk | 44 -------------------------------------------- include.mk | 28 ++++++++++++++-------------- rweather-crypto.mk | 44 ++++++++++++++++++++++++++++++++++++++++++++ usb-crypto/Makefile | 4 ++-- 6 files changed, 69 insertions(+), 69 deletions(-) delete mode 100644 crypto.mk create mode 100644 rweather-crypto.mk diff --git a/.gitignore b/.gitignore index 2d3a6f2..69a5435 100644 --- a/.gitignore +++ b/.gitignore @@ -13,8 +13,8 @@ contrib/BMP180-* contrib/vusb-* contrib/RadioHead-* contrib/RadioHead/ -contrib/.crypto.prepared -contrib/crypto +contrib/.rweather-crypto.prepared +contrib/rweather-crypto contrib/.teensy-loader.prepared contrib/teensy_loader_cli contrib/.micronucleus.prepared diff --git a/contrib/Makefile b/contrib/Makefile index eb86305..37eba4f 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -28,8 +28,8 @@ PJON_VERSION := 3.0 VUSB_VERSION := 20121206 RADIOHEAD_VERSION := 1.89 -all: download-lufa download-fastled download-pjon download-vusb download-radiohead clone-crypto clone-teensy-loader clone-micronucleus -update-all: update-crypto update-teensy-loader update-micronucleus +all: download-lufa download-fastled download-pjon download-vusb download-radiohead clone-rweather-crypto clone-teensy-loader clone-micronucleus +update-all: update-rweather-crypto update-teensy-loader update-micronucleus download-lufa: LUFA-${LUFA_VERSION}.zip @@ -68,14 +68,14 @@ RadioHead-${RADIOHEAD_VERSION}.zip: cd RadioHead; patch -p1 < ../radiohead.patch -.crypto.prepared: - git clone https://github.com/rweather/arduinolibs.git crypto +.rweather-crypto.prepared: + git clone https://github.com/rweather/arduinolibs.git rweather-crypto touch $@ -clone-crypto: .crypto.prepared +clone-rweather-crypto: .rweather-crypto.prepared -update-crypto: .crypto.prepared - cd crypto; git pull +update-rweather-crypto: .rweather-crypto.prepared + cd rweather-crypto; git pull .teensy-loader.prepared: diff --git a/crypto.mk b/crypto.mk deleted file mode 100644 index f35102d..0000000 --- a/crypto.mk +++ /dev/null @@ -1,44 +0,0 @@ -## -## spreadspace avr utils -## -## -## Copyright (C) 2013-2016 Christian Pointner -## -## This file is part of spreadspace avr utils. -## -## spreadspace avr utils is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## any later version. -## -## spreadspace avr utils is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with spreadspace avr utils. If not, see . -## - -include $(SPREADAVR_PATH)/defines.mk - -SRC:=$(wildcard $(CRYPTO_PATH)/libraries/Crypto/*.cpp) -DEPLIBS := stdc++-minimal - -CXXFLAGS += -I$(CRYPTO_PATH)/libraries/Crypto -CXXFLAGS += $(CRYPTO_OPTS) - -OBJ = $(SRC:%.cpp=%.o) -OBJ_DEPLIB = $(DEPLIBS:%=deplib-crypto--%.o) - -libcrypto.a: $(OBJ) $(OBJ_DEPLIB) - $(AR) $@ $(OBJ) $(OBJ_DEPLIB) - -%.o: %.cpp - $(CXX) -c $(CXXFLAGS) $< -o $@ - -deplib-crypto--%.o: $(LIB_DIR)/%.cpp - $(CXX) $(CXXFLAGS) -c $< -o $@ - -clean: - rm -f $(SRC:%.cpp=%.o) $(OBJ_DEPLIB) diff --git a/include.mk b/include.mk index b1e3e0d..5c14178 100644 --- a/include.mk +++ b/include.mk @@ -41,7 +41,7 @@ CXX_OBJ_LIB := $(CXX_LIBS:%=lib-%.o) CXX_SRC_LIB := $(CXX_LIBS:%=$(LIB_DIR)/%.cpp) CXX_DEP_LIB := $(CXX_LIBS:%=lib-%.d) -.PHONY: prepare clean clean-external distclean clean-lufa clean-fastled clean-pjon clean-vusb clean-radiohead clean-crypto program erase flash reset run +.PHONY: prepare clean clean-external distclean clean-lufa clean-fastled clean-pjon clean-vusb clean-radiohead clean-rweather-crypto program erase flash reset run ELFFILE := $(NAME).elf HEXFILE := $(NAME).hex @@ -89,10 +89,10 @@ CXXFLAGS += -DRH_PLATFORM=RH_PLATFORM_GENERIC_AVR8 CXXFLAGS += $(RADIOHEAD_OPTS) endif -ifdef CRYPTO_PATH -CXXFLAGS += -I$(CRYPTO_PATH)/libraries/Crypto -CXXFLAGS += -DUSES_CRYPTO -CXXFLAGS += $(CRYPTO_OPTS) +ifdef RWEATHER_CRYPTO_PATH +CXXFLAGS += -I$(RWEATHER_CRYPTO_PATH)/libraries/Crypto +CXXFLAGS += -DUSES_RWEATHER_CRYPTO +CXXFLAGS += $(RWEATHER_CRYPTO_OPTS) endif prepare: $(EXTERNAL_LIBS:%=build-%) @@ -215,25 +215,25 @@ clean-radiohead: @echo "****************************************************" -build-crypto: libcrypto.a +build-rweather-crypto: librweather-crypto.a -libcrypto.a: Makefile +librweather-crypto.a: Makefile @echo "" @echo "****************************************************" - @echo "building external crypto lib ($(CRYPTO_PATH))" + @echo "building external rweather/crypto lib ($(RWEATHER_CRYPTO_PATH))" @echo "" - make -f $(SPREADAVR_PATH)/crypto.mk libcrypto.a - make -f $(SPREADAVR_PATH)/crypto.mk clean + make -f $(SPREADAVR_PATH)/rweather-crypto.mk librweather-crypto.a + make -f $(SPREADAVR_PATH)/rweather-crypto.mk clean @echo "" @echo "****************************************************" -clean-crypto: +clean-rweather-crypto: @echo "" @echo "****************************************************" - @echo "cleaning external crypto lib ($(CRYPTO_PATH))" + @echo "cleaning external rweather/crypto lib ($(RWEATHER_CRYPTO_PATH))" @echo "" - make -f $(SPREADAVR_PATH)/crypto.mk clean - rm -f libcrypto.a + make -f $(SPREADAVR_PATH)/rweather-crypto.mk clean + rm -f librweather-crypto.a @echo "" @echo "****************************************************" diff --git a/rweather-crypto.mk b/rweather-crypto.mk new file mode 100644 index 0000000..1d39ecc --- /dev/null +++ b/rweather-crypto.mk @@ -0,0 +1,44 @@ +## +## spreadspace avr utils +## +## +## Copyright (C) 2013-2016 Christian Pointner +## +## This file is part of spreadspace avr utils. +## +## spreadspace avr utils is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## any later version. +## +## spreadspace avr utils is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with spreadspace avr utils. If not, see . +## + +include $(SPREADAVR_PATH)/defines.mk + +SRC:=$(wildcard $(RWEATHER_CRYPTO_PATH)/libraries/Crypto/*.cpp) +DEPLIBS := stdc++-minimal + +CXXFLAGS += -I$(RWEATHER_CRYPTO_PATH)/libraries/Crypto +CXXFLAGS += $(RWEATHER_CRYPTO_OPTS) + +OBJ = $(SRC:%.cpp=%.o) +OBJ_DEPLIB = $(DEPLIBS:%=deplib-rweather-crypto--%.o) + +librweather-crypto.a: $(OBJ) $(OBJ_DEPLIB) + $(AR) $@ $(OBJ) $(OBJ_DEPLIB) + +%.o: %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +deplib-rweather-crypto--%.o: $(LIB_DIR)/%.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(SRC:%.cpp=%.o) $(OBJ_DEPLIB) diff --git a/usb-crypto/Makefile b/usb-crypto/Makefile index d6e6444..bae846a 100644 --- a/usb-crypto/Makefile +++ b/usb-crypto/Makefile @@ -24,7 +24,7 @@ NAME := usb-crypto BOARD_TYPE := teensy2 CXX_OBJ := $(NAME).o LIBS := util led lufa-descriptor-usbserial usbio -EXTERNAL_LIBS := lufa crypto +EXTERNAL_LIBS := lufa rweather-crypto SPREADAVR_PATH := .. RESET_FUNC := $(SPREADAVR_PATH)/tools/reset_lufa_cdc RESET_PARAM := 'r' @@ -45,7 +45,7 @@ LUFA_OPTS += -D USB_PRODUCT="L\"spreadspace usb-crypto example\"" LUFA_COMPONENTS := USB USBCLASS -CRYPTO_PATH := $(SPREADAVR_PATH)/contrib/crypto +RWEATHER_CRYPTO_PATH := $(SPREADAVR_PATH)/contrib/rweather-crypto include $(SPREADAVR_PATH)/include.mk -- cgit v1.2.3