Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / Makefile.cfg
index 022a02e..d12710c 100644 (file)
@@ -2,12 +2,15 @@
 # Acess2 Build Configuration
 #
 
+V ?= @
+
 ACESSDIR := $(dir $(lastword $(MAKEFILE_LIST)))
 ACESSDIR := $(shell cd $(ACESSDIR) && pwd)
 
 # Install destination configuration
 DISTROOT := -i $(ACESSDIR)/Acess2.img ::/Acess2
 NCC := $(CC)
+NCXX := $(CXX)
 xCP := mcopy -D o
 xMKDIR := mmd -D s
 
@@ -16,7 +19,6 @@ xMKDIR := mmd -D s
 # Default build programs
 #CC := gcc
 #LD := ld
-AS := nasm
 DISASM := objdump -d -S
 RM := @rm -f
 STRIP := strip
@@ -35,12 +37,26 @@ ifeq ($(ARCHDIR),)
        ARCHDIR := x86
 endif
 
+# Default compilers
+ifneq ($(ARCHDIR),native)
+CC  = $(COMPILERDIR)bin/$(TRIPLET)-gcc
+CXX = $(COMPILERDIR)bin/$(TRIPLET)-g++
+LD  = $(COMPILERDIR)bin/$(TRIPLET)-ld
+OBJDUMP = $(COMPILERDIR)bin/$(TRIPLET)-objdump
+ ifeq ($(AS),as)
+  AS = $(COMPILERDIR)bin/$(TRIPLET)-gcc -c
+ endif
+endif
+
 ifneq ($(ARCH),host)
  ifneq ($(ARCHDIR),$(ARCH))
   include $(ACESSDIR)/BuildConf/$(ARCHDIR)/Makefile.cfg
  endif
 endif
 
+COMPILERDIR := $(ACESSDIR)/Externals/Output/$(ARCHDIR)-BUILD/
+PATH := $(COMPILERDIR)bin/ $(PATH)
+
 ifeq ($(PLATFORM),)
        PLATFORM := default
 endif

UCC git Repository :: git.ucc.asn.au