#
# A makefile for extensions files on Sun (with gcc)
#
# Copyright (C) 1993, 1994 Erick Gallesio - I3S - CNRS / UNSA <eg@unice.fr>
# 
#
# Permission to use, copy, and/or distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
# that both the above copyright notice and this permission notice appear in
# all copies and derived works.  Fees for distribution or use of this
# software or derived works may only be charged with express written
# permission of the copyright holder.  
# This software is provided ``as is'' without express or implied warranty.
#
#           Author: Erick Gallesio [eg@kaolin.unice.fr]
#    Creation date:  6-Mar-1994 15:49
# Last file update:  6-Apr-1994 21:39

include ../config.make

#define here how to obtain Position Independant Code (pic) with your compiler
PIC   = -fpic

# Define here the extension you want to be defined 
EXT = hash.so time.so when.so

CFLAGS= $(PIC) $(STKCFLAGS) -DUSE_TK -I../Tk -I../Tcl -I../Src $(XINCLUDES) 

##############################################################################
.SUFFIXES: .so .o .c

.c.so:
	$(CC) -c $(CFLAGS) -o $*.o $<
	ld -assert pure-text -o $*.so $*.o

.o.so: 
	ld -assert pure-text -o $*.so $<
##############################################################################
all: $(EXT)

install:
	$(INSTALL) $(EXT) $(libdir)

clean:
	@/bin/rm -f *.o *.so core *~
