home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Samples / Security / rni / makefile < prev    next >
Encoding:
Makefile  |  1998-03-05  |  2.2 KB  |  103 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. !ifndef PROCESSOR_ARCHITECTURE
  14. CPU = i386
  15. !else if "$(PROCESSOR_ARCHITECTURE)" == "x86"
  16. CPU = i386
  17. !else
  18. CPU = $(PROCESSOR_ARCHITECTURE)
  19. !endif
  20.  
  21. JAVA_SDK_ROOT = ..\..\..
  22. JAVA_SDK_BIN = $(JAVA_SDK_ROOT)\Bin
  23.  
  24.  
  25. OBJ = \
  26.     $(BUILD)\rnisamp.obj
  27.  
  28. LIBS = msjava.lib
  29.  
  30. BASE_NAME = rnisamp
  31.  
  32.  
  33. PDB = $(BUILD)\$(BASE_NAME).pdb
  34.  
  35. CL_SWITCHES = $(CL_SWITCHES) -I$(JAVA_SDK_ROOT)\Include -I$(BUILD)
  36. !if "$(BUILD)" == "debug"
  37. CL_SWITCHES = $(CL_SWITCHES) -Zi -Fd$(PDB)
  38. !else
  39. CL_SWITCHES = $(CL_SWITCHES) -Ox
  40. !endif
  41.  
  42. LINK_SWITCHES = $(LINK_SWITCHES) -LIBPATH:$(JAVA_SDK_ROOT)\Lib\$(CPU)
  43.  
  44. JVC = $(JAVA_SDK_BIN)\jvc
  45. JVC_SWITCHES = $(JVC_SWITCHES) -cp:p $(BUILD)
  46.  
  47. MSJAVAH = $(JAVA_SDK_BIN)\msjavah
  48. MSJAVAH_SWITCHES = $(JAVAH_SWITCHES) -helpers -classpath $(BUILD)
  49.  
  50. JAVATLB = $(JAVA_SDK_BIN)\jactivex /javatlb
  51.  
  52.  
  53. all: \
  54.     dirchk \
  55.     $(BUILD)\$(BASE_NAME).dll \
  56.     $(BUILD)\rnisamp\MyRNIObject.class \
  57.     $(BUILD)\demo\demo\Main.class
  58.  
  59. clean:
  60.     @if exist $(BUILD)\nul deltree /y $(BUILD)
  61.  
  62. sample: all
  63.     @if not exist sample\nul mkdir sample
  64.     copy $(BUILD)\$(BASE_NAME).dll sample
  65.     @if not exist sample\rnisamp\nul mkdir sample\rnisamp
  66.     xcopy /s $(BUILD)\rnisamp sample\rnisamp
  67.     @if not exist sample\demo\nul mkdir sample\demo
  68.     xcopy /s $(BUILD)\demo sample\demo
  69.  
  70.  
  71. dirchk:
  72.     @if not exist $(BUILD)\nul mkdir $(BUILD)
  73.  
  74.  
  75. # build rules
  76.  
  77. $(BUILD)\$(BASE_NAME).dll: $(OBJ)
  78.     link $(LINK_SWITCHES) -pdb:$(PDB) -out:$@ -dll $(OBJ) $(LIBS)
  79.  
  80. $(BUILD)\rnisamp.h: $(BUILD)\rnisamp\MyRNIObject.class
  81.     $(MSJAVAH) $(MSJAVAH_SWITCHES) -helpers -o $@ rnisamp.MyRNIObject java.lang.System java.lang.SecurityManager
  82.  
  83. $(BUILD)\rnisamp\MyRNIObject.class: MyRNIObject.java
  84.     $(JVC) $(JVC_SWITCHES) -d $(BUILD) MyRNIObject.java
  85.  
  86. $(BUILD)\demo\demo\Main.class: Main.java
  87.     $(JVC) $(JVC_SWITCHES) -d $(BUILD)\demo Main.java
  88.  
  89.  
  90. # Dependencies
  91.  
  92. rnisamp.cpp: $(BUILD)\rnisamp.h
  93.  
  94.  
  95. # Inference rules
  96.  
  97. .cpp{$(BUILD)}.obj:
  98.     cl -c $(CL_SWITCHES) -Fo$@ $<
  99.  
  100. {$(BUILD)}.c{$(BUILD)}.obj:
  101.     cl -c $(CL_SWITCHES) -Fo$@ $<
  102.  
  103.