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

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