home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Samples / Security / custom / MAKEFILE < prev    next >
Encoding:
Text File  |  1998-03-05  |  3.0 KB  |  105 lines

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