mirror of
https://github.com/schoebel/mars
synced 2025-01-22 15:24:23 +00:00
infra: add standalone make
This commit is contained in:
parent
5feb18d3ad
commit
f525747331
41
kernel/Makefile
Normal file
41
kernel/Makefile
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#
|
||||||
|
# Makefile for out-of-tree build of MARS module
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# By Benjamin Kübler <benjamin.kuebler@1und1.de>
|
||||||
|
#
|
||||||
|
# usage make [ KDIR =/path/to/kernel/source ]
|
||||||
|
|
||||||
|
ifneq ($(KERNELRELEASE),)
|
||||||
|
|
||||||
|
# in-tree-build process
|
||||||
|
include Kbuild
|
||||||
|
|
||||||
|
else
|
||||||
|
# out-of-tree-build process
|
||||||
|
|
||||||
|
MARSSRC := $(shell pwd)
|
||||||
|
DESTDIR ?= /
|
||||||
|
KDIR ?= /lib/modules/`uname -r`/build
|
||||||
|
|
||||||
|
.PHONY: greeting install default clean config
|
||||||
|
|
||||||
|
default: greeting
|
||||||
|
$(MAKE) -C $(KDIR) M=$(PWD)
|
||||||
|
|
||||||
|
greeting:
|
||||||
|
@echo "Building MARS Module again: KDIR=$(KDIR)" ;
|
||||||
|
@if ! test -e $(KDIR)/Makefile ; then \
|
||||||
|
echo -e "Sorry, kernel makefile not found. You need to tell me a correct KDIR!\n" ; \
|
||||||
|
false; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(MAKE) -C $(KDIR) M=$(PWD) clean
|
||||||
|
|
||||||
|
config:
|
||||||
|
$(MAKE) -C $(KDIR) M=$(PWD) config
|
||||||
|
|
||||||
|
install:
|
||||||
|
$(MAKE) -C $(KDIR) M=$(PWD) modules_install
|
||||||
|
endif
|
Loading…
Reference in New Issue
Block a user