###############################################################################
#
# Makefile
#
# Make program to build portable tools for the Aldor compiler
#
# Copyright Aldor.org 1990-2007.
#
###############################################################################
#
# These tools can built on various platforms and
# can be used to help build and test a compiler.
#
###############################################################################

MAKEFILE=NMakefile
CFLAGS=-nologo

# $(ALDORROOT) is retrieved from the environment
SRC   = ..\..\src
BIN   = $(ALDORROOT)\bin
TOOLS = $(ALDORROOT)\toolbin

COMMFILES	= $(SRC)\platform.h $(SRC)\cconfig.h $(SRC)\signal.h0 \
		  $(SRC)\stdarg.h0 $(SRC)\stddef.h0 $(SRC)\stdio.h0 \
		  $(SRC)\string.h0

OSFILES		= tx_opsys.c tx_unix.c tx_win32.c

all:	$(TOOLS)\testaldor.exe

clean:
	@ $(RM) *~

##############################################################################
#
# :: Portable tools
#
##############################################################################

#
# Rules to get the common source files (as links or copies)
#

# testaldor: Run aldor compiler test suite.
$(TOOLS)\testaldor.exe: testaldor.c $(COMMONFILES) testaldor.h $(OSFILES)
	$(CC) $(CFLAGS) testaldor.c -Fe$(TOOLS)\testaldor.exe

