Questions tagged [makefile]

A makefile is an input file for the build control language/tool make. It specifies targets and dependencies along with associated commands to perform (a.k.a. recipes) to update the targets.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

How to get the exit status of a Make target script command to return as the Make command exit status itself?

I have a Make target which runs a shell script that return an exit status 45 (lets say). After running the Make target as command on shell , I want to check the $? variable value giving me 45 or not. ...
A.G.Progm.Enthusiast's user avatar
0 votes
1 answer
13 views

Is it possible to get the name of the current function/variable in a makefile

Is there a builtin variable like .VARIABLES that is the equivalent of __FUNCTION__ in C? I.e. the following.. my_variable=$(1) and $(.VARIABLE) $(info $$(call my_variable,1) is "$(call ...
Maarten ten Velden's user avatar
0 votes
0 answers
30 views

I am getting Error while Cross-compiling my application program for LS1043

I am using LS1043 board, I want to generate rootfs for my application. I am trying to compile my application program. While cross-compiling my application I am getting errors. I think I have some ...
Dibyarekha Maharana's user avatar
1 vote
0 answers
43 views

Makefile compiles every source every time [duplicate]

I'm a beginner (in everything, really) studying C. For the exercises of a book, I have made this project directory: book_name ├── chapter01 │ ├── exer01 │ │ └── exe.c │ └── exer02 │ └── ...
newbie's user avatar
  • 11
0 votes
1 answer
14 views

Unable to activate venv from python makefile

I have the following python makefile. .ONESHELL: TEST_DIR = ./tests DIR_NAME = $(shell date "+%Y-%m-%d_%T") .PHONY: clean test backup env env: . .venv/bin/activate test: env clean ...
Sai Chaithanya's user avatar
-1 votes
0 answers
10 views

Why does rpmbuild say it needs a file that already exists?

I'm trying to package an RPM of a systemd service written in C and managed by autoconf and autotools. I've created a /debug directory inside the project directory and run /home/vagrant/dev/configure --...
wwillfred's user avatar
-2 votes
0 answers
15 views

"Insert File Name" Is a directory [closed]

I'm working on a cs50x problem set and I usually keep running into this issue where every so often when i try to compile my code; it just returns saying that it is a directory and not compiling. I ...
sam's user avatar
  • 1
-3 votes
0 answers
62 views

Cannot open source file "iostream". After updating to macos 14 [closed]

After updating macos from version 12 to 14 (Sonoma), VScode and Clion do not see any libraries Cannot open source file "iostream". Please run the Select IntelliSense Configuration... command ...
mmos vlad's user avatar
-1 votes
0 answers
19 views

Pi pico C/C++ SDK library linking issue

I am building a C++ code for my raspberry pi pico and I'm facing a linking problem. My code uses the following libraries this is the main.cpp #include "stdlib.h" #include "...
TFO's user avatar
  • 11
0 votes
0 answers
25 views

can't install operator_sdk on win10: "cannot use syscall.NsecToFiletime"

following instructions from official operator_sdk page, trying to install it on windows 10, amd64. i installed make tool itself via choco. make --version GNU Make 4.4.1 Built for Windows32 Copyright (...
ERJAN's user avatar
  • 23.8k
1 vote
0 answers
22 views

How can I use the variable "qemu_name" defined in softmmu/globals.c in QEMU in hw/core/irq.c?

I want to use "qemu_name" variable in hw/core/irq.c. I added #include "sysemu/sysemu.h" in hw/core/irq.c, because "qemu_name" declared as an extern variable in sysemu/...
rusty_green's user avatar
1 vote
1 answer
61 views

make : ifort : command not found

I am trying to compile a Fortran code on a Linux Ubuntu machine and I'm getting the following error (in bold): calcul@gpuserver:~/dp3D/src$ ./makedp3D Do you want to use standard directory /home/...
Júlia Bonaldo's user avatar
-1 votes
0 answers
42 views

make Error 2 How to see the Error description

Getting below error after compiling CPP code through Makefile, Error description is not visible. I have used "Make -d" but, still cant see the error description. Reaping losing child ...
StackQuery's user avatar
0 votes
0 answers
66 views

gcc -MMD omits local header files

I'm invoking gcc with -MMD, and it lists some, but not all, the header files. I've copied the FreeRTOS source into my project, include those files via #include <...>, and set the the -I path in ...
SRobertJames's user avatar
  • 8,373
0 votes
0 answers
13 views

Running make command throws issue error: ‘crypto_sign_SEEDBYTES’ was not declared in this scope

I am running the make command as suggested by the documentation, but i am getting below error: ./include/mega/crypto/sodium.h:38:40: error: ‘crypto_sign_SEEDBYTES’ was not declared in this scope 38 ...
Witty Apps's user avatar
1 vote
1 answer
21 views

Makefile: comma split variable as multiple arguments

Consider following makefile example: a=1,2,3 b=$1 $2 $3 $(info $(call b,$(a))) Run this will give me 1,2,3 as output of info function. How can I let Makefile replace a and consider it as three ...
ckf104's user avatar
  • 71
0 votes
0 answers
23 views

Despite the definition of the type of disease, the software still does not diagnose the variable. What should I do؟ [closed]

I am working on a discrete event simulation project. I want my patients to go through different routes according to the type of disease, which I did with the filter in the condition section, but the ...
sajedeh's user avatar
0 votes
0 answers
15 views

make: execvp : Permission denied [closed]

I am trying to build software from source. When I run sudo make install it works fine. However, to build it correctly, I need to include the path in the sudo make install like this sudo make <my-...
cmucheru's user avatar
0 votes
0 answers
35 views

FAILED: out/soong/build.aosp_x86_64.ninja

When I am trying to build android by running make command it throws the following error. How to solve it? ~/AOSP/aosp$ make -j8</code></pre> [ 99% 443/445] analyzing Android.bp files and ...
Vicky's user avatar
  • 1
1 vote
0 answers
56 views

Is there a way to have a central place for variables that can be used in Visual Studio projects, Xcode projects, and Makefiles?

I'm working on a fork of a cross-platform C / C++ open-source project that can be compiled for macOS, Windows, and Linux. The project uses a different toolchain for compiling for each platform: Xcode, ...
Bri Bri's user avatar
  • 2,209
0 votes
1 answer
18 views

How to successfully run make install without root privileges

I'm trying to package an RPM of a systemd service written in C and managed by autoconf and autotools. I've learned that I should not build programs as root, which means that I should run make instead ...
wwillfred's user avatar
0 votes
2 answers
111 views

How to write a Makefile with multiple object files, each having different dependencies, while minimizing code redundancy?

I've recently started learning about Makefiles, but I've encountered an issue involving multiple object files with different dependencies. Specifically, these are the dependencies: main.o: main.c ...
Speedyspeedboy's user avatar
1 vote
0 answers
22 views

Why cmake and make inside dockerfile does not do anything

I have following lines in docker file: WORKDIR /my_ws # clone opencv RUN git clone https://github.com/opencv/opencv.git # clone opencv_contrib RUN git clone https://github.com/opencv/...
MsA's user avatar
  • 2,599
0 votes
0 answers
64 views

how to access source code variable in make file [closed]

Guidance required to accessing source code variable in make file. Declared and defined a Variable in source file (.c file). /Note: Test_Version.c file available in home directory/ char SwVerion[] = &...
Mohanchandra's user avatar
0 votes
1 answer
21 views

Having trouble satisfying a dependency during compilation

I apologize in advance, I am very new to using linux. I am attempting to install the proxmark3 client on Pop!OS and everything goes well up until I try to make all in the github repo. This is what I ...
Psilobus's user avatar
0 votes
0 answers
31 views

Selective Compilation in C++ via Make

I am trying to modify a pre-made makefile to prevent the compilation of certain specified files and directories. How would I go about this if I wanted to prevent a file "src/values.cpp" from ...
RoboticsGuy's user avatar
0 votes
1 answer
70 views

Can a static C library cause filename collisions?

My static c library libmylib.a contains common file names such as array.o and linkedlist.o If a user using my library has files with the same names (array.c and linkedlist.c) will they end up with ...
Kevin Basta's user avatar
-2 votes
0 answers
32 views

The impossibility to run a executable after a make: how can I run the program?

I downloaded the source files of a certain program then I compiled it, without errors. Then, I tried to run the program, without success. A bit of context, this code is a bunch of fortran routines to ...
M.N.Raia's user avatar
-1 votes
0 answers
22 views

Trying to define a variable inside a target in gnu make [closed]

I am trying to define a variable inside a target but the variable keeps coming up blank for some reason. I am using gnu make version 4.1. Can some tell me what I am doing wrong? This code does not ...
Twowolfs's user avatar
0 votes
0 answers
31 views

Makefile that rebuilds when headers change with libraries [duplicate]

So, currently trying to update my Makefile to make .d files so that changes in headers are also caught and recompiled. I've tried a few attempts and I'm running into an error where gcc can't find ...
Sam Kent's user avatar
1 vote
2 answers
24 views

Why is this Makefile behavior different from bash

So I have a make file with various commands. One of the commands just runs the main python script, but before doing so it exports environment variables stored in dev.env. The make file command to run ...
user27886's user avatar
  • 552
0 votes
1 answer
39 views

Why doesnt make create file for the target " other_file" in below example?

I am new to make utility and I was going through a tutorial. In the tutorial, they gave an example where every time we run make on it, the targets are executed because target file is not created. My ...
Jane's user avatar
  • 21
0 votes
0 answers
17 views

why linker looks for LIBCMT.lib in x86 directory instead x64?

SETUP Windows 10 GOAL I found a library libnodave to communicate through S7-protocol I'm trying to build examples on x64 architecture through edited makefile ISSUE Even though I set directories ...
PiotrBzdrega's user avatar
-7 votes
0 answers
34 views

Using RK628D on RK3588 - Convert HDMI to Dual LVDS Signal for LVDS Screen [closed]

Introduction This article summarizes the debugging for RK628D based on the RK3588 ,SDK version: RK3588_ANDROID12.0. Video bridge chip: RK628D Driver code: "kernel-5.10\drivers\misc\RK628" (...
armsom's user avatar
  • 1
0 votes
1 answer
41 views

Makefile syntax error near unexpected token

Run for all the PROC to be executed. ## Run for all the proc to be executed. $(PROC): @if [ -a $(TEST_DIR)/[email protected] ]; then \ $(info $(TARG) );\ $(info $(CSEED) );\ $(info &...
suaa's user avatar
  • 1
0 votes
2 answers
17 views

Makefile string comparison inside target

I have the following Makefile FIRSTARG := $(firstword $(MAKECMDGOALS)) # use the rest as arguments RUNARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) # ...and turn them into do-nothing ...
Adam's user avatar
  • 131
0 votes
0 answers
15 views

Cant find -lgcc_s when compiling C-Code in an docker container

I am working on my own OS but when compiling I am getting the following errors: /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: error: ld ...
Jake420's user avatar
-1 votes
0 answers
26 views

Linker "skipping incompatible" SDL libraries? [duplicate]

I am following a SDL tutorial on VSCode and I am getting this error: make g++ -I src/include -L src/lib -o main.cpp -lminggw32 -lSDL2main -lSDL2 C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13....
null.16's user avatar
0 votes
0 answers
20 views

Add a bash alias via a Makefile target

I want to add an alias to the current bash session via a Makefile command. Here is what I did in the Makefile: .PHONY: addalias addalias: alias myalias="echo Hello World" But it is not ...
Fiti's user avatar
  • 189
-1 votes
0 answers
28 views

Fixing the error occurred in building the make file for a C++ Libraries

I was trying to build a makefile for C++ library packages in Ubuntu 20.04. The given compilation instruction is as follows- You need to have a c++ compiler and libarpack. and You also need to include ...
explorer's user avatar
  • 135
0 votes
0 answers
16 views

The linker is not linking the C and asm object files [duplicate]

I'm working on an OS and I'm trying to get it to load. I have a dummy kernel for now, and I'm trying to get my bootloader to load it im using a make file to do it faster and it keeps giving the same ...
Minecraft Teen's user avatar
0 votes
0 answers
9 views

How to manage make workflows / builds where the installation source's existence might change and differ from application folders?

How to manage make workflows / builds where the installation source's state might change? This example comes from OpenBSD: https://www.openbsd.org/faq/ports/ports.html#PortsInstall. But might/should ...
mavavilj's user avatar
  • 139
0 votes
1 answer
26 views

Taking Input with Makefiles

Basically, I'm trying to automate the pushing process of code to github with makefiles, but I want me to be able to provide the commit message to the Makefile before it commits, this is why I want to ...
Debarka Naskar's user avatar
0 votes
0 answers
46 views

Configure: error: C++ preprocessor "/lib/cpp" fails sanity check on Apple M1 [duplicate]

I have already reviewed pretty much all solutions on similar issues, but still haven't figured out my problem. Here's the situation: there is a ./configure script I'm trying to run so that I can have ...
Pedram's user avatar
  • 2,421
4 votes
1 answer
115 views

Ubuntu compilation: File format not recognized error in C

When I compile on macOS it works, however in Ubuntu it does not, and instead I get this error: main.o: file not recognized: File format not recognised collect2: error: ld returned 1 exit status ...
SUGAR's user avatar
  • 81
1 vote
0 answers
53 views

Debug info gone when changing executable's directory

I'm still learning makefile and I created a generic makefile to build a simple AVR project. I use Proteus to simulate the application, but I'm having an issue debugging the application when I change ...
Nabil Yasser's user avatar
-2 votes
0 answers
41 views

"go mod" deadlock when multiple jobs are run in parallel with gnu Make

I am using gnu Make to run go tests. recipe is to copy _test.go to a unique directory, cd into this directory, set this directory as "GOPATH", run go mod tidy to download dependencies, go ...
sdev's user avatar
  • 11
0 votes
1 answer
27 views

Start and kill background process within one Makefile recipe

Within one make recipe, I am trying to: Run a server process in the background Run a command that uses the server, in the foreground Kill the background server process after foreground task completes ...
Intrastellar Explorer's user avatar
-1 votes
0 answers
16 views

How to create makefile (SO library) for glib library, and what all path is should include for compilation in c in Vim editor in ubuntu 22.04

--Glib folder --Project_root/ ├── records/ │ ├── headers/ │ │ ├── student_management.h │ │ │ ├── src/ │ │ ├── student_management.c │ │ │ ├── ...
Pre_01's user avatar
  • 1
0 votes
0 answers
31 views

Visual Studio Code Run Without Debugging seems to be pointing to the last executed path

I have a root folder with three folders each containing a project (Project1a, Project1b, and Project2). Project1a and Project1b consist of a single .c file with int main() while Project2 contains ...
kd8's user avatar
  • 53

1
2 3 4 5
504