home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / Security / custom / MAKEFILE < prev    next >
Encoding:
Text File  |  2000-05-04  |  2.8 KB  |  103 lines

  1. # makefile
  2. #
  3. # Created 09/09/97
  4. #
  5. # (C) Copyright 1995 - 1999 Microsoft Corporation.  All rights reserved.
  6. #
  7.  
  8.  
  9. !ifndef BUILD
  10. BUILD = debug
  11. !endif
  12.  
  13. JAVA_SDK_ROOT = ..\..\..
  14. JAVA_SDK_BIN = $(JAVA_SDK_ROOT)\Bin
  15.  
  16. PKG = com\ms\samples\security\custom
  17.  
  18. LIB_CLASSES = \
  19.     $(BUILD)\$(PKG)\SampleLib.class \
  20.     $(BUILD)\$(PKG)\SampleRequest.class \
  21.     $(BUILD)\$(PKG)\SamplePermission.class
  22.  
  23. LIB_JAVASRC = \
  24.     SampleLib.java \
  25.     SampleRequest.java \
  26.     SamplePermission.java
  27.  
  28.  
  29. JVC = jvc
  30.  
  31.  
  32. all: dirchk $(BUILD)\signedlib.cab $(BUILD)\signedapplet.cab $(BUILD)\default.htm sample
  33.  
  34. clean:
  35.     @if exist $(BUILD)\nul deltree /y $(BUILD)
  36.     @if exist demo\nul deltree /y demo
  37.  
  38. sample: $(BUILD)\signedlib.cab $(BUILD)\signedapplet.cab
  39.     @if not exist sample mkdir sample
  40.     copy $(BUILD)\signedlib.cab sample
  41.     copy $(BUILD)\signedapplet.cab sample
  42.  
  43. install: sample\signedlib.cab
  44.     rundll32 msjava.dll,JavaPkgMgr_Install sample\signedlib.cab,0,1,0,0,0,18,,,1
  45.  
  46. dirchk:
  47.     @if not exist $(BUILD)\nul mkdir $(BUILD)
  48.     @if not exist demo\nul mkdir demo
  49.  
  50. $(LIB_CLASSES): $(LIB_JAVASRC)
  51.     $(JVC) -d $(BUILD) $(LIB_JAVASRC)
  52.  
  53. demo\Main.class: Main.java $(LIB_CLASSES)
  54.     cd demo
  55.     jvc -x- -cp:p ..\$(BUILD) -d . ..\Main.java
  56.     cd ..
  57.  
  58. $(BUILD)\cert.spc: $(BUILD)\cert.cer
  59.     $(JAVA_SDK_BIN)\cert2spc $(BUILD)\cert.cer $(BUILD)\cert.spc
  60.  
  61. $(BUILD)\cert.cer cert.pvk:
  62.     @echo.
  63.     @echo Press 'None' for the test cert's private key.
  64.     @echo.
  65.     $(JAVA_SDK_BIN)\makecert -d  "Custom Permission Signer" -sv cert.pvk $(BUILD)\cert.cer
  66.  
  67. $(BUILD)\unsignedlib.cab: $(LIB_CLASSES)
  68.     $(JAVA_SDK_BIN)\dubuild -d "Custom Permission Sample" $(BUILD)\unsignedlib.cab $(BUILD) -i *.class -s $(PKG:\=.)
  69.  
  70. $(BUILD)\signedlib.cab: $(BUILD)\unsignedlib.cab $(BUILD)\cert.spc cert.pvk
  71.     copy $(BUILD)\unsignedlib.cab $(BUILD)\signedlib.cab
  72.     signcode -spc $(BUILD)\cert.spc -v cert.pvk $(BUILD)\signedlib.cab
  73.  
  74. $(BUILD)\baseperms.ini: $(BUILD)\baseperms.class
  75.     jview -cp:p $(BUILD) baseperms >$@
  76.  
  77. $(BUILD)\perms.ini: $(BUILD)\baseperms.ini customperms.ini
  78.     copy $(BUILD)\baseperms.ini+customperms.ini $@
  79.  
  80. $(BUILD)\unsignedapplet.cab: demo\Main.class
  81.     cd demo
  82.     cabarc -r -p n ..\$(BUILD)\unsignedapplet.cab *.class
  83.     cd ..
  84.  
  85. $(BUILD)\signedapplet.cab: $(BUILD)\unsignedapplet.cab $(BUILD)\cert.spc cert.pvk $(BUILD)\perms.ini
  86.     copy $(BUILD)\unsignedapplet.cab $(BUILD)\signedapplet.cab
  87.     cd $(BUILD)
  88.     @set CLASSPATH=$(CLASSPATH);.
  89.     signcode -spc cert.spc -v ..\cert.pvk -j ..\..\..\..\bin\javasign.dll -jp perms.ini signedapplet.cab
  90.     cd ..
  91.  
  92. $(BUILD)\default.htm: default.htm $(BUILD)\signedapplet.cab $(BUILD)\signedlib.cab
  93.     type default.htm >$(BUILD)\default.htm
  94.  
  95.  
  96. # Inference rules
  97.  
  98. .SUFFIXES: .java .class
  99.  
  100. .java{$(BUILD)}.class:
  101.     $(JVC) -d $(BUILD) $<
  102.  
  103.