#
# 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) \
                 -DBEH_H='<beh109.h>' \
                 -DLOG_H='<$(LOG_H)>' \
                 -DMUT_H='<$(MUT_H)>'

LOCAL_OBJECTS = beh_addbeaux.o beh_addbebux.o  beh_addbebus.o beh_addbefig.o \
                beh_addbegen.o beh_addbemsg.o  beh_addbeout.o beh_addbepor.o \
                beh_addbereg.o beh_addberin.o  beh_addbiabl.o beh_addbinod.o \
                beh_addbeder.o beh_addbequad.o \
                beh_delbeaux.o beh_delbebux.o  beh_delbebus.o beh_delbefig.o \
                beh_delbegen.o beh_delbemsg.o  beh_delbeout.o beh_delbepor.o \
                beh_delbereg.o beh_delberin.o  beh_delbiabl.o beh_delbinod.o \
		beh_delbeder.o beh_delbequad.o \
                beh_frebeaux.o beh_frebebux.o  beh_frebebus.o beh_frebefig.o \
                beh_frebegen.o beh_frebemsg.o  beh_frebeout.o beh_frebepor.o \
                beh_frebereg.o beh_freberin.o  beh_frebiabl.o beh_frebinod.o \
		beh_frebeder.o \
                beh_rmvbeaux.o beh_rmvbebux.o  beh_rmvbebus.o beh_rmvbefig.o \
                beh_rmvbegen.o beh_rmvbemsg.o  beh_rmvbeout.o beh_rmvbepor.o \
                beh_rmvbereg.o beh_rmvberin.o  beh_rmvbeder.o \
                beh_getgenva.o \
                beh_dict.o     \
                beh_message.o  beh_error.o     beh_toolbug.o

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

distrib : $(LOCAL_TRGLIB)/libBeh109.a

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


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

realclean : clean
	$(RM) -f $(LOCAL_TRGINC)/beh109.h $(LOCAL_TRGLIB)/libBeh109.a
