BuildConf - Use cross-compiler
[tpg/acess2.git] / Makefile.cfg
1 #
2 # Acess2 Build Configuration
3 #
4
5 ACESSDIR := $(dir $(lastword $(MAKEFILE_LIST)))
6 ACESSDIR := $(shell cd $(ACESSDIR) && pwd)
7
8 # Install destination configuration
9 DISTROOT := -i $(ACESSDIR)/Acess2.img ::/Acess2
10 NCC := $(CC)
11 xCP := mcopy -D o
12 xMKDIR := mmd -D s
13
14 -include $(ACESSDIR)/Makefile.Version.cfg
15
16 # Default build programs
17 #CC := gcc
18 #LD := ld
19 AS := nasm
20 DISASM := objdump -d -S
21 RM := @rm -f
22 STRIP := strip
23 MKDIR := mkdir -p
24 RMDIR := rm -rf
25 lCP := cp
26 ASSUFFIX = asm
27
28
29 # Load Architecture settings
30 ifeq ($(ARCH),)
31         ARCH := x86
32 endif
33 include $(ACESSDIR)/BuildConf/$(ARCH)/Makefile.cfg
34 ifeq ($(ARCHDIR),)
35         ARCHDIR := x86
36 endif
37
38 # Default compilers
39 CC  = $(COMPILERDIR)bin/$(TRIPLET)-gcc
40 CXX = $(COMPILERDIR)bin/$(TRIPLET)-g++
41 LD  = $(COMPILERDIR)bin/$(TRIPLET)-ld
42 OBJDUMP = $(COMPILERDIR)bin/$(TRIPLET)-objdump
43
44 ifneq ($(ARCH),host)
45  ifneq ($(ARCHDIR),$(ARCH))
46   include $(ACESSDIR)/BuildConf/$(ARCHDIR)/Makefile.cfg
47  endif
48 endif
49
50 COMPILERDIR := $(ACESSDIR)/Externals/Output/$(ARCHDIR)-BUILD/
51 PATH := $(COMPILERDIR)bin/ $(PATH)
52
53 ifeq ($(PLATFORM),)
54         PLATFORM := default
55 endif
56
57 # Makefile.user.cfg is not part of the Acess git repo,
58 # It is for overriding the options in this file
59 -include $(ACESSDIR)/Makefile.user.cfg
60
61 DRIVERS := 
62 MODULES :=
63
64 MODULES += Filesystems/RAMDisk
65 MODULES += Filesystems/Ext2
66 MODULES += Filesystems/FAT
67 MODULES += Filesystems/NTFS
68 MODULES += Storage/LVM
69
70 include $(ACESSDIR)/BuildConf/$(ARCH)/$(PLATFORM).mk
71
72 MODULES += Input/Keyboard Input/Mouse
73 MODULES += IPStack      # So the other modules are loaded before it
74 #DYNMODS := USB/Core
75 #DYNMODS += Filesystems/InitRD
76
77 # BUILD_DIST=y - Install to ./Dist
78 ifneq ($(BUILD_DIST),)
79         DISTROOT := $(ACESSDIR)/Dist
80         xCP := cp
81         xMKDIR := mkdir -p
82 endif

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