简体   繁体   中英

how to make 'makefile"? Compile Error

obj-m += interceptor.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


make: make nothing to be done for all <---error

I don't know how to solve it.

You need a tab (must be a tab, not spaces) before line 3 and line 5, like:

all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

DO NOT COPY DIRECTLY from the sample above, since the tab I typed has been converted to spaces by Stackoverflow.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM