summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2018-11-28 20:47:51 +0100
committerChristian Pointner <equinox@spreadspace.org>2018-11-28 20:47:51 +0100
commitcd63149204c36b677c3175da8aab16ae43966b92 (patch)
tree7cc692c4c9fb2f121b30108cbed0d0026c0ea1ec
parentadded usb-crypto example (diff)
rename external lib crypto to rweather-crypto
-rw-r--r--.gitignore4
-rw-r--r--contrib/Makefile14
-rw-r--r--include.mk28
-rw-r--r--rweather-crypto.mk (renamed from crypto.mk)12
-rw-r--r--usb-crypto/Makefile4
5 files changed, 31 insertions, 31 deletions
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/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/crypto.mk b/rweather-crypto.mk
index f35102d..1d39ecc 100644
--- a/crypto.mk
+++ b/rweather-crypto.mk
@@ -22,22 +22,22 @@
include $(SPREADAVR_PATH)/defines.mk
-SRC:=$(wildcard $(CRYPTO_PATH)/libraries/Crypto/*.cpp)
+SRC:=$(wildcard $(RWEATHER_CRYPTO_PATH)/libraries/Crypto/*.cpp)
DEPLIBS := stdc++-minimal
-CXXFLAGS += -I$(CRYPTO_PATH)/libraries/Crypto
-CXXFLAGS += $(CRYPTO_OPTS)
+CXXFLAGS += -I$(RWEATHER_CRYPTO_PATH)/libraries/Crypto
+CXXFLAGS += $(RWEATHER_CRYPTO_OPTS)
OBJ = $(SRC:%.cpp=%.o)
-OBJ_DEPLIB = $(DEPLIBS:%=deplib-crypto--%.o)
+OBJ_DEPLIB = $(DEPLIBS:%=deplib-rweather-crypto--%.o)
-libcrypto.a: $(OBJ) $(OBJ_DEPLIB)
+librweather-crypto.a: $(OBJ) $(OBJ_DEPLIB)
$(AR) $@ $(OBJ) $(OBJ_DEPLIB)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $< -o $@
-deplib-crypto--%.o: $(LIB_DIR)/%.cpp
+deplib-rweather-crypto--%.o: $(LIB_DIR)/%.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
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