Skip to content

Commit

Permalink
Merge pull request #281 from Integral-Tech/replace-make
Browse files Browse the repository at this point in the history
Replace make with $(MAKE) in Makefile
  • Loading branch information
jserv authored Nov 11, 2024
2 parents 9c39011 + 56c16b9 commit f3405fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lkmpg.tex
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ \subsection{The Simplest Module}
PWD := $(CURDIR)
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
\end{code}
In \verb|Makefile|, \verb|$(CURDIR)| can set to the absolute pathname of the current working directory(after all \verb|-C| options are processed, if any).
Expand Down Expand Up @@ -461,10 +461,10 @@ \subsection{Hello and Goodbye}
PWD := $(CURDIR)

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
\end{code}

Now have a look at \src{drivers/char/Makefile} for a real world example.
Expand Down Expand Up @@ -604,10 +604,10 @@ \subsection{Modules Spanning Multiple Files}
PWD := $(CURDIR)
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
\end{code}
This is the complete makefile for all the examples we have seen so far.
Expand Down

0 comments on commit f3405fe

Please sign in to comment.