# Makefile for JNI portion of Soma

CC = cc
RM = rm -f
CP = cp

# This is the path to the C header directory of your JDK installation. Usually,
# it's /path/to/jdk/include  You'll have to change this if you don't have Java
# installed under /usr/local/java
JAVA_INCLUDE = /usr/local/java/include
CFLAGS = -c -fPIC -I$(JAVA_INCLUDE)

unixutils.so : unixutils.o
	$(CC) -c -fPIC -I$(JAVA_INCLUDE) unixutils.c -o unixutils.o
	$(CC) --shared -Wl,-soname,libunixutils.so -o libunixutils.so unixutils.o -lc

del:	
	$(RM) *~ *.o

clean: del
	$(RM) unixutils.o libunixutils.so

install: unixutils.so
	$(CP) libunixutils.so ../../bin/jni
