#
# 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 rage.
# date 10/02/1995

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

LOCAL_OBJ       = rage.o
LOCAL_TRGBIN    = $(TARGET_BIN)

LOCAL_INC	= -I$(ALLIANCE_INCLUDE) \
                -DALLIANCE_VERSION='"$(ALLIANCE_VERSION)"' \
		-DMGN_H="<$(MGN_H)>" \
		-DMLU_H="<$(MLU_H)>" \
		-DMPU_H="<$(MPU_H)>" \
		-DMLO_H="<$(MLO_H)>" \
		-DMPH_H="<$(MPH_H)>" \
		-DICU_H="<$(ICU_H)>" \
		-DICN_H="<$(ICN_H)>" \
		-DIAC_H="<$(IAC_H)>" \
		-DMUT_H="<$(MUT_H)>"

LOCAL_LIB     = -L$(ALLIANCE_LIB) \
                 $(MGN_L)\
                 $(MLU_L)\
                 $(MPU_L)\
                 $(MCP_L)\
                 $(MAP_L)\
                 $(MMG_L)\
                 $(MCL_L)\
                 $(MGL_L)\
                 $(MAL_L)\
                 $(MVL_L)\
                 $(MEL_L)\
                 $(MSL_L)\
                 $(MHL_L)\
                 $(RCN_L)\
                 $(MLO_L)\
                 $(MPH_L)\
                 $(ICU_L)\
                 $(ICC_L)\
                 $(ICA_L)\
                 $(ICN_L)\
                 $(MUT_L)\
                 -lm

distrib : $(LOCAL_TRGBIN)/rage

$(LOCAL_TRGBIN)/rage : $(LOCAL_OBJ)
	$(CC)  $(CFLAGS) rage.o  $(LOCAL_LIB) -o $(LOCAL_TRGBIN)/rage
	$(STRIP) $(LOCAL_TRGBIN)/rage

rage.o : rage.c
	$(CC) -c $(CFLAGS) $(LOCAL_INC) -DALC_VER=$(ALLIANCE_VERSION) rage.c

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

realclean : clean
	$(RM) -f $(LOCAL_TRGBIN)/rage

