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

# makefile for scan-path genrator


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


ALC_LIB = -L$(ALLIANCE_LIB) \
           $(MLU_L) \
           $(MPU_L) \
           $(MCP_L) \
           $(MAP_L) \
           $(MMG_L) \
           $(MCL_L) \
           $(MGL_L) \
           $(MAL_L) \
           $(MVL_L) \
           $(MEL_L) \
           $(MSL_L) \
           $(MHL_L) \
           $(MLO_L) \
	   $(RCN_L) \
           $(MPH_L) \
           $(BVL_L) \
           $(BHL_L) \
           $(BEH_L) \
           $(PPT_L) \
           $(PHL_L) \
           $(PAT_L) \
           $(LOG_L) \
           $(MUT_L) 


ALC_INC = -I$(ALLIANCE_INCLUDE) \
          -DMLU_H='<$(MLU_H)>' \
          -DMPU_H='<$(MPU_H)>' \
          -DMLO_H='<$(MLO_H)>' \
          -DMPH_H='<$(MPH_H)>' \
          -DBVL_H='<$(BVL_H)>' \
          -DBHL_H='<$(BHL_H)>' \
          -DBEH_H='<$(BEH_H)>' \
          -DPPT_H='<$(PPT_H)>' \
          -DPAT_H='<$(PAT_H)>' \
          -DPHL_H='<$(PHL_H)>' \
          -DLOG_H='<$(LOG_H)>' \
          -DMUT_H='<$(MUT_H)>' \
          -DSAX_H='<$(SAX_H)>' 

#TARGET_BIN     = .
#PURIFY         = purify  -logfile=$(EXEC).pure
EXEC           = genscan
OBJ            = environment.o scan_path.o utile.o genscan.o

LOCAL_CFLAGS   = $(ALC_INC) -DALCVER=$(ALLIANCE_VERSION)

distrib : $(TARGET_BIN)/$(EXEC)

$(TARGET_BIN)/$(EXEC) : $(OBJ) 
	$(CC) $(CFLAGS) $(LOCAL_CFLAGS) -o $(TARGET_BIN)/$(EXEC)  $(OBJ) $(LOCAL_LDFLAGS) $(ALC_LIB)
	$(STRIP) $(TARGET_BIN)/$(EXEC)

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

clean :
	$(RM) -f $(OBJ)

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