Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 1 | Upstream-Status: Inappropriate [embedded specific] |
| 2 | |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame] | 3 | Signed-off-by: Armin Kuster <akuster808@gmail.com> |
| 4 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 5 | |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame] | 6 | Index: git/Makefile |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame] | 7 | =================================================================== |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame] | 8 | --- git.orig/Makefile |
| 9 | +++ git/Makefile |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 10 | @@ -7,15 +7,8 @@ |
| 11 | |
| 12 | P_OUTPUT = output |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame] | 13 | P_PWD ?= $(shell pwd) |
| 14 | -P_KVER ?= $(shell uname -r) |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 15 | P_BOOTUP_SCRIPT ?= scripts/bootup/lkrg-bootup.sh |
| 16 | TARGET := p_lkrg |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame] | 17 | -ifneq ($(KERNELRELEASE),) |
| 18 | - KERNEL := /lib/modules/$(KERNELRELEASE)/build |
| 19 | -else |
| 20 | - ## KERNELRELEASE not set. |
| 21 | - KERNEL := /lib/modules/$(P_KVER)/build |
| 22 | -endif |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame] | 23 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 24 | # |
| 25 | # Use DEBUG=on for debug build. |
| 26 | @@ -94,14 +87,13 @@ $(TARGET)-objs += src/modules/ksyms/p_re |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame] | 27 | src/p_lkrg_main.o |
| 28 | |
| 29 | |
| 30 | -all: |
| 31 | -# $(MAKE) -C $(KERNEL) M=$(P_PWD) modules CONFIG_DEBUG_SECTION_MISMATCH=y |
| 32 | - $(MAKE) -C $(KERNEL) M=$(P_PWD) modules |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame] | 33 | +modules: |
| 34 | + $(MAKE) -C $(KERNEL_SRC) M=$(P_PWD) modules |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 35 | mkdir -p $(P_OUTPUT) |
| 36 | cp $(P_PWD)/$(TARGET).ko $(P_OUTPUT) |
| 37 | |
| 38 | -install: |
| 39 | - $(MAKE) -C $(KERNEL) M=$(P_PWD) modules_install |
| 40 | +moduled_install: |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame] | 41 | + $(MAKE) -C $(KERNEL_SRC) M=$(P_PWD) modules_install |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 42 | depmod -a |
| 43 | $(P_PWD)/$(P_BOOTUP_SCRIPT) install |
| 44 | |
| 45 | @@ -109,7 +101,7 @@ uninstall: |
| 46 | $(P_PWD)/$(P_BOOTUP_SCRIPT) uninstall |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame] | 47 | |
| 48 | clean: |
| 49 | - $(MAKE) -C $(KERNEL) M=$(P_PWD) clean |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 50 | + $(MAKE) -C $(KERNEL_SRC) M=$(P_PWD) clean |
| 51 | $(RM) Module.markers modules.order |
| 52 | $(RM) $(P_PWD)/src/modules/kmod/client/kmod/Module.markers |
| 53 | $(RM) $(P_PWD)/src/modules/kmod/client/kmod/modules.order |