#
# 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 $(ALLIANCE_TOP)/etc/$(ALLIANCE_OS).mk
include $(ALLIANCE_TOP)/etc/libraries.mk

EXEC         = flatbeh
#TARGET_BIN   = .

#LOCAL_CFLAGS = $(CFLAGS) -g -static
LOCAL_CFLAGS = $(CFLAGS) -g 


LOCAL_INC = -I$(ALLIANCE_INCLUDE) \
            -DALLIANCE_VERSION=$(ALLIANCE_VERSION) \
            -DMUT_H='<$(MUT_H)>' \
            -DBDD_H='<$(BDD_H)>' \
            -DAUT_H='<$(AUT_H)>' \
            -DMLO_H='<$(MLO_H)>' \
            -DMLU_H='<$(MLU_H)>' \
            -DABL_H='<$(ABL_H)>' \
            -DABE_H='<$(ABE_H)>' \
            -DABV_H='<$(ABV_H)>'
            
LOCAL_LIB = -L$(ALLIANCE_LIB) \
   $(ABV_L) \
   $(ABE_L) \
   $(ABT_L) \
   $(MLU_L) \
   $(MCL_L) \
   $(MAL_L) \
   $(MSL_L) \
   $(MHL_L) \
   $(MEL_L) \
   $(MVL_L) \
   $(MGL_L) \
   $(RCN_L) \
   $(MLO_L) \
   $(BDD_L) \
   $(ABL_L) \
   $(AUT_L) \
   $(MUT_L)


#ULAX        = -ULAX
#PURIFY      = purify -logfile=$(EXEC).pure
LOCAL_OBJ    = abstract.o utils.o main.o

.c.o :
	$(CC) $(LOCAL_CFLAGS)  $(LOCAL_INC) -c $<


$(TARGET_BIN)/$(EXEC) : $(LOCAL_OBJ)
	$(PURIFY) $(CC) $(CFLAGS) $(LOCAL_CFLAGS) -o $(TARGET_BIN)/$(EXEC) $(LOCAL_OBJ) $(LOCAL_LIB) -lm 


tag :
	ctags *.c *.h ; etags *.c *.h

clean :
	$(RM) -f $(LOCAL_OBJ) *~

realclean : clean
	$(RM) -f $(TARGET_BIN)/$(EXEC) 
