home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / COM / jexegen / stub / makefile < prev    next >
Encoding:
Makefile  |  2000-05-04  |  2.7 KB  |  69 lines

  1.  
  2. DEF_FILE        = dllstub.def
  3. LIBS            = kernel32.lib user32.lib ole32.lib oleaut32.lib uuid.lib advapi32.lib msvcrt.lib
  4. SRC_FILES       = dllstub.cpp jpsplit.cpp util.cpp
  5.  
  6. STUB_DEST_DIR   = release
  7. INCLUDE         = $(INCLUDE);..\..\..\..\include;.
  8.  
  9. !if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
  10. PATH            = $(PATH);..\..\..\..\binalpha
  11. !endif
  12.  
  13. PATH            = $(PATH);..\..\..\..\bin
  14.  
  15. BASE_ADDRESS    = 0x20000000
  16. # use stack size of 256K if possible.
  17. STACK_SIZE      = 262144
  18.  
  19. CL_SWITCHES     = -Oy -Gs -Os -Og -Oi -Ob1 -GB -Gf -Gy -Gz -W4 -WX -LD -Fo"$(STUB_DEST_DIR)/" -DSTRICT -D_WIN32 -DWINVER=0x0400
  20. LINK_SWITCHES   = -def:$(DEF_FILE) -NoDefaultLib -base:$(BASE_ADDRESS) -merge:.rdata=.text -opt:icf,ref -debug:none -fixed:no -ignore:4078 -out:"$(STUB_DEST_DIR)/dllstub.dll" -implib:"$(STUB_DEST_DIR)/dllstub.lib"
  21.  
  22. CL              = cl.exe
  23. COPY            = xcopy.exe
  24. DEL             = del
  25. JACTIVEX        = jactivex.exe
  26. JAVAREG         = javareg.exe
  27. JEXEGEN         = jexegen.exe
  28. JVC             = jvc.exe
  29. MOVE            = move
  30. RC              = rc.exe
  31. RENAME          = ren.exe
  32. RMDIR           = rmdir
  33.  
  34. !if "$(PROCESSOR_ARCHITECTURE)" == "x86"
  35. #  The linker defaults to a one megabyte stack which consumes too much resources
  36. #  for typical Java applications.
  37. LINK_SWITCHES   = $(LINK_SWITCHES) -stack:$(STACK_SIZE)
  38. !endif
  39.  
  40.  
  41. all: res stub sample
  42.  
  43. res:
  44.     @if not exist $(STUB_DEST_DIR)\nul mkdir $(STUB_DEST_DIR)
  45.     $(RC) -Fo $(STUB_DEST_DIR)\dllstub.res -r dllstub.rc
  46.  
  47. stub:
  48.     $(CL) $(CL_SWITCHES) $(SRC_FILES) /link $(LINK_SWITCHES) $(STUB_DEST_DIR)\dllstub.res $(LIBS)
  49.  
  50. sample:
  51.     $(JVC) test\component\*.java
  52.     start /wait $(JAVAREG) /register /q /class:test.component.Component /codebase:. /clsid:{EB302DEC-13C2-40af-899B-C6C4E1983D1B} /typelib:test\Component.tlb
  53.     @$(COPY) /r $(STUB_DEST_DIR)\dllstub.dll test
  54.     @if exist test\component.dll $(DEL) /f /q test\component.dll
  55.     @$(MOVE) test\dllstub.dll test\component.dll
  56.     $(JEXEGEN) /BA:0x24000000 /REG /D /V /BINDTO:test\component.dll test\component\*.class test\component.tlb
  57.     $(JACTIVEX) /javatlb /w /d . /p:b- /p test.wrappers /xd- test\component.dll
  58.     $(JVC) /x- test\Driver.java
  59.  
  60. clean:
  61.     @if exist $(STUB_DEST_DIR)\nul $(DEL) /f /q $(STUB_DEST_DIR)\*.*
  62.     @if exist $(STUB_DEST_DIR)\nul $(RMDIR) $(STUB_DEST_DIR)
  63.     @if exist test\component.dll $(DEL) /f /q test\component.dll
  64.     @if exist test\component.tlb $(DEL) /f /q test\component.tlb
  65.     @if exist test\*.class $(DEL) /f /q test\*.class
  66.     @if exist test\component\*.class $(DEL) /f /q test\component\*.class
  67.     @if exist test\wrappers\nul $(DEL) /f /q test\wrappers\*.*
  68.     @if exist test\wrappers\nul $(RMDIR) test\wrappers
  69.