| 1 | #-------------------------------------------------------------------------- |
|---|
| 2 | # Makefile for the NeXus Java API. Builds both the required Java class |
|---|
| 3 | # files and the shared library with the native methods. |
|---|
| 4 | # |
|---|
| 5 | # This version for Windows32 using the free Borland bcc55 compiler |
|---|
| 6 | # |
|---|
| 7 | # Mark Koennecke, October 2000 |
|---|
| 8 | #-------------------------------------------------------------------------- |
|---|
| 9 | .SUFFIXES: |
|---|
| 10 | .SUFFIXES: .java .class .c .o |
|---|
| 11 | |
|---|
| 12 | ########################################################################### |
|---|
| 13 | # C O N F I G U R A T I O N S E C T I O N # |
|---|
| 14 | ########################################################################### |
|---|
| 15 | # Where to find the HDF libraries: HDF4.1r3 is REQUIRED |
|---|
| 16 | HDFROOT=c:\hdf4lib\HDF41r4 |
|---|
| 17 | HDF5ROOT=C:\hdf5lib\5-144-winVS\c\release |
|---|
| 18 | |
|---|
| 19 | #Where to find the napi C stuff |
|---|
| 20 | NAPIROOT=..\ |
|---|
| 21 | |
|---|
| 22 | # Where the Java binaries live |
|---|
| 23 | JAVABIN=C:\jdk1.1.8\bin |
|---|
| 24 | |
|---|
| 25 | # The classpath for compiling java |
|---|
| 26 | JCP=C:\jdk1.1.8\lib\classes.zip;.; |
|---|
| 27 | |
|---|
| 28 | # The path to the include files for the jni-headers |
|---|
| 29 | JINCLUDE= -I"C:\jdk1.1.8\include" \ |
|---|
| 30 | -I"C:\jdk1.1.8\include\win32" |
|---|
| 31 | |
|---|
| 32 | # The C-compiler to use |
|---|
| 33 | CC=bcc32 |
|---|
| 34 | |
|---|
| 35 | # Compiler flags to use for compiling |
|---|
| 36 | CFLAGS= -v -WD -w-8057 -w-8065 -w-8012 -w-8004 -w-8070 -w-8075 -w-8017 \ |
|---|
| 37 | -w! -c $(JINCLUDE) -DHDF4 -DHDF5 -DJNEXUS -w-8066 -w-8008\ |
|---|
| 38 | -I"$(HDFROOT)\include" -I"$(HDF5ROOT)\include" -I$(NAPIROOT) -Inative |
|---|
| 39 | |
|---|
| 40 | #Compiler flags used for linking |
|---|
| 41 | LFLAGS= /v /Tpd /Lbin\win32 |
|---|
| 42 | |
|---|
| 43 | #Target location for the shared library |
|---|
| 44 | SHLIB=bin\win32\jnexus.dll |
|---|
| 45 | |
|---|
| 46 | ########################################################################### |
|---|
| 47 | # END OF C O N F I G U R A T I O N S E C T I O N # |
|---|
| 48 | # DO NOT TOUCH ANYTHING BELOW! # |
|---|
| 49 | ########################################################################### |
|---|
| 50 | |
|---|
| 51 | .java.class: |
|---|
| 52 | $(JAVABIN)\javac -g -classpath $(JCP) $*.java |
|---|
| 53 | |
|---|
| 54 | .c.obj: |
|---|
| 55 | $(CC) $(CFLAGS) -o$*.obj $*.c |
|---|
| 56 | |
|---|
| 57 | JOBJ=ncsa\hdf\hdflib\HDFException.class \ |
|---|
| 58 | ncsa\hdf\hdflib\HDFJavaException.class \ |
|---|
| 59 | ncsa\hdf\hdflib\HDFNotImplementedException.class \ |
|---|
| 60 | ncsa\hdf\hdflib\HDFConstants.class \ |
|---|
| 61 | ncsa\hdf\hdflib\HDFArray.class \ |
|---|
| 62 | ncsa\hdf\hdflib\HDFNativeData.class \ |
|---|
| 63 | neutron\nexus\NexusException.class \ |
|---|
| 64 | neutron\nexus\NXlink.class \ |
|---|
| 65 | neutron\nexus\NeXusFileInterface.class \ |
|---|
| 66 | neutron\nexus\AttributeEntry.class \ |
|---|
| 67 | neutron\nexus\NexusFile.class |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | COBJ=native\hdfnativeImp.obj \ |
|---|
| 71 | native\hdfexceptionImp.obj \ |
|---|
| 72 | native\handle.obj \ |
|---|
| 73 | native\NexusFile.obj \ |
|---|
| 74 | ..\napi.obj |
|---|
| 75 | |
|---|
| 76 | |
|---|
| 77 | |
|---|
| 78 | all: jnexus.jar jnexus.dll test |
|---|
| 79 | |
|---|
| 80 | jnexus.jar: $(JOBJ) |
|---|
| 81 | - del jnexus.jar |
|---|
| 82 | $(JAVABIN)\jar cvf jnexus.jar $(JOBJ) \ |
|---|
| 83 | ncsa/hdf/hdflib/ArrayDescriptor.class |
|---|
| 84 | |
|---|
| 85 | jnexus.dll: $(COBJ) |
|---|
| 86 | ilink32 $(LFLAGS) c0d32.obj $(COBJ),bin\win32\jnexus.dll,,\ |
|---|
| 87 | hm414m.lib hd414m.lib hdf5.lib cw32.lib import32.lib |
|---|
| 88 | |
|---|
| 89 | |
|---|
| 90 | header: neutron/nexus/NexusFile.class |
|---|
| 91 | $(JAVABIN)/javah -jni -d native neutron.nexus.NexusFile |
|---|
| 92 | |
|---|
| 93 | test: test/TestJapi.class |
|---|
| 94 | |
|---|
| 95 | clean: |
|---|
| 96 | - rm neutron/nexus/*.class |
|---|
| 97 | - rm ncsa/hdf/hdflib/*.class |
|---|
| 98 | - rm native/*.o |
|---|
| 99 | |
|---|