Makefile.am 817 B

12345678910111213141516171819202122232425262728293031323334
  1. ifeq ($(RELEASE_PACKAGE),1)
  2. EXTRA_CFLAGS+=-DRELEASE_PACKAGE
  3. endif
  4. LBITS := $(shell getconf LONG_BIT)
  5. ifeq ($(LBITS),64)
  6. CCFLAGS += -m64
  7. EXTRA_CFLAGS+=-DSYSTEM_IS_64
  8. else
  9. CCFLAGS += -m32
  10. endif
  11. rmnet_core_dir = $(prefix)/rmnet_core
  12. rmnet_core_CFLAGS = -Werror
  13. KERNEL_FLAGS ?= ARCH=arm
  14. module = rmnet_core.ko
  15. kmake = $(MAKE) $(KERNEL_FLAGS) -C $(KERNEL_DIR) M=$(CURDIR)
  16. $(module):
  17. $(kmake) modules
  18. all-local: $(module)
  19. install-exec-local: $(module)
  20. $(kmake) INSTALL_MOD_PATH=$(DESTDIR)$(prefix)/modules modules_install
  21. # "make distclean" will always run clean-local in this directory,
  22. # regardless of the KERNELMODULES conditional. Therefore, ensure
  23. # KERNEL_DIR exists before running clean. Further, don't fail even
  24. # if there is a problem.
  25. clean-local:
  26. -test ! -d "$(KERNEL_DIR)" || $(kmake) clean