#############################################################################
##
#W  Makefile                    GAP source                       Frank Celler
##
#H  @(#)$Id: Makefile.in,v 1.5 1999/07/01 15:32:24 gap Exp $
##
#Y  Copyright (C)  1997,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
##
##  This file is the top level make file.  It is generated from `Makefile.in'
##  by the `configure' script.  After unpacking XGAP you simply type
##
##    ./configure
##
##  to create a make file and then
##
##    make
##
##  to compile and link XGAP.
##
##  The "default" traget:
##    - creates a subdirectory CPU-VENDOR-OS in the directory `bin',
##    - copies the configuration script into this directory,
##    - it switches into this directory and executes the configure script,
##    - it makes XGAP in this directory.
##
##  The "clean" target:
##    - removes the subdirectory CPU-VENDOR-OS in the directory `bin'
##    - removes any files created by `configure'
##
SHELL=/bin/sh
CC=x86_64-mandriva-linux-gnu-gcc


default: config compile

config: bin/x86_64/configure bin/x86_64/Makefile

bin/x86_64/configure: cnf/configure.out
	if test ! -d bin;  then mkdir bin;  fi
	if test ! -d bin/x86_64;  then mkdir bin/x86_64;  fi
	@rm -f bin/x86_64/configure
	cp cnf/configure.out bin/x86_64/configure

bin/x86_64/Makefile: bin/x86_64/configure cnf/config.hin
	( cd bin/x86_64 ; CC=$(CC) ./configure --target=x86_64-mandriva-linux-gnu x86_64-mandriva-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib64 --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --x-includes=/usr/include --x-libraries=/usr/lib64 )

compile: bin/x86_64/configure bin/x86_64/Makefile
	( cd bin/x86_64 ; $(MAKE) CC=$(CC) )
	chmod +x xgap.sh
	cp xgap.sh bin/xgap.sh

clean:
	rm -rf bin/x86_64
	rm -f xgap.sh bin/xgap.sh
	rm -f config.cache config.log config.status Makefile
