 #
 #
 #  Copyright (C) 2001 Numeric Solutions.  All Rights Reserved.
 #
 #  Permission is hereby granted, without written agreement and without license 
 #  or royalty fees, to use, copy, modify, and distribute this software and its 
 #  documentation for any purpose, provided that the above copyright notice 
 #  appears in all copies of this software.
 #  
 #  Contact information: Numeric Solutions support@numericsolutions.com, or:
 #
 #  http://www.numericsolutions.com
 #
 #


#NSLIBS = -L $(NSGEO_HOME)/lib/ -lnsgeodata -L $(NSGEO_HOME)/lib/ -lnsgeomath
NSLIBS = -L $(NSGEO_HOME)/lib/ -L $(NSGEO_HOME)/lib/ 
MATHLIBS = -lm

CC = gcc 
CPP = g++

INCLUDES = -I./

NSGEOJNIOBS = nsgeodata.o nsgrid.o negeomath.o nsgeotoolsjniglue.o

default: nsgeodata.o nsgeomath.o nsgrid.o nsgeotoolsjniglue.o libnsgeojniglue

libnsgeojniglue: nsgeotoolsjniglue.cpp
	$(CPP) nsgeodata.o nsgeomath.o nsgrid.o nsgeotoolsjniglue.o -g -O2 --shared -o libnsgeotoolsjniglue.so $(NSLIBS)  $(MATHLIBS)
	cp libnsgeotoolsjniglue.so ../../../lib/


nsgeodata.o: nsgeodata.cpp
	$(CPP) nsgeodata.cpp -c -g -O2

nsgrid.o: nsgrid.cpp
	$(CPP) nsgrid.cpp -c -g -O2

nsgeomath.o: nsgeomath.cpp
	$(CPP) nsgeomath.cpp -c -g -O2

nsgeotoolsjniglue.o:	nsgeotoolsjniglue.cpp
	$(CPP) $(INCLUDES)  -g -I$(JAVA_HOME)/include/ -I$(JAVA_HOME)/include/linux/  nsgeotoolsjniglue.cpp  -c -fPIC -g -O

clean:
	rm -f core *.o *.so

