Oliver Smith | 04f2586 | 2020-02-19 12:16:01 +0100 | [diff] [blame] | 1 | SIMTOOLS_DIR = ../../sim-tools |
Oliver Smith | 537fba0 | 2020-02-19 12:12:52 +0100 | [diff] [blame] | 2 | |
| 3 | APPLET_AID = 0xd0:0x70:0x02:0xca:0x44:0x90:0x01:0x01 |
Oliver Smith | 7528b38 | 2020-02-21 08:43:25 +0100 | [diff] [blame] | 4 | APPLET_NAME = org.osmocom.IMSIPseudo.IMSIPseudo |
Oliver Smith | 537fba0 | 2020-02-19 12:12:52 +0100 | [diff] [blame] | 5 | PACKAGE_AID = 0xd0:0x70:0x02:0xCA:0x44:0x90:0x01 |
Oliver Smith | 7528b38 | 2020-02-21 08:43:25 +0100 | [diff] [blame] | 6 | PACKAGE_NAME = org.osmocom.IMSIPseudo |
Oliver Smith | 537fba0 | 2020-02-19 12:12:52 +0100 | [diff] [blame] | 7 | PACKAGE_VERSION = 1.0 |
| 8 | |
Neels Hofmeyr | ad4531a | 2020-02-25 03:19:26 +0100 | [diff] [blame] | 9 | SOURCES = \ |
| 10 | src/org/osmocom/IMSIPseudo/Bytes.java \ |
| 11 | src/org/osmocom/IMSIPseudo/MobileIdentity.java \ |
| 12 | src/org/osmocom/IMSIPseudo/IMSIPseudo.java \ |
| 13 | $(NULL) |
Neels Hofmeyr | d20f93a | 2020-02-24 22:42:22 +0100 | [diff] [blame] | 14 | |
Oliver Smith | c18064a | 2020-02-21 09:29:20 +0100 | [diff] [blame] | 15 | CAP_FILE = build/javacard/org/osmocom/IMSIPseudo/javacard/IMSIPseudo.cap |
Oliver Smith | 537fba0 | 2020-02-19 12:12:52 +0100 | [diff] [blame] | 16 | |
Neels Hofmeyr | c916b97 | 2020-02-24 22:51:21 +0100 | [diff] [blame] | 17 | include ./applet-project.mk |
Oliver Smith | c18064a | 2020-02-21 09:29:20 +0100 | [diff] [blame] | 18 | |
| 19 | flash: classes |
| 20 | $(eval MODULE_AID := $(shell echo $(APPLET_AID) | sed 's/0x//g' | sed 's/\://g')) |
| 21 | $(eval INSTANCE_AID := $(shell echo $(APPLET_AID) | sed 's/0x//g' | sed 's/\://g')) |
| 22 | . $$PWD/.sim-keys && $(SIMTOOLS_DIR)/bin/shadysim \ |
| 23 | --pcsc \ |
| 24 | -l $(CAP_FILE) \ |
| 25 | -i $(CAP_FILE) \ |
| 26 | --enable-sim-toolkit \ |
Oliver Smith | 799fe1d | 2020-02-24 15:20:55 +0100 | [diff] [blame] | 27 | --access-domain=00 \ |
Oliver Smith | c18064a | 2020-02-21 09:29:20 +0100 | [diff] [blame] | 28 | --module-aid $(MODULE_AID) \ |
| 29 | --instance-aid $(INSTANCE_AID) \ |
| 30 | --nonvolatile-memory-required 0100 \ |
| 31 | --volatile-memory-for-install 0100 \ |
| 32 | --max-menu-entry-text 21 \ |
| 33 | --max-menu-entries 01 \ |
| 34 | --kic "$$KIC1" \ |
| 35 | --kid "$$KID1" |
| 36 | |
| 37 | remove: |
| 38 | . $$PWD/.sim-keys && $(SIMTOOLS_DIR)/bin/shadysim \ |
| 39 | --pcsc \ |
| 40 | -d "$$(echo $(PACKAGE_AID) | sed 's/0x//g' | sed 's/\://g')" \ |
| 41 | --kic "$$KIC1" \ |
| 42 | --kid "$$KID1" |
Oliver Smith | 0f7c8bb | 2020-02-24 11:32:48 +0100 | [diff] [blame] | 43 | |
| 44 | delete: remove |
Neels Hofmeyr | d20f93a | 2020-02-24 22:42:22 +0100 | [diff] [blame] | 45 | |
| 46 | .PHONY: test |
| 47 | test: |
| 48 | mkdir -p ./test/classes |
Neels Hofmeyr | ad4531a | 2020-02-25 03:19:26 +0100 | [diff] [blame] | 49 | javac -target 1.1 -source 1.3 -classpath test/classes -g -d ./test/classes src/org/osmocom/IMSIPseudo/Bytes.java |
Neels Hofmeyr | d20f93a | 2020-02-24 22:42:22 +0100 | [diff] [blame] | 50 | javac -target 1.1 -source 1.3 -classpath test/classes -g -d ./test/classes src/org/osmocom/IMSIPseudo/MobileIdentity.java |
| 51 | javac -target 1.1 -source 1.3 -classpath test/classes -g -d ./test/classes src/org/osmocom/IMSIPseudo/Test.java |
| 52 | java -classpath test/classes org.osmocom.IMSIPseudo.Test |