home *** CD-ROM | disk | FTP | other *** search
Makefile | 2000-05-04 | 2.7 KB | 69 lines |
-
- DEF_FILE = dllstub.def
- LIBS = kernel32.lib user32.lib ole32.lib oleaut32.lib uuid.lib advapi32.lib msvcrt.lib
- SRC_FILES = dllstub.cpp jpsplit.cpp util.cpp
-
- STUB_DEST_DIR = release
- INCLUDE = $(INCLUDE);..\..\..\..\include;.
-
- !if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
- PATH = $(PATH);..\..\..\..\binalpha
- !endif
-
- PATH = $(PATH);..\..\..\..\bin
-
- BASE_ADDRESS = 0x20000000
- # use stack size of 256K if possible.
- STACK_SIZE = 262144
-
- CL_SWITCHES = -Oy -Gs -Os -Og -Oi -Ob1 -GB -Gf -Gy -Gz -W4 -WX -LD -Fo"$(STUB_DEST_DIR)/" -DSTRICT -D_WIN32 -DWINVER=0x0400
- 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"
-
- CL = cl.exe
- COPY = xcopy.exe
- DEL = del
- JACTIVEX = jactivex.exe
- JAVAREG = javareg.exe
- JEXEGEN = jexegen.exe
- JVC = jvc.exe
- MOVE = move
- RC = rc.exe
- RENAME = ren.exe
- RMDIR = rmdir
-
- !if "$(PROCESSOR_ARCHITECTURE)" == "x86"
- # The linker defaults to a one megabyte stack which consumes too much resources
- # for typical Java applications.
- LINK_SWITCHES = $(LINK_SWITCHES) -stack:$(STACK_SIZE)
- !endif
-
-
- all: res stub sample
-
- res:
- @if not exist $(STUB_DEST_DIR)\nul mkdir $(STUB_DEST_DIR)
- $(RC) -Fo $(STUB_DEST_DIR)\dllstub.res -r dllstub.rc
-
- stub:
- $(CL) $(CL_SWITCHES) $(SRC_FILES) /link $(LINK_SWITCHES) $(STUB_DEST_DIR)\dllstub.res $(LIBS)
-
- sample:
- $(JVC) test\component\*.java
- start /wait $(JAVAREG) /register /q /class:test.component.Component /codebase:. /clsid:{EB302DEC-13C2-40af-899B-C6C4E1983D1B} /typelib:test\Component.tlb
- @$(COPY) /r $(STUB_DEST_DIR)\dllstub.dll test
- @if exist test\component.dll $(DEL) /f /q test\component.dll
- @$(MOVE) test\dllstub.dll test\component.dll
- $(JEXEGEN) /BA:0x24000000 /REG /D /V /BINDTO:test\component.dll test\component\*.class test\component.tlb
- $(JACTIVEX) /javatlb /w /d . /p:b- /p test.wrappers /xd- test\component.dll
- $(JVC) /x- test\Driver.java
-
- clean:
- @if exist $(STUB_DEST_DIR)\nul $(DEL) /f /q $(STUB_DEST_DIR)\*.*
- @if exist $(STUB_DEST_DIR)\nul $(RMDIR) $(STUB_DEST_DIR)
- @if exist test\component.dll $(DEL) /f /q test\component.dll
- @if exist test\component.tlb $(DEL) /f /q test\component.tlb
- @if exist test\*.class $(DEL) /f /q test\*.class
- @if exist test\component\*.class $(DEL) /f /q test\component\*.class
- @if exist test\wrappers\nul $(DEL) /f /q test\wrappers\*.*
- @if exist test\wrappers\nul $(RMDIR) test\wrappers
-