Skip to main content

Questions tagged [make]

For questions pertaining to make, a utility that automates the build process by managing dependencies amongst targets. Use this tag for questions about make itself or questions about issues arising from using the make command-line utility.

Filter by
Sorted by
Tagged with
1 vote
1 answer
22 views

GNU `make`, modification times, leap seconds and NTP

GNU make relies on timestamps to see if a dependency was changed after some file was built. If you make a change during the leap second or an NTP adjustment, is it possible that make will believe the ...
Tomek Czajka's user avatar
0 votes
0 answers
16 views

Getting these make command errors while compiling an android kernel

──(root㉿kali)-[~/Documents/kernel-source-alioth-stock] └─# make -j2 CC=clang O=output/ $config make[1]: Entering directory '/root/Documents/kernel-source-alioth-stock/output' .... HOSTLD scripts/...
Sunil Kumar Das's user avatar
1 vote
1 answer
67 views

How to make all targets in the Makefile depend on a specific file?

Here in make I want to make all targets in the whole Makefile depend on a specific file. (That specific file is Makefile in fact, because that's where I have all my formulas. But that's beside the ...
Dan Jacobson's user avatar
0 votes
1 answer
41 views

String replace in wildcard using find command

I want to exclude all C files that have a matching asm file. The assembly files all have _x86_64.S at the end. The C files have identical names, but with .c instead of _x86_64.S at the end. How would ...
Ryan Maguire's user avatar
5 votes
1 answer
148 views

How to make MAKEFLAGS=--warn-undefined-variables apply to current Makefile?

Yes I read Communicating Options to a Sub-'make' but I want to set an option for this make, not a sub-make, and set it within the Makefile, not via the command line. $ cat Makefile MAKEFLAGS = --warn-...
Dan Jacobson's user avatar
0 votes
0 answers
126 views

How to build OpenSSL from source, without depending on /lib/libcrypto.so

After several sessions with intense Google searching and trying several angles with ChatGPT, I seem to be at a dead-end, my problem arises when I try to build OpenSSL from source, it seems that the ...
user1359448's user avatar
0 votes
0 answers
20 views

How to setup dependencies in Makefile for C/C++ program?

I am writting a C program in Linux using GNU and Makefile. Now I want to do something before building the codes in Makfile. CSRCS += a.c CSRCS += b.c CSRCS += x.c object=$(patsubst %.c,%.o,$(CSRCS)) ...
wangt13's user avatar
  • 551
0 votes
0 answers
61 views

How can I fix scripts in WSL2-Linux-Kernel:pahole-flags.sh not found and syntax error in mconf-cfg.sh

I'm trying to modify the kernel,but scripts that indeed exists were reported missing.I've checked the file permissions and library dependencies,but the error remains. version: my wsl:Ubuntu-24.04LTS ...
jack111's user avatar
0 votes
1 answer
31 views

What wildcards will work with Make's .INTERMEDIATE target?

Isn't there some wildcard I can use for Make's .INTERMEDIATE target? $ cat Makefile .INTERMEDIATE: *.csv %.csv #failed .INTERMEDIATE: north.csv g.csv #worked Or must I list each and every file each ...
Dan Jacobson's user avatar
0 votes
0 answers
26 views

buildroot external.mk target with variable parameters not working

I would like to merge configuration from Makefile, for this I've updated external.mk and introduced this: # Custom target to merge multiple defconfig files .PHONY: merge merge: @if [ -z "$(...
onorua's user avatar
  • 121
0 votes
0 answers
289 views

Building GCC 9.1.0 fails (make: *** [Makefile:1004: all] Error 2)

Coding newbie, I'm a researcher trying to get an air quality program to run. It requires GCC9.1.0, but during the make step I keep getting an error line: make[1]: Leaving directory '/home/(my name)/...
tmm's user avatar
  • 1
1 vote
1 answer
282 views

Why touching just one source, make recompiles again the other untouched source file?

Just touching file mod1.c, make should just recompile that source file, produce its correspondent object file, mod1.o, and should not recompile mod2.c, because the object file mod2.o will be still ...
nostromo's user avatar
  • 113
0 votes
0 answers
84 views

Installing External Wifi Adapter on Fedora 40

i'm new here, I'm trying to install an external wifi adapter ( cause my laptop is old ( not that old but still ) and it can't detect 5G signals at all ), the steps given by manufacturer is quite ...
Starsky Ganing's user avatar
1 vote
1 answer
150 views

Is it recommended to include the Makefile itself as a dependency in make recipes?

When developing Makefiles, I often need to run a 'clean' target when I edit the Makefile itself to ensure that the newest recipes are executed. It seems like there must be a way to include the ...
Shane's user avatar
  • 19
0 votes
1 answer
69 views

cc1plus going almost idle after a while

Does not matter if i pass -j3 or -j2 to make command. Sooner or later all the cc1plus processes go from around 100% CPU usage to almost none What is that ?
kellogs's user avatar
  • 163
0 votes
0 answers
9 views

Get output of subproccess in Makefile using zsh [duplicate]

I would like to conditionally execute a Makefile target based on the current OS. I am running MacOS with zshell. install: @uname @if [ "$(uname)" = "Darwin" ]; then \ ...
Timothy Pulliam's user avatar
0 votes
1 answer
89 views

Updating GRUB; ./configure doesn't make a makefile. Step 5 of INSTALL guide missing?

I am trying to update GRUB from 2.06 to 2.12, following the instructions in the INSTALL textfile included in the tarball (and at the bottom of the post). I am missing some dependencies, so I run: sudo ...
SuperDialga's user avatar
0 votes
1 answer
147 views

Specify compiled OpenSSL directory to wpa_supplicant

I am trying to compile wpa_supplicant, which requires OpenSSL, which I have compiled and installed to a custom directory, build such that the file ssl.h is in build/include/openssl/ssl.h Now, when I ...
Noob YT's user avatar
0 votes
0 answers
24 views

Evaluate command inside comparison in makefile [duplicate]

I would like to check if Linux system is ubuntu inside Makefile. What I do is: copy_files: if [ "$(head -n 1 /etc/lsb-release | cut -d '=' -f2)" = "Ubuntu" ]; then \ ...
ellat's user avatar
  • 137
2 votes
2 answers
972 views

What does '\($*\)' mean in sed regular expression in a makefile?

I encounter the following sed command in make's manual. sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' And it has the following effect (this is an example in the manual): main.o : main.c defs.h # is turned into:...
liginity's user avatar
  • 143
1 vote
1 answer
179 views

How to install autoconf as alternative in the system?

I am using a fairly dated Ubuntu 18/RHEL6 system with old build tools, I'm trying to update it but don't want to crush the existing tools installation. I created the following script which installed ...
codenamezero's user avatar
0 votes
1 answer
320 views

Building GCC 12.2.0 from source for aarch64 target

I've been trying to cross compile the source code to build GCC 12.2.0 for my RaspberryPi 4 B running Ubuntu 22.04. SO far I've tried doing this while configuring the project: ../gcc-12.2.0/configure --...
MetalAllegiance's user avatar
1 vote
1 answer
178 views

How to join strings without implicit space?

I'm trying to organize a Makefile with complex commands into something more readable. I'm trying to break down a long list of parameters, but even single parameters are too bad, hence I wanted to ...
gcb's user avatar
  • 542
0 votes
0 answers
706 views

Install TP-Link Archer T2U V3 driver in Linux without Internet

I'm using an Archer T2U v3 on my Ubuntu 14.04 and 16.04 system and on a Linux Mint system based on these Ubuntu versions. It works flawlessly with the driver directly provided by TP-Link from their ...
A. Bhowmick's user avatar
0 votes
0 answers
22 views

Quering the instalation prefix of a c library with pkg-config

I am writing Makefile that installs a c shared library to the system, including the .pc file for pkg-config. I would like to add an uninstall target, but the location of it will depend on the PREFIX ...
00M's user avatar
  • 11
3 votes
1 answer
1k views

fatal error: bsd/string.h: No such file or directory

According to the answer I need to include -lbsd to the gcc command. But I have no idea where I am supposed to insert it here. I'm using Ubuntu 24.04, Linux vivobook16-m1605xa-mb089 6.8.0-31-generic #...
chipichippichappachapppa's user avatar
0 votes
2 answers
28 views

Specifying a toplevel installation directory

I am building the lean prover system git clone https://github.com/leanprover/lean4 --recurse-submodules cd lean4 mkdir -p build/release cd build/release cmake ../.. make But rather than using a ...
Vera's user avatar
  • 1
0 votes
0 answers
27 views

How to correct this script to detect OS type? [duplicate]

I'm trying to modify a Makefile so I can easily run my app by make run run: OUTPUT=${uname -a | awk '{ print tolower($1)}'} bin/${OUTPUT}_${ARCH}/${APP_NAME} Running uname -a | awk '{ print ...
anta40's user avatar
  • 421
3 votes
1 answer
475 views

How can I use $0 in Makefile?

I would like to include the following command (taken from here) in a Makefile. A simple version of my Makefile script containing the command is: copy_files: sed 's/^/\./' ./input_file | \ ...
ellat's user avatar
  • 137
0 votes
0 answers
63 views

How to replace installed openssl and use my own openssl to build `make` script

I'm really new in Linuxverse, so please understand if I'm asking standard (or may a dumb) question. I've seen so many post about how to remove openssl, but mostly they told to not remove it because it'...
flix's user avatar
  • 143
3 votes
1 answer
560 views

Why does the Makefile rule still execute when prerequisites do not exist in the current directory?

I have a Makefile that says: aaa:bbb echo 456 bbb: echo 123 When there is no bbb file in the directory, these two rules will execute regardless of whether there is an aaa file or not. But why?...
lcWhhx's user avatar
  • 33
0 votes
1 answer
76 views

what is the meaning when a makefile rule has prerequisites but without the recipe?

INSTALL = /usr/local/bin/install -c INSTALLDATA = /usr/local/bin/install -c -m 644 # The directory to install tar in. bindir = $(prefix)/bin # The directory to install the info files in. infodir = $(...
lcWhhx's user avatar
  • 33
1 vote
1 answer
287 views

make: *** No targets. Stop

why when the make command in the code code throws an error make: *** No targets. Stop. Code: NAME := program FLAG := -std=c11 -Wall -Wextra -Werror -Wpedantic all: $(NAME) $(NAME): *.c clang $...
German Enjoy's user avatar
0 votes
0 answers
248 views

Building httpd can't find Openssl

I am attempting to rebuild apache from source and am encountering an issue I have not previously had. I have built apache version 2.4.57 from source many times in the past and have had no issue during ...
user10709800's user avatar
0 votes
0 answers
179 views

How to compile this SDL2 sample program?

I tried to build this SDL2 sample program, but failed. I made it with Makefile: CFLAGS = -I/usr/include CC = arm-linux-g++ sdltest: sdl2-test.cpp $(CC) sdl2-test.cpp -L/usr/lib/x86_64-...
Stan Huang at Taiwan's user avatar
0 votes
0 answers
23 views

Failed to build newlib4.4 for ARM in WSL2 Linux x86_64

I am working on an embedded RTOS system for ARM platform, it is using newlib-3.1. Now I am trying to support newlib-4.4 for the system in WSL2 (Ubuntu-20.04.6 for X86_64). The cross-compiler for ARM ...
wangt13's user avatar
  • 551
0 votes
1 answer
473 views

Why Package libnetfilter_queue was not found in the pkg-config search path?

I tried make all go build -o bettercap . go build github.com/chifflier/nfqueue-go/nfqueue: # pkg-config --cflags -- libnetfilter_queue Package libnetfilter_queue was not found in the pkg-config ...
MikiBelavista's user avatar
0 votes
1 answer
34 views

Why is the configuration file in the parameter list of make command?

Here is the command line I got from a chip maker: make sunxi_defconfig ARCH=arm CROSS_COMPILE=arm-linux- It surely failed with message of *** Error during writing of the configuration. make[1]: *** [...
Stan Huang at Taiwan's user avatar
1 vote
0 answers
831 views

log output (stdout) from within make file

How do I send the output (stdout) to a log file from WITHIN the make file? I am NOT interested in a command line solution such as "make > build.log". Listed below is my generic make file. ...
jwzumwalt's user avatar
  • 289
1 vote
1 answer
768 views

Makefile:12: *** missing separator. Stop [duplicate]

In trying to compile my makefile, I keep getting the same error message repeatedly: Makefile:12: *** missing separator. Stop I've removed the tabs, removed the spaces, deleted the makefile entirely ...
Kyla Henry's user avatar
1 vote
1 answer
129 views

ADCIRC - Cannot find -lhdf5_fortran: No such file or directory

Trying to compile ADCIRC, a Fortran program with NetCDF support, and I hit the following error. /usr/bin/ld: cannot find -lhdf5_fortran: No such file or directory collect2: error: ld returned 1 exit ...
Alexandre Georges's user avatar
0 votes
1 answer
181 views

Help with Makefile for C program

I'm trying to generate a new library that includes another one I have created previously. In my current folder I have my source files inside a src folder and my headers inside an include folder. This ...
Ricardo Sisco's user avatar
0 votes
0 answers
180 views

Makefile and pid files

I have some convenience rules in a Makefile that depends on pid files, but sometimes the pid files are there when the processes aren't. What's a good pattern to work around this in make? For example, ...
gcb's user avatar
  • 542
0 votes
1 answer
348 views

Make does not rebuild transitive dependencies of pattern rules on change, why?

I have a Makefile, roughly so: .PRECIOUS: %.a %.b %.c %.a: touch $@ %.b: %.a touch $@ %.c: %.b touch $@ If I create "test.c" with a make test.c, all the 3 files (...
peterh's user avatar
  • 10k
0 votes
0 answers
68 views

make: *** No rule to make target 'mykernel.bin'. Stop

I'm worrking on an OS but I'm getting this error with my makefile.win. Looks like the linker.ld output file doesn't match the naming convention of the file i'm making (mykernel.bin). Not sure if that'...
Abilaash's user avatar
0 votes
1 answer
492 views

Issue with make and sudo make in Linux kernel module compilation

I am currently working on a simple Linux kernel module and have encountered an issue related to running make and sudo make commands. Here's the content of my Makefile: obj-m := main.o all: make -...
pro-codes's user avatar
1 vote
1 answer
3k views

How to compile every c file separately and then link all objects with a makefile?

I am working with microchip microcontrollers for a quite a while, and I fully dislike very much Netbeans. So since Mplab migrated to Netbeans I am trying to do all the work by my own, and here is the ...
Lazcol's user avatar
  • 13
0 votes
1 answer
484 views

using mingw on Linux Mint

I need to build Windows binaries from a conventional source tarball. I recall that I used to do this in a RedHat environment using specialised configure and make scripts from mingw packages. But I'm ...
user22108's user avatar
  • 101
1 vote
1 answer
490 views

make command doesn't produce any executable

My Makefile contains the following: CC=gcc CFLAGS=-Wall main: hello.o hello_fn.o clean: rm -f main hello.o hello_fn.o It should have produced an executable file main (I've read that in ...
Rodion Iskhakov's user avatar
1 vote
1 answer
234 views

How to ask make to not always re-create files depending on .PHONY targets?

I have this: .PHONY: check check: script-returning-nearly-always-zero obj2.img: obj1.img check make-obj2-from-obj1 So, logic is that I want to re-generate obj2.img, if it is older as obj1 (...
peterh's user avatar
  • 10k

1
2 3 4 5
21