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


## /*        Alliance CAD System 2.0                                     */
## /*            MBK Package 4.0                                         */
## /*                                                                    */
## /*   Author   :      Jean-Paul CHAPUT                                 */
## /*   E-mail   :  cao-vlsi@masi.ibp.fr                                 */
## /* ------------------------------------------------------------------ */
## /*  makefile  :  Alliance physic Parser/Driver                        */
## /* ****************************************************************** */
## /*  23/09/93:4.02:Jean-Paul CHAPUT                                    */
## /*      Library compiled with the GNU tools (gcc, ...).               */
## /* ------------------------------------------------------------------ */
## /*  15/02/95:4.03:Jean-Paul CHAPUT                                    */
## /*      Read libraries versions from "libraries.mk".                  */
## /* ------------------------------------------------------------------ */
## /*  07/03/95:4.04:Jean-Paul CHAPUT                                    */
## /*      Unwanted message "Good Parser" whiped out.                    */
## /* ------------------------------------------------------------------ */
## /*  13/03/95:4.04:Jean-Paul CHAPUT                                    */
## /*      Unwanted message "V ALLIANCE" whiped out.                     */


## ********************* Alliance Specifics Variables *********************


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


LOCAL_MBKHEADER = -I$(ALLIANCE_INCLUDE) \
				  -DMPH_H='<$(MPH_H)>'  \
				  -DMUT_H='<$(MUT_H)>'


## *********************** C Compilation Variables ************************


LOCAL_CFLAGS = $(CFLAGS) -D$(MACHINE)


## ************** Alliance Physic Format Specifics Variables **************


LOCAL_MAPRCS    = Makefile         \
				  generic_target.h \
				  alc_pars_p.c     \
				  alc_driv_p.c
LOCAL_MAPOBJ    = alc_pars_p.o     \
				  alc_driv_p.o
LOCAL_MAPVER    = 406
LOCAL_MAPLIB    = libMap$(LOCAL_MAPVER).a


## ************************ Distribution Rule *****************************


distrib: $(TARGET_LIB)/$(LOCAL_MAPLIB)

## ************************** Compilation Rules ***************************


$(TARGET_LIB)/$(LOCAL_MAPLIB): $(LOCAL_MAPOBJ)
	$(AR) $(ARFLAGS) $(TARGET_LIB)/$(LOCAL_MAPLIB) $(LOCAL_MAPOBJ); \
	$(RANLIB)        $(TARGET_LIB)/$(LOCAL_MAPLIB)

alc_driv_p.o: alc_driv_p.c generic_target.h
	$(CC) $(LOCAL_CFLAGS) \
		  $(LOCAL_MBKHEADER) -c -DNO_DEBUG=1 \
								 -DCLEANUP=1 alc_driv_p.c

alc_pars_p.o: alc_pars_p.c generic_target.h
	$(CC) $(LOCAL_CFLAGS)   \
		  $(LOCAL_MBKHEADER) -c -DNO_DEBUG=1 \
								 -DCLEANUP=1 alc_pars_p.c


## **************************** Archivage Rule ****************************


checkin: 
	@echo "y" > 1;                             \
	 for i in $(LOCAL_MAPRCS);                 \
	 do                                        \
		 ci -l$(LOCAL_MAPVER)                  \
			-f                                 \
		    -m"rcs version number consistency" \
			  $$i < 1 ;                        \
	 done;                                     \
	 $(RM) 1;


## **************************** Cleanup Rules *****************************


cleanobj:;@$(RM) -f $(LOCAL_MAPOBJ)

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

realclean: clean
	$(RM) -f $(TARGET_LIB)/$(LOCAL_MAPLIB)


