home *** CD-ROM | disk | FTP | other *** search
- # makefile
- #
- # Created 09/09/97
- #
- # (C) Copyright 1995 - 1999 Microsoft Corporation. All rights reserved.
- #
-
-
- !ifndef BUILD
- BUILD = debug
- !endif
-
- JAVA_SDK_ROOT = ..\..\..
- JAVA_SDK_BIN = $(JAVA_SDK_ROOT)\Bin
-
- PKG = com\ms\samples\security\custom
-
- LIB_CLASSES = \
- $(BUILD)\$(PKG)\SampleLib.class \
- $(BUILD)\$(PKG)\SampleRequest.class \
- $(BUILD)\$(PKG)\SamplePermission.class
-
- LIB_JAVASRC = \
- SampleLib.java \
- SampleRequest.java \
- SamplePermission.java
-
-
- JVC = jvc
-
-
- all: dirchk $(BUILD)\signedlib.cab $(BUILD)\signedapplet.cab $(BUILD)\default.htm sample
-
- clean:
- @if exist $(BUILD)\nul deltree /y $(BUILD)
- @if exist demo\nul deltree /y demo
-
- sample: $(BUILD)\signedlib.cab $(BUILD)\signedapplet.cab
- @if not exist sample mkdir sample
- copy $(BUILD)\signedlib.cab sample
- copy $(BUILD)\signedapplet.cab sample
-
- install: sample\signedlib.cab
- rundll32 msjava.dll,JavaPkgMgr_Install sample\signedlib.cab,0,1,0,0,0,18,,,1
-
- dirchk:
- @if not exist $(BUILD)\nul mkdir $(BUILD)
- @if not exist demo\nul mkdir demo
-
- $(LIB_CLASSES): $(LIB_JAVASRC)
- $(JVC) -d $(BUILD) $(LIB_JAVASRC)
-
- demo\Main.class: Main.java $(LIB_CLASSES)
- cd demo
- jvc -x- -cp:p ..\$(BUILD) -d . ..\Main.java
- cd ..
-
- $(BUILD)\cert.spc: $(BUILD)\cert.cer
- $(JAVA_SDK_BIN)\cert2spc $(BUILD)\cert.cer $(BUILD)\cert.spc
-
- $(BUILD)\cert.cer cert.pvk:
- @echo.
- @echo Press 'None' for the test cert's private key.
- @echo.
- $(JAVA_SDK_BIN)\makecert -d "Custom Permission Signer" -sv cert.pvk $(BUILD)\cert.cer
-
- $(BUILD)\unsignedlib.cab: $(LIB_CLASSES)
- $(JAVA_SDK_BIN)\dubuild -d "Custom Permission Sample" $(BUILD)\unsignedlib.cab $(BUILD) -i *.class -s $(PKG:\=.)
-
- $(BUILD)\signedlib.cab: $(BUILD)\unsignedlib.cab $(BUILD)\cert.spc cert.pvk
- copy $(BUILD)\unsignedlib.cab $(BUILD)\signedlib.cab
- signcode -spc $(BUILD)\cert.spc -v cert.pvk $(BUILD)\signedlib.cab
-
- $(BUILD)\baseperms.ini: $(BUILD)\baseperms.class
- jview -cp:p $(BUILD) baseperms >$@
-
- $(BUILD)\perms.ini: $(BUILD)\baseperms.ini customperms.ini
- copy $(BUILD)\baseperms.ini+customperms.ini $@
-
- $(BUILD)\unsignedapplet.cab: demo\Main.class
- cd demo
- cabarc -r -p n ..\$(BUILD)\unsignedapplet.cab *.class
- cd ..
-
- $(BUILD)\signedapplet.cab: $(BUILD)\unsignedapplet.cab $(BUILD)\cert.spc cert.pvk $(BUILD)\perms.ini
- copy $(BUILD)\unsignedapplet.cab $(BUILD)\signedapplet.cab
- cd $(BUILD)
- @set CLASSPATH=$(CLASSPATH);.
- signcode -spc cert.spc -v ..\cert.pvk -j ..\..\..\..\bin\javasign.dll -jp perms.ini signedapplet.cab
- cd ..
-
- $(BUILD)\default.htm: default.htm $(BUILD)\signedapplet.cab $(BUILD)\signedlib.cab
- type default.htm >$(BUILD)\default.htm
-
-
- # Inference rules
-
- .SUFFIXES: .java .class
-
- .java{$(BUILD)}.class:
- $(JVC) -d $(BUILD) $<
-
-