#
# 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

EXEC         = flatbeh
#TARGET_BIN   = .

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


LOCAL_INC = -I$(ALLIANCE_INCLUDE) \
            -DALLIANCE_VERSION=$(ALLIANCE_VERSION) \
            -DMUT_H='<$(MUT_H)>' \
            -DMLO_H='<$(MLO_H)>' \
            -DBEH_H='<$(BEH_H)>' \
            -DLOG_H='<$(LOG_H)>'
LOCAL_LIB = -L$(ALLIANCE_LIB) \
            $(MUT_L)          \
            $(MLU_L)          \
            $(MCL_L)          \
            $(MGL_L)          \
            $(MAL_L)          \
            $(RCN_L)          \
            $(MHL_L)          \
            $(MVL_L)          \
            $(MSL_L)          \
            $(MEL_L)          \
            $(MLO_L)          \
            $(BVL_L)          \
            $(BEH_L)          \
            $(BHL_L)          \
            $(LOG_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 
	$(STRIP) $(TARGET_BIN)/$(EXEC)


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

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

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