blob: e4e5163b27086f2e0be13cb613a6065740d62fdc [file] [log] [blame]
Oliver Smith04f25862020-02-19 12:16:01 +01001SIMTOOLS_DIR = ../../sim-tools
Oliver Smith537fba02020-02-19 12:12:52 +01002
3APPLET_AID = 0xd0:0x70:0x02:0xca:0x44:0x90:0x01:0x01
Oliver Smith7528b382020-02-21 08:43:25 +01004APPLET_NAME = org.osmocom.IMSIPseudo.IMSIPseudo
Oliver Smith537fba02020-02-19 12:12:52 +01005PACKAGE_AID = 0xd0:0x70:0x02:0xCA:0x44:0x90:0x01
Oliver Smith7528b382020-02-21 08:43:25 +01006PACKAGE_NAME = org.osmocom.IMSIPseudo
Oliver Smith537fba02020-02-19 12:12:52 +01007PACKAGE_VERSION = 1.0
8
Neels Hofmeyrad4531a2020-02-25 03:19:26 +01009SOURCES = \
10 src/org/osmocom/IMSIPseudo/Bytes.java \
11 src/org/osmocom/IMSIPseudo/MobileIdentity.java \
12 src/org/osmocom/IMSIPseudo/IMSIPseudo.java \
13 $(NULL)
Neels Hofmeyrd20f93a2020-02-24 22:42:22 +010014
Oliver Smithc18064a2020-02-21 09:29:20 +010015CAP_FILE = build/javacard/org/osmocom/IMSIPseudo/javacard/IMSIPseudo.cap
Oliver Smith537fba02020-02-19 12:12:52 +010016
Neels Hofmeyrc916b972020-02-24 22:51:21 +010017include ./applet-project.mk
Oliver Smithc18064a2020-02-21 09:29:20 +010018
19flash: 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 Smith799fe1d2020-02-24 15:20:55 +010027 --access-domain=00 \
Oliver Smithc18064a2020-02-21 09:29:20 +010028 --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
37remove:
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 Smith0f7c8bb2020-02-24 11:32:48 +010043
Neels Hofmeyr7c5e9732020-02-25 03:19:36 +010044list:
45 . $$PWD/.sim-keys && $(SIMTOOLS_DIR)/bin/shadysim \
46 --pcsc \
47 --list-applets \
48 --kic "$$KIC1" \
49 --kid "$$KID1"
50
Oliver Smith0f7c8bb2020-02-24 11:32:48 +010051delete: remove
Neels Hofmeyrd20f93a2020-02-24 22:42:22 +010052
53.PHONY: test
54test:
55 mkdir -p ./test/classes
Neels Hofmeyrad4531a2020-02-25 03:19:26 +010056 javac -target 1.1 -source 1.3 -classpath test/classes -g -d ./test/classes src/org/osmocom/IMSIPseudo/Bytes.java
Neels Hofmeyrd20f93a2020-02-24 22:42:22 +010057 javac -target 1.1 -source 1.3 -classpath test/classes -g -d ./test/classes src/org/osmocom/IMSIPseudo/MobileIdentity.java
58 javac -target 1.1 -source 1.3 -classpath test/classes -g -d ./test/classes src/org/osmocom/IMSIPseudo/Test.java
59 java -classpath test/classes org.osmocom.IMSIPseudo.Test