Skip to content

Commit

Permalink
[bugfix] Fix Makefile of javacard applets.
Browse files Browse the repository at this point in the history
  • Loading branch information
rben-dev committed May 17, 2019
1 parent 169acd9 commit 2d6d7ee
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,32 @@ all: applets
applet_auth:
rm -rf $(APPLET_SRC_PATH)/wookey/tmp/
mkdir -p $(APPLET_SRC_PATH)/wookey/tmp/
# Some cleanup
rm -f $(APPLET_SRC_PATH)/wookey/auth/Keys.java
# Auth
cp -r $(APPLET_SRC_PATH)/wookey/common $(APPLET_SRC_PATH)/wookey/tmp/common_auth
cp $(KEYS_DIR)/AUTH/AUTHKeys.java $(APPLET_SRC_PATH)/wookey/tmp/common_auth/Keys.java
sed -i '1 i\package wookey_auth;' $(APPLET_SRC_PATH)/wookey/tmp/common_auth/*.java
cp $(KEYS_DIR)/AUTH/AUTHKeys.java $(APPLET_SRC_PATH)/wookey/tmp/common_auth/Keys.java
cd $(APPLET_PATH) && ant build_auth;
rm -rf $(APPLET_SRC_PATH)/wookey/tmp/

applet_dfu:
rm -rf $(APPLET_SRC_PATH)/wookey/tmp/
mkdir -p $(APPLET_SRC_PATH)/wookey/tmp/
# Some cleanup
rm -f $(APPLET_SRC_PATH)/wookey/dfu/Keys.java
# DFU
cp -r $(APPLET_SRC_PATH)/wookey/common $(APPLET_SRC_PATH)/wookey/tmp/common_dfu
cp $(KEYS_DIR)/DFU/DFUKeys.java $(APPLET_SRC_PATH)/wookey/tmp/common_dfu/Keys.java
sed -i '1 i\package wookey_dfu;' $(APPLET_SRC_PATH)/wookey/tmp/common_dfu/*.java
cp $(KEYS_DIR)/DFU/DFUKeys.java $(APPLET_SRC_PATH)/wookey/tmp/common_dfu/Keys.java
cd $(APPLET_PATH) && ant build_dfu;
rm -rf $(APPLET_SRC_PATH)/wookey/tmp/

applet_sig:
rm -rf $(APPLET_SRC_PATH)/wookey/tmp/
mkdir -p $(APPLET_SRC_PATH)/wookey/tmp/
# Some cleanup
rm -f $(APPLET_SRC_PATH)/wookey/sig/Keys.java
# SIG
# NOTE: SIG token being optional, we check for the need to compile it
if [ -f $(KEYS_DIR)/SIG/SIGKeys.java ]; then \
cp -r $(APPLET_SRC_PATH)/wookey/common $(APPLET_SRC_PATH)/wookey/tmp/common_sig; \
cp $(KEYS_DIR)/SIG/SIGKeys.java $(APPLET_SRC_PATH)/wookey/tmp/common_sig/Keys.java \
sed -i '1 i\package wookey_sig;' $(APPLET_SRC_PATH)/wookey/tmp/common_sig/*java; \
cp $(KEYS_DIR)/SIG/SIGKeys.java $(APPLET_SRC_PATH)/wookey/tmp/common_sig/Keys.java; \
cd $(APPLET_PATH) && ant build_sig; \
fi;
rm -rf $(APPLET_SRC_PATH)/wookey/tmp/
Expand Down

0 comments on commit 2d6d7ee

Please sign in to comment.