# # settings # CLEANABLE=*.h *.class *.dll *.exp *.obj *.lib PURGEABLE=*~ JDK_HOME=C:\\j2sdk1.3 INC=-I$(JDK_HOME)\\include -I$(JDK_HOME)\\include\\win32 LIB=-libpath:D:\\win32app\\DevStudio\\VC\\lib -libpath:$(JDK_HOME)\\lib CFLAGS=-nologo -MT LFLAGS=-nologo LFLAGS=-nologo CC=cl LD=link # # targets # default: HelloWorld.class HelloWorld.dll #invoke.obj: invoke.c # $(CC) $(CFLAGS) -c invoke.c $(INC) # #invoke: invoke.obj # $(LD) $(LFLAGS) /out:invoke invoke.obj $(LIB) jvm.lib # # rules # %.h: %.class javah -jni $* %.class: %.java javac $< %.dll: %.c %.h $(CC) $(CFLAGS) $(INC) -LD $< -Fe$@ -link $(LIB) %.obj: %.c $(CC) $(CFLAGS) -c $< $(INC) #%.dll: %.obj # $(LD) $(LFLAGS) /dll /out:$@ $(LIB) %: %.obj $(LD) $(LFLAGS) /out:$@ $^ $(LIB) jvm.lib clean: -rm $(CLEANABLE) purge: -rm $(PURGEABLE)