#
# makefile for jittr library inside of ScalVico
#
# Jun 12 98, jw
#

TOP     = ../..

include $(TOP)/Machine.mk

include config.mk
TOP     = ../..

LIBDIR  = $(TOP)/lib/$(ARCH)
BINDIR  = $(TOP)/bin/$(ARCH)
INCDIR  = $(INCDIR) -Ijittr
JLIBDIR	= .
LIBNAME	= libjittr.a

all: xxd $(LIBNAME)

complete: install

### The next two lines are for link trickery with parts of the X11 libraries.
#X11_LIBDIR	= /proj/tmp/jnweiger/R6/usrlib #-L/local/X11R6/lib
#LIBXT		= -Xlinker -Bstatic -lXt -Xlinker -Bdynamic

OBJS	= jittr.o atom.o dstring.o misc.o net.o doio.o gettime.o schedule.o \
	  jcmd.o tclHashX.o modload.o jmod.o parse.o link.o attr.o \
	  eprintf.o session.o user.o jqueue.o charset.o

$(LIBNAME): $(OBJS)
	rm -f $@
	ar cr $@ $(OBJS)
	$(RANLIB) $@

xxd: xxd.c
	$(PURIFY) $(CC) $(CFLAGS) -o xxd xxd.c

install-libs install: all
	cd jittr; cp atom.h debug.h schedule.h jittr.h net.h dstring.h ../$(TOP)/include/jittr
	cp $(LIBNAME) $(TOP)/lib/$(ARCH)
	$(RANLIB)     $(TOP)/lib/$(ARCH)/$(LIBNAME)
	cp xxd $(BINDIR)

clean celan: 
	rm -f *.o core xxd

depend: _depend

###################### dependencies, generated by make depend using gcc -MM
include depend.mk
