JAVA = javac JAVAH = javah CC = cc ALL = $(SMART_ALL) CLDIR = /afs/cs.cmu.edu/user/qrao/homework/15-413 CURDIR = $(CLDIR) PACKAGES = edu.cmu.paid.authentication.SmartCard JAVADIR = /usr/local/lib/java CLASSDIR = $(JAVADIR)/lib/classes.zip:$(CLDIR) DESTDIR = ../javadoc SMART_ALL = SmartCard.class SmartCard.o SMART_SRCS = SmartCard.java SmartCard.c JNI_HEADER = edu_cmu_paid_authentication_SmartCard_SmartCard.h all: $(ALL) love: make clean; gmake -j # Update a tags table for this program. TAGS: $(SMART_SRCS) etags $(SMART_SRCS) clean: rm -f $(ALL) *~ count: wc $(SMART_SRCS) %.class: %.java $(JAVA) -classpath $(CLASSDIR) $(@:%.class=%.java) edu_cmu_paid_authentication_SmartCard_SmartCard.h: $(JAVAH) -jni -classpath $(CLASSDIR) $(PACKAGES).SmartCard %.o: edu_cmu_paid_authentication_SmartCard_SmartCard.h %.c $(CC) -I$(JAVADIR)/include -I$(JAVADIR)/include/solaris $(@:%.o=%.c)