Fix some Makefile bugs and add some Windows support

master
Karl Koscher 10 years ago
parent 836f614d75
commit 9b82732c5b
  1. 26
      javacard/makefiles/applet-project.mk

@ -1,10 +1,16 @@
BUILD_DIR = ./build
BUILD_CLASSES_DIR = $(BUILD_DIR)/classes
BUILD_JAVACARD_DIR = $(BUILD_DIR)/javacard
JAVACARD_EXPORT_DIR = $(JAVACARD_SDK_DIR)/api21_export_files
CLASSPATH = $(JAVACARD_SDK_DIR)/lib/api21.jar:$(JAVACARD_SDK_DIR)/lib/sim.jar
JFLAGS = -target 1.1 -source 1.3 -g -d $(BUILD_CLASSES_DIR) -classpath $(CLASSPATH)
JC = javac
JAVACARD_SDK_DIR ?= $(SIMTOOLS_DIR)/javacard
JAVACARD_EXPORT_DIR ?= $(JAVACARD_SDK_DIR)/api21_export_files
ifdef COMSPEC
CLASSPATH = $(JAVACARD_SDK_DIR)/lib/api21.jar;$(JAVACARD_SDK_DIR)/lib/sim.jar
else
CLASSPATH = $(JAVACARD_SDK_DIR)/lib/api21.jar:$(JAVACARD_SDK_DIR)/lib/sim.jar
endif
JFLAGS = -target 1.1 -source 1.3 -g -d $(BUILD_CLASSES_DIR) -classpath "$(CLASSPATH)"
JAVA ?= java
JC ?= javac
.SUFFIXES: .java .class
.java.class:
@ -13,11 +19,11 @@ JC = javac
$(JC) $(JFLAGS) $*.java
$(JAVACARD_SDK_DIR)/bin/converter \
-d $(BUILD_JAVACARD_DIR) \
-classdir $(BUILD_CLASSES_DIR) \
-exportpath $(JAVACARD_EXPORT_DIR) \
-applet $(APPLET_AID) $(APPLET_NAME) \
$(JAVA) -jar $(JAVACARD_SDK_DIR)/bin/converter.jar \
-d $(BUILD_JAVACARD_DIR) \
-classdir $(BUILD_CLASSES_DIR) \
-exportpath $(JAVACARD_EXPORT_DIR) \
-applet $(APPLET_AID) $(APPLET_NAME) \
$(PACKAGE_NAME) $(PACKAGE_AID) $(PACKAGE_VERSION)
default: classes
@ -31,7 +37,7 @@ install:
$(eval CAP_FILE := $(shell find $(BUILD_JAVACARD_DIR) -name *.cap))
$(eval MODULE_AID := $(shell echo $(APPLET_AID) | sed 's/0x//g' | sed 's/\://g'))
$(eval INSTANCE_AID := $(shell echo $(APPLET_AID) | sed 's/0x//g' | sed 's/\://g'))
../sim-tools/bin/shadysim \
$(SIMTOOLS_DIR)/bin/shadysim \
$(SHADYSIM_OPTIONS) \
-l $(CAP_FILE) \
-i $(CAP_FILE) \

Loading…
Cancel
Save