Oana Medvesan | a036180 | 2013-12-20 13:52:46 +0100 | [diff] [blame^] | 1 | # |
| 2 | # this makefile is called from the kernel make syste |
| 3 | ifeq ($(MODE),release) |
| 4 | ccflags-y += -O2 -DNDEBUG |
| 5 | else # DEBUG |
| 6 | # "-O" is needed to expand inlines |
| 7 | ccflags-y += -O -g3 -DDEBUG |
| 8 | endif # DEBUG/RELEASE |
| 9 | |
| 10 | ifdef MOBICORE_CFLAGS |
| 11 | ccflags-y +=$(MOBICORE_CFLAGS) |
| 12 | endif |
| 13 | |
| 14 | #Set the extra symbols |
| 15 | ifdef MCDRV_SYMBOLS_FILE |
| 16 | KBUILD_EXTRA_SYMBOLS=$(MCDRV_SYMBOLS_FILE) |
| 17 | endif |
| 18 | |
| 19 | ifeq ($(PLATFORM), ARM_VE_A9X4_QEMU) |
| 20 | ccflags-y += -DMC_NETLINK_COMPAT_V37 |
| 21 | endif |
| 22 | |
| 23 | ifeq ($(PLATFORM), MSM8974_SURF_STD) |
| 24 | ccflags-y += -DMC_NETLINK_COMPAT_V37 |
| 25 | endif |
| 26 | |
| 27 | ifeq ($(PLATFORM), EXYNOS_5422_STD) |
| 28 | ccflags-y += -DMC_NETLINK_COMPAT_V37 |
| 29 | endif |
| 30 | |
| 31 | ifeq ($(PLATFORM), EXYNOS_5430_STD) |
| 32 | ccflags-y += -DMC_NETLINK_COMPAT_V37 |
| 33 | endif |
| 34 | |
| 35 | #EXTRA_CFLAGS += -DDEBUG -DDEBUG_VERBOSE |
| 36 | #EXTRA_CFLAGS += -Wno-declaration-after-statement |
| 37 | ccflags-y += -Wno-declaration-after-statement |
| 38 | # add our module to kernel. |
| 39 | obj-m += mcKernelApi.o |
| 40 | |
| 41 | mcKernelApi-objs := main.o clientlib.o device.o session.o connection.o |
| 42 | |
| 43 | clean: |
| 44 | rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions \ |
| 45 | Module.markers Module.symvers modules.order |
| 46 | |
| 47 | depend .depend dep: |
| 48 | $(CC) $(CFLAGS) -M *.c > .depend |
| 49 | |
| 50 | ifeq (.depend,$(wildcard .depend)) |
| 51 | include .depend |
| 52 | endif |