#------------------------------->  Makefile  <--------------------------------#
#- Copyright (C) 2000 by Free Software Foundation, Inc.                      -#
#- This file is part of the GNU Sather package. It is free software; you may -#
#- redistribute  and/or modify it under the terms of the  GNU General Public -#
#- License (GPL)  as  published  by the  Free  Software  Foundation;  either -#
#- version 2 of the license, or (at your option) any later version.          -#
#- This  program  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 Doc/GPL for more details.        -#
#- The license text is also available from:  Free Software Foundation, Inc., -#
#- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                     -#
#------------->  Please email comments to <bug-sather@gnu.org>  <-------------#

export SATHER_HOME=$(shell cd ../..;pwd)

CS_OPT=-verbose -only_reachable -pretty -chk
SACOMP=$(SATHER_HOME)/bin/sacomp

LCCOMP         =$(SATHER_HOME)/bin/salccomp
LCCOMP_DEF_DIR =$(SATHER_HOME)/resources/lcc-Data/definitions

salccomp: FORCE
	$(SACOMP) salccomp.module -o $(LCCOMP) -main BUILDER $(CS_OPT) -only_C
	$(MAKE) CFLAGS="-I. -g" -C $(LCCOMP).code

FORCE:

# make the boot cultural definitions
iso8859_1:
	cd $(LCCOMP_DEF_DIR); $(LCCOMP) -code ISO8859-1 -config local-win32

# make the default cultural definitions
default:
	cd $(LCCOMP_DEF_DIR); $(LCCOMP) -code UCS2 -config default-win32
