# Makefile
# $Id: Makefile,v 1.2 1998/02/04 15:23:00 ylafon 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/java11

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

  JIGSAW = /u/tarantula/0/w3c/ylafon/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 = org_w3c_util_Unix.h org_w3c_util_Unix.c

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

     CLASSES = org.w3c.util.Unix

stubs: $(STUBS) 

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

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

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

LIB_OBJS = unix.o \
	org_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
