blob: c415ad88e83943fb1b9fcee568cfeba9ff568a55 [file] [log] [blame]
Lukas Hänelfc412b42012-06-01 19:12:29 +02001#
2# Makefile for the kernel mobicore drivers
3#
4GUD_ROOT_FOLDER := drivers/gud
5# add our modules to kernel.
Oana Medvesana0361802013-12-20 13:52:46 +01006obj-$(CONFIG_MOBICORE_API) += mcKernelApi.o
7obj-$(CONFIG_MOBICORE_SUPPORT) += mcDrvModule.o
Lukas Hänelfc412b42012-06-01 19:12:29 +02008
Oana Medvesana0361802013-12-20 13:52:46 +01009mcDrvModule-objs := MobiCoreDriver/logging.o \
10 MobiCoreDriver/ops.o \
11 MobiCoreDriver/mem.o \
12 MobiCoreDriver/api.o \
13 MobiCoreDriver/pm.o \
14 MobiCoreDriver/main.o
Lukas Hänelfc412b42012-06-01 19:12:29 +020015
Oana Medvesana0361802013-12-20 13:52:46 +010016mcKernelApi-objs := MobiCoreKernelApi/main.o \
17 MobiCoreKernelApi/clientlib.o \
18 MobiCoreKernelApi/device.o \
19 MobiCoreKernelApi/session.o \
20 MobiCoreKernelApi/connection.o
Lukas Hänelfc412b42012-06-01 19:12:29 +020021
22# Release mode by default
Oana Medvesana0361802013-12-20 13:52:46 +010023ccflags-y := -DNDEBUG -I$(GUD_ROOT_FOLDER)
Lukas Hänelfc412b42012-06-01 19:12:29 +020024ccflags-y += -Wno-declaration-after-statement
25
26ccflags-$(CONFIG_MOBICORE_DEBUG) += -DDEBUG
27ccflags-$(CONFIG_MOBICORE_VERBOSE) += -DDEBUG_VERBOSE
28
29# Choose one platform from the folder
Oana Medvesana0361802013-12-20 13:52:46 +010030MOBICORE_PLATFORM := $(shell (ls -1 $(PWD)/$(GUD_ROOT_FOLDER)/MobiCoreDriver/platforms | tail -1) )
Lukas Hänelfc412b42012-06-01 19:12:29 +020031# Use the available platform folder
Oana Medvesana0361802013-12-20 13:52:46 +010032ccflags-y += -I$(GUD_ROOT_FOLDER)/MobiCoreDriver/platforms/$(MOBICORE_PLATFORM)
33# MobiCore Driver includes
34ccflags-y += -I$(GUD_ROOT_FOLDER)/MobiCoreDriver/public
35# MobiCore KernelApi required incldes
36ccflags-y += -I$(GUD_ROOT_FOLDER)/MobiCoreKernelApi/include
37ccflags-y += -I$(GUD_ROOT_FOLDER)/MobiCoreKernelApi/public