Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 2018 VeriSilicon. All Rights Reserved.
  2. # This program is free software; you can redistribute it and/or
  3. # modify it under the terms of the GNU General Public License
  4. # as published by the Free Software Foundation; either version 2
  5. # of the License, or (at your option) any later version.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. # GNU General Public License for more details.
  10. # You should have received a copy of the GNU General Public License
  11. # along with this program; if not, write to the Free Software
  12. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
  13. # USA.
  14. DEBUG ?= n
  15. ifeq ($(DEBUG),y)
  16. DEBFLAGS = -O -g -DVIDMEM_DEBUG
  17. else
  18. DEBFLAGS = -O2
  19. endif
  20. EXTRA_CFLAGS += $(DEBFLAGS)
  21. ifneq ($(KERNELRELEASE),)
  22. # recursive call from kernel build system
  23. vidmem-objs := video_memory.o rsvmem_pool.o
  24. obj-m += vidmem.o
  25. else
  26. #KDIR := /export/Testing/Board_Version_Control/SW_Common/SOCLE_MDK-3D/openlinux/2.6.29/v0_5/android_linux-2.6.29
  27. KVER := $(shell uname -r)
  28. KDIR := /lib/modules/$(KVER)/build
  29. PWD := $(shell pwd)
  30. all:
  31. $(MAKE) -C $(KDIR) M=$(PWD) modules
  32. endif
  33. clean:
  34. rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *.mod
  35. rm -rf modules.order Module.symvers