## Define some of the tools that are used by the make process.

# The u++ translator is used to build the kernel, and library support code.

CC = $(PACKAGE)/src/translator/bin-$(OS)-$(CPU)/u++

CCFLAGS = -B$(PACKAGE)/src/translator/lib-$(OS)-$(CPU) -I. -I$(PACKAGE)/src/collection -I$(PACKAGE)/src/kernel -I$(PACKAGE)/src/scheduler -I$(PACKAGE)/src/library -I$(PACKAGE)/src/debugger -I$(PACKAGE)/src/profiler -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" -DTMPDIR=\"$(TMPDIR)\"
#CCFLAGS += -profile -D__U_PROFILEABLE_ONLY__

HOSTNAME = $(shell hostname)
ifeq ($(HOSTNAME),plg2.math)
	CCFLAGS += -g -O2 -Wall -Wno-unused-label # -O3
else
	CCFLAGS += -O2 -Wall -Wno-unused-label # -O3
endif

ifeq ($(TOS),solaris)
    ifeq ($(TCPU),sparc)
	CCFLAGS += -mcpu=v9
	ASFLAGS += -D_ASM
    endif
endif

AR = ar cr

RL = $(shell if [ -f /usr/bin/ranlib -o -f /bin/ranlib ]; then echo "ranlib"; else echo "echo"; fi)

RM = rm -rf

INSTALL = cp
CHMODEXEC = chmod 0755
CHMODDATA = chmod 0644
