# Install destination configuration
DISTROOT := a:/Acess2
xCP := mcopy -D o
-xMKDIR := mmd
+xMKDIR := mmd -D s
ACESSDIR := $(dir $(lastword $(MAKEFILE_LIST)))
ACESSDIR := $(shell cd $(ACESSDIR) && pwd)
# Default build programs
-CC := gcc
-LD := ld
+#CC := gcc
+#LD := ld
AS := nasm
DISASM := objdump -d -S
RM := @rm -f
RMDIR := rm -rf
lCP := cp
+
# Load Architecture settings
ifeq ($(ARCH),)
ARCH := i386
endif
--include $(ACESSDIR)/Makefile.$(ARCH).cfg
+include $(ACESSDIR)/Makefile.$(ARCH).cfg
ifeq ($(ARCHDIR),)
ARCHDIR := x86
endif
--include $(ACESSDIR)/Makefile.$(ARCHDIR).cfg
+ifneq ($(ARCH),host)
+include $(ACESSDIR)/Makefile.$(ARCHDIR).cfg
+endif
# Makefile.user.cfg is not part of the Acess git repo,
# It is for overriding the options in this file
FILESYSTEMS :=
DRIVERS :=
-MODULES := Storage/ATA Storage/FDD
-MODULES += Network/NE2000
-MODULES += Display/VESA
-#MODULES += Display/BochsGA
+MODULES :=
MODULES += Filesystems/Ext2
MODULES += Filesystems/FAT
MODULES += Filesystems/NTFS
-MODULES += IPStack
-DYNMODS := USB/Core
+
+ifeq ($(ARCHDIR),x86)
+MODULES += Storage/ATA Storage/FDD
+MODULES += Network/NE2000 Network/RTL8139
+MODULES += Display/VESA
+MODULES += Display/BochsGA
MODULES += Interfaces/UDI
+MODULES += Input/PS2KbMouse
+MODULES += x86/ISADMA x86/VGAText
+endif
+
+ifeq ($(ARCHDIR),x86_64)
+MODULES += Storage/ATA Storage/FDD
+MODULES += Network/NE2000 Network/RTL8139
+MODULES += Display/BochsGA
+MODULES += Interfaces/UDI
+MODULES += Input/PS2KbMouse
+MODULES += x86/ISADMA x86/VGAText
+endif
+
+MODULES += IPStack # So the other modules are loaded before it
+DYNMODS := USB/Core
+#DYNMODS += Filesystems/InitRD