Browse Source

Detect whether we're cross compiling

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
master
Stefan Reinauer 8 months ago
parent
commit
92ea53d66a
1 changed files with 13 additions and 3 deletions
  1. +13
    -3
      Makefile

+ 13
- 3
Makefile View File

@@ -1,12 +1,17 @@

obj-m += zz9000.o zz9000_network.o zz9000_usb.o zz9000_graphics.o
zz9000-y := zz9000_core.o

#export KROOT=/lib/modules/$(shell uname -r)/build
ARCH=$(shell uname -p)
ifneq ($(ARCH),m68k)
export KROOT=/usr/src/linux-source-5.4

MAKEOPTS=ARCH=m68k CROSS_COMPILE=m68k-linux-gnu-
else
export KROOT=/lib/modules/$(shell uname -r)/build
endif

allofit: modules

allofit: modules copy
modules:
@$(MAKE) $(MAKEOPTS) -C $(KROOT) M=$(PWD) modules
modules_install:
@@ -20,3 +25,8 @@ clean: kernel_clean
FILES := Makefile zz9000.h zz9000_core.c zz9000_usb.c zz9000_network.c zz9000_graphics.c
FILES += zz9000.ko zz9000_network.ko zz9000_usb.ko zz9000_graphics.ko

copy:
cp $(FILES) /storage/stepan/amiga-drivers/
@cd /storage/stepan; tar cf ~/amiga.tar amiga-drivers; cd -
@#echo scp $(FILES) root@192.168.0.40:amiga-drivers/


Loading…
Cancel
Save