# *************************************************************
#	makefile - LBM Interpreter Makefile
# *************************************************************
#***********************************
#  (C) Copyright 1993; dit/upm
#  Distributed under the conditions stated in the
#  TOPO General Public License (see file LICENSE)
#***********************************
# $Id: makefile,v 1.14 1994/11/14 14:45:36 lotos Exp $

TOOL=	interlib
TRGT=	libinter.a

SRCS=	basic.c cond.c draw.c drawkrnl.c ifldi.c info.c \
	memo.c myheval.c offers.c offerset.c rlbset.c spec.c str.c \
	tree.c counter.c transform.c
OBJS=	basic.o cond.o draw.o drawkrnl.o ifldi.o info.o \
	memo.o myheval.o offers.o offerset.o rlbset.o spec.o str.o \
	tree.o counter.o transform.o
HS=	cond.h ifldi.h intercolours.c intercolours.h inter.hh \
	memo.h offers.h offerset.h rlbset.h swbus.h tree.h \
	counter.h

INCDIRS= -I$(EPSINC) -I$(TOPOINC)
LIBDIRS= -L$(EPSLIB) -L$(TOPOLIB)
CFLAGS= $(CF_DBX) $(INCDIRS)

$(TRGT):        $(OBJS)
	ar rcv $@ $(OBJS)
	-ranlib $@

$(OBJS):	$(HS)

install:	user_install adm_install
	touch $@

user_install::	libinter.a
	cp $? $(TOPOLIB)
	-cd $(TOPOLIB); ranlib $?
	chmod a+r $(TOPOLIB)/$?

user_install::	intercolours.h
	cp $? $(TOPOLIB)
	chmod a+r $(TOPOLIB)/$?

user_install::	intercolours.c
	cp $? $(TOPOLIB)
	chmod a+r $(TOPOLIB)/$?

user_install::	inter.desc
	cp $? $(TOPOLIB)
	chmod a+r $(TOPOLIB)/$?

user_install::	inter.hh
	cp $? $(TOPOLIB)
	chmod a+r $(TOPOLIB)/$?

user_install::
	touch $@

adm_install::

clean::
	-rm -f inter.hh
	-rm -f libinter.a
	-rm -f $(OBJS)
	-rm -f core *~
	-rm -f $(TRGT)

.SUFFIXES:	.desc .hh

.desc.hh:
	awk -f $(EPSLIB)/desc-hh.awk $*.desc > tmp.hh
	mv tmp.hh $*.hh

#----------------------------------------------------------
