File: Make.linux

package info (click to toggle)
nexus 4.4.3-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,864 kB
  • sloc: cpp: 34,928; ansic: 17,317; f90: 2,326; xml: 2,071; java: 1,953; fortran: 1,529; python: 766; makefile: 532; sh: 460; tcl: 173; lisp: 169
file content (99 lines) | stat: -rwxr-xr-x 2,692 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#--------------------------------------------------------------------------
# Makefile for the NeXus Java API. Builds both the required Java class
# files and the shared library with the native methods.
#
# This version for Redhat Linux 
# 
# Mark Koennecke, October 2003
#--------------------------------------------------------------------------
.SUFFIXES:
.SUFFIXES: .java .class .c .o 

###########################################################################
#         C O N F I G U R A T I O N       S E C T I O N                   #
###########################################################################

include ../../make_general

#Where to find the napi C stuff
NAPIROOT=$(SINQDIR)/linux

# Where Java lives
JAVAROOT=/scratch/j2sdk1.4.2
JAVABIN=$(JAVAROOT)/bin

# The classpath for compiling java
JCP=.:

# The path to the include files for the jni-headers
JINCLUDE= -I$(JAVAROOT)/include -I$(JAVAROOT)/include/linux 

# The C-compiler to use
CC=gcc

# Compiler flags to use for compiling
CFLAGS= -g -c $(JINCLUDE) $(NXFLAGS) -I../../include \
       -Inative

#Compiler flags used for linking
LFLAGS= -g -shared -L../../src -lNeXus $(NXLDFLAGS)

#Target location for the shared library
SHLIB=bin/rh62/libjnexus.so

###########################################################################
#     END OF C O N F I G U R A T I O N       S E C T I O N                #
#                  DO NOT TOUCH ANYTHING BELOW!                           #
###########################################################################

.java.class:
	$(JAVABIN)/javac -g -target 1.1 -classpath $(JCP) $*.java

.c.o:
	$(CC) $(CFLAGS) -o $*.o $*.c

JOBJ=ncsa/hdf/hdflib/HDFException.class \
     ncsa/hdf/hdflib/HDFJavaException.class \
     ncsa/hdf/hdflib/HDFNotImplementedException.class \
     ncsa/hdf/hdflib/HDFConstants.class \
     ncsa/hdf/hdflib/HDFArray.class \
     ncsa/hdf/hdflib/HDFNativeData.class \
     neutron/nexus/NexusException.class \
     neutron/nexus/NXlink.class \
     neutron/nexus/NeXusFileInterface.class \
     neutron/nexus/AttributeEntry.class \
     neutron/nexus/NexusFile.class 
     

COBJ=native/hdfnativeImp.o \
     native/hdfexceptionImp.o \
     native/handle.o \
     native/NexusFile.o

du40: all
rh62: all


all: jnexus.jar libjnexus.so test

jnexus.jar: $(JOBJ)
	- rm jnexus.jar
	$(JAVABIN)/jar cvf jnexus.jar $(JOBJ) \
	  ncsa/hdf/hdflib/ArrayDescriptor.class

libjnexus.so: $(COBJ)
	$(CC)  -o $(SHLIB) $(COBJ)  \
	 $(LFLAGS) -lz -lm 


header: neutron/nexus/NexusFile.class
	$(JAVABIN)/javah -jni -d native neutron.nexus.NexusFile

test: test/TestJapi.class

clean:
	- rm neutron/nexus/*.class
	- rm ncsa/hdf/hdflib/*.class
	- rm native/*.o