# Makefile
# $Id: Makefile,v 1.1 1996/11/13 17:36:19 abaird Exp $
# This makefile should build the libUnix.so.
# This package is not required in order to run the jigsaw server however, 
# it will allow you to have Jigsaw run on port 80, and as a specific user/
# group o Unix platforms

# Your compiler setting
      CC = gcc

# Where is your java distribution ?
# Enter here, the directory in which you unfold the JDK tar file.

    JAVA = /usr/local/java

# Where did you compile the Jigsaw java sources ?
# Enter the directory in which you have compiled the Jigsaw server sources.

  JIGSAW = /u/www43/0/w3c/abaird/Work/WWW/Jigsaw/src/classes

# ***** Don't edit below this line *****

    JINC = -I$(JAVA)/include -I$(JAVA)/include/solaris
  CFLAGS = $(JINC) -fpic -O

all: libUnix.so

# Building the stubs:

       STUBS = w3c_util_Unix.h w3c_util_Unix.c

  CLASSESDEP = $(JIGSAW)/w3c/util/Unix.java

     CLASSES = w3c.util.Unix

stubs: $(STUBS) 

w3c_util_Unix.h: $(CLASSESDEP)
	javah -o w3c_util_Unix.h $(CLASSES)

w3c_util_Unix.c: $(CLASSESDEP)
	javah -o w3c_util_Unix.c -stubs $(CLASSES)

# Building the library (to be dynamilly linked into the Java runtime)

LIB_OBJS = unix.o \
	w3c_util_Unix.o 

libUnix.so: stubs $(LIB_OBJS) 
	ld -r -o libUnix.so $(LIB_OBJS)

libShuffle_g.so: libUnix.so
	cp libUnix.so libUnix_g.so

# Clean the world

clean:
	rm -f $(LIB_OBJS) $(STUBS) *~ libUnix.so libUnix_g.so
