New answers tagged make
1
There were two issues preventing the compiling of the program.
First, as answered by steeldriver, the library path was not correctly included and the libs were not correctly referenced in GCC.
Second, several cpp source files were missing, either accidentally deleted or not successfully decompressed from the archive the first time.
Once these issues were ...
0
Included in linux-image the name is atlantic (output from debian buster):
$ modinfo atlantic
filename: /lib/modules/4.19.0-13-amd64/kernel/drivers/net/ethernet/aquantia/atlantic/atlantic.ko
description: aQuantia Corporation(R) Network Driver
author: aQuantia
version: 2.0.3.0-kern
license: GPL v2
To load the driver:
sudo ...
0
You can use MAKECMDGOALS to get the target:
all clean:
ifeq ($(MAKECMDGOALS), clean)
@echo "This is an clean recipe"
else
@echo "This is not a clean recipe."
endif
$ make
This is not a clean recipe.
$ make clean
This is an clean recipe
2
Then I'd like to append .o to each word.
There is no need for the round trip through the shell. Make is powerful
enough to provide helpers for common operations on file names
like this. In your case you want the function with the self-explanatory name
addsuffix:
DEPENDENCIES = $(addsuffix .o, $(DEPENDENT_FILES))
Which gets you a.o b.o c.o for an input list ...
0
You need to realize that for all the similarities in their syntaxes, make and shell are quite apart and have to be used with abundant caution. To make matters worse, make is very stingy with its warnings.
You erred in two places in your make code:
## bad code
DEPENDENCIES := $(echo '$DEPENDENT_FILES' | sed 's/\>/\.o/g')
There is no GNU make built-in ...
1
Functions always looked clearer to me then %:
CLASS1=foo far
CLASS2=boo bar
define f
$1/qux.json: $(wildcard $1/*.csv)
$2
endef
$(foreach i, $(CLASS1), $(eval $(call f, $i,my-script1.py -o $$@ $$^)))
$(foreach i, $(CLASS2), $(eval $(call f, $i,my-script2.py -o $$@ $$^)))
But really, writing the following takes less time:
foo/qux.json: $(wildcard foo/*....
Top 50 recent answers are included
Related Tags
make × 814compiling × 138
linux × 99
gnu-make × 54
bash × 52
shell × 47
gcc × 46
kernel × 45
debian × 44
software-installation × 41
linux-kernel × 40
configure × 37
ubuntu × 36
centos × 27
kernel-modules × 23
cmake × 22
drivers × 20
freebsd × 20
libraries × 19
shell-script × 16
arch-linux × 16
gnu × 15
kali-linux × 14
c × 14
source × 14