From 246109db20d55bb7deb50af2f62f40b96fa4e831 Mon Sep 17 00:00:00 2001
From: John Hodge <tpg@mutabah.net>
Date: Wed, 5 Oct 2011 12:09:08 +0800
Subject: [PATCH] Modules/PS2KbMouse - Fixed 8042 not being initialised

---
 Modules/Input/PS2KbMouse/8042.c | 2 ++
 Modules/Input/PS2KbMouse/main.c | 4 ++--
 Modules/Makefile.tpl            | 8 +++++++-
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/Modules/Input/PS2KbMouse/8042.c b/Modules/Input/PS2KbMouse/8042.c
index fd78bb69..e11bc74f 100644
--- a/Modules/Input/PS2KbMouse/8042.c
+++ b/Modules/Input/PS2KbMouse/8042.c
@@ -38,6 +38,8 @@ void KBC8042_KeyboardHandler(int IRQ, void *Ptr)
 {
 	Uint8	scancode;
 
+//	Log("KBC8042_KeyboardHandler: (IRQ=%i, Ptr=%p)", IRQ, Ptr);
+
 	scancode = inb(0x60);
 	KB_HandleScancode( scancode );
 }
diff --git a/Modules/Input/PS2KbMouse/main.c b/Modules/Input/PS2KbMouse/main.c
index 7a2b83d4..0015b93d 100644
--- a/Modules/Input/PS2KbMouse/main.c
+++ b/Modules/Input/PS2KbMouse/main.c
@@ -36,10 +36,10 @@ MODULE_DEFINE(0, 0x0100, PS2Mouse, PS2Mouse_Install, NULL, NULL);
 // === CODE ===
 int PS2_Install(char **Arguments)
 {
-	#if ARCH_is_x86 || ARCH_is_x86_64
+	#if ARCHDIR_is_x86 || ARCHDIR_is_x86_64
 	KBC8042_Init();
 	gpMouse_EnableFcn = KBC8042_EnableMouse;
-	#elif ARCH_is_armv7
+	#elif ARCHDIR_is_armv7
 	PL050_Init(KEYBOARD_IRQ, KEYBOARD_IRQ, MOUSE_BASE, MOUSE_IRQ);
 	gpMouse_EnableFcn = PL050_EnableMouse;
 	#endif
diff --git a/Modules/Makefile.tpl b/Modules/Makefile.tpl
index b404046a..36445f68 100644
--- a/Modules/Makefile.tpl
+++ b/Modules/Makefile.tpl
@@ -6,7 +6,13 @@ _CPPFLAGS := $(CPPFLAGS)
 
 -include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg
 
-CPPFLAGS := -I$(ACESSDIR)/Kernel/include -I$(ACESSDIR)/Kernel/arch/$(ARCHDIR)/include -DARCH=$(ARCH) $(_CPPFLAGS)
+LIBINCLUDES := $(addprefix -I$(ACESSDIR)/Modules/Libraries/,$(LIBS))
+LIBINCLUDES := $(addsuffix /include,$(LIBINCLUDES))
+
+CPPFLAGS := -I$(ACESSDIR)/Kernel/include -I$(ACESSDIR)/Kernel/arch/$(ARCHDIR)/include
+CPPFLAGS += -DARCH=$(ARCH) -DARCH_is_$(ARCH) -DARCHDIR_is_$(ARCHDIR)
+CPPFLAGS += $(_CPPFLAGS)
+CPPFLAGS += $(LIBINCLUDES)
 CFLAGS := -std=gnu99 -Wall -Werror -fno-stack-protector -g -O3 -fno-builtin
 
 ifneq ($(CATEGORY),)
-- 
GitLab