#
# This file is part of the Alliance CAD System
# Copyright (C) Laboratoire LIP6 - Dpartement ASIM
# Universite Pierre et Marie Curie
# 
# Home page          : http://www-asim.lip6.fr/alliance/
# E-mail support     : mailto:alliance-support@asim.lip6.fr
# 
# This progam is  free software; you can redistribute it  and/or modify it
# under the  terms of the GNU  General Public License as  published by the
# Free Software Foundation;  either version 2 of the License,  or (at your
# option) any later version.
# 
# Alliance VLSI  CAD System  is distributed  in the hope  that it  will be
# useful, but WITHOUT  ANY WARRANTY; without even the  implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
# 
# You should have received a copy  of the GNU General Public License along
# with the GNU C Library; see the  file COPYING. If not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

include $(TOP)/etc/$(MACHINE).mk
include $(TOP)/etc/libraries.mk

LOCAL_TRGLIB   = $(TARGET_LIB)
LOCAL_TRGINC   = $(TARGET_INCLUDE)

LOCAL_INC      = ../include

LOCAL_CPPFLAGS = $(CPPFLAGS) -c     \
                 -I$(LOCAL_INC)        \
		 -I$(ALLIANCE_INCLUDE) \
                 -DMLO_H='<$(MLO_H)>'  \
                 -DBEH_H='<beh109.h>'  \
                 -DBHL_H='<bhl109.h>'  \
                 -DLOG_H='<$(LOG_H)>'  \
                 -DMUT_H='<$(MUT_H)>'

LOCAL_OBJECTS  = beh_chkbefig.o        \
                 beh_debug.o           \
                 beh_freabl.o          \
                 beh_termlist.o        \
                 beh_makgex.o          \
                 beh_makbdd.o          \
                 beh_depend.o          \
                 beh_makderiv.o        \
                 beh_makquad.o

.c.o :
	$(CC) $(LOCAL_CPPFLAGS) $<

distrib : $(LOCAL_TRGLIB)/libBhl109.a

$(LOCAL_TRGLIB)/libBhl109.a : $(LOCAL_OBJECTS)
	$(CP) $(LOCAL_INC)/bhl109.h $(LOCAL_TRGINC)
	$(AR) $(ARFLAGS) $(LOCAL_TRGLIB)/libBhl109.a $(LOCAL_OBJECTS)
	-$(RANLIB) $(LOCAL_TRGLIB)/libBhl109.a


clean :
	$(RM) -f $(LOCAL_OBJECTS)
	$(RM) -f distrib

realclean : clean
	$(RM) -f $(LOCAL_TRGINC)/bhl109.h $(LOCAL_TRGLIB)/libBhl109.a
