diff --git a/drivers/Makefile b/drivers/Makefile index a0c379ed360..17b6a826d5d 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -1,3 +1,7 @@ +subdir-ccflags-y += -I$(srctree)/include/drivers +subdir-ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM)) +subdir-asflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM)) + obj-y = console/ obj-y += random/ obj-y += serial/ diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile index 80cfcf77978..99ed17810f6 100644 --- a/drivers/bluetooth/Makefile +++ b/drivers/bluetooth/Makefile @@ -1,6 +1 @@ -ccflags-y +=-I$(srctree)/include/drivers -ccflags-y +=-I$(srctree)/arch/$(ARCH) -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(strip $(CONFIG_PLATFORM)) - - obj-$(CONFIG_BLUETOOTH_UART)=uart.o diff --git a/drivers/console/Makefile b/drivers/console/Makefile index daeac428c41..d2ca3eeb8de 100644 --- a/drivers/console/Makefile +++ b/drivers/console/Makefile @@ -1,5 +1 @@ -ccflags-y +=-I$(srctree)/include/drivers -ccflags-y +=-I$(srctree)/arch/$(ARCH) -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(strip $(CONFIG_PLATFORM)) - obj-y = uart_console.o diff --git a/drivers/interrupt_controller/Makefile b/drivers/interrupt_controller/Makefile index 9e594221e64..76b6540bb1d 100644 --- a/drivers/interrupt_controller/Makefile +++ b/drivers/interrupt_controller/Makefile @@ -1,7 +1,3 @@ -ccflags-y +=-I$(srctree)/include/drivers -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM)) -asflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM)) - obj-${CONFIG_PIC}${CONFIG_SHUTOFF_PIC} = i8259.o obj-$(CONFIG_PIC) += i8259_boi.o diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 5e19a33ee0a..46c2f61c8da 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -1,6 +1 @@ -ccflags-y += -I$(srctree)/include/drivers - -ccflags-y +=-I$(srctree)/arch/$(ARCH) -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(strip $(CONFIG_PLATFORM)) - obj-$(CONFIG_PCI) = pci.o pci_config.o pci_interface.o diff --git a/drivers/random/Makefile b/drivers/random/Makefile index b4f3d3ce448..79ee7fc9e62 100644 --- a/drivers/random/Makefile +++ b/drivers/random/Makefile @@ -1,5 +1,2 @@ -ccflags-y +=-I$(srctree)/arch/$(ARCH) -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(strip $(CONFIG_PLATFORM)) - obj-$(CONFIG_TIMER_RANDOM_GENERATOR) = rand32-timer.o obj-$(CONFIG_X86_TSC_RANDOM_GENERATOR) += rand32-timestamp.o diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index d5073373749..dd8227eefed 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -1,8 +1,3 @@ -ccflags-y +=-I$(srctree)/include/drivers -ccflags-y +=-I$(srctree)/arch/$(ARCH) -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(strip $(CONFIG_PLATFORM)) - - obj-$(CONFIG_NS16550) = ns16550.o obj-$(CONFIG_K20_UART) = k20UartDrv.o obj-$(CONFIG_STELLARIS_UART) = stellarisUartDrv.o diff --git a/drivers/simple/Makefile b/drivers/simple/Makefile index 81a6b86ef70..fafbf3af1b7 100644 --- a/drivers/simple/Makefile +++ b/drivers/simple/Makefile @@ -1,5 +1 @@ -ccflags-y +=-I$(srctree)/include/drivers -ccflags-y +=-I$(srctree)/arch/$(ARCH) -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(strip $(CONFIG_PLATFORM)) - obj-y=uart.o diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile index 61eab553e43..4d831044aba 100644 --- a/drivers/timer/Makefile +++ b/drivers/timer/Makefile @@ -1,6 +1,3 @@ -ccflags-y +=-I$(srctree)/arch/$(ARCH) -ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM)) - obj-$(CONFIG_PIT) = i8253.o obj-$(CONFIG_HPET_TIMER) += hpet.o obj-$(CONFIG_LOAPIC_TIMER) += loapic_timer.o