##############################################################################
#
# Makefile
#
# Win32 tools.
#
# Copyright (c) 1990-2007 Aldor Software Organization Ltd (Aldor.org).
#
##############################################################################
#
# These tools can be used to help build a compiler using Microsoft VC++
# under Win95.
#
# Update: Feb20, 04 LDR
# This is intended for making aldor compiler work in Cygwin, mingw environment
# It requires cygwin, mingw.
#
#  2006/Dec/22
#
#  On Solaris, the value of PWD does not change when make is invoked
#  recursively.  Consequently, it is necessary to explicitly set it
#  at the start of the makefile.
#
PWD = $(shell pwd)

SHELL=/bin/sh

ALDORTOOL=$(ALDORROOT)/toolbin

OKFILES = Makefile NMakefile tee.c \
	  doaxiomxl.bat doaldor.bat doax0.bat \
	  aldor.sh unicl.sh doaldor.sh lib.sh \
	  doranlib doaldor \
	  scripts.mak include.mak lib.mak test.mak

all: $(ALDORTOOL)/doranlib $(ALDORTOOL)/doaldor
	cp aldor.sh $(ALDORROOT)/bin/aldor.sh
	chmod a+x $(ALDORROOT)/bin/aldor.sh
	cp unicl.sh $(ALDORROOT)/bin/unicl.sh
	chmod a+x $(ALDORROOT)/bin/unicl.sh
	cp doaxiomxl.bat $(ALDORROOT)/toolbin/doaxiomxl.bat
	cp doaldor.bat $(ALDORROOT)/toolbin/doaldor.bat
	cp doax0.bat $(ALDORROOT)/toolbin/doax0.bat

$(ALDORTOOL)/doranlib: ../unix/doranlib	;	cp $< $@
$(ALDORTOOL)/doaldor: ../unix/doaldor 	;	cp $< $@

clean:
	@ rm -f *~

junk:
	@ ls -d $(OKFILES) * | sort | grep -v CVS | uniq -u
