Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
60 views

This Makefile specifies a target-specific variable and a global one VAR=value target: VAR2=value2 ifdef VAR VAR3+=$(VAR) endif ifdef VAR2 VAR3+=$(VAR2) endif target: @echo $(VAR) $(VAR2)...
user377486's user avatar
2 votes
1 answer
61 views

I am trying to compile .c-files and store the output .o-files into different folders. When making a debug-build, the output files should be stored in build/debug/. When making a release-build, the ...
user44791's user avatar
1 vote
1 answer
65 views

From here, I realize it is possible to query the pwd. I have the following 2 lines that I currently comment on/off # LDLIBSOPTIONS=-L "/home/OpenXLSX/linux/lib" LDLIBSOPTIONS=-L "/...
One_Cable5781's user avatar
1 vote
1 answer
60 views

I am trying to save the output of a makefile. I have tried everything that I can think of without success. > >> tee compile.log > 1> tee compile.log > 2> tee compile.log > &>...
jwzumwalt's user avatar
  • 211
2 votes
3 answers
177 views

I want to build make test with Makefile, and the test target should generate <file_name>_test executable based on the folder tests/<file_name>.c. All tests/*.c files have a main() function....
stackbiz's user avatar
  • 1,914
3 votes
2 answers
173 views

The lib folder contains many *.h and *.c files, and all files are in development phrase and they contain many errors including syntax errors. So I want to write the Makefile to debug all libraries one ...
stackbiz's user avatar
  • 1,914
2 votes
2 answers
139 views

C/Makefile relative newbie here. I have a C project whose structure looks like this: main.c subdir1 a.h a.c b.h b.c subdir2 x.h x.c y.h ...
user12066's user avatar
  • 673
0 votes
1 answer
79 views

The following is a minimal example from something odd that was happening to me. My situation was obviously more complex than what follows, but the "misunderstanding" boils down exactly to ...
Pollo's user avatar
  • 299
0 votes
1 answer
50 views

I am using an alternate make system tied in to the main make. The issue is when I do: make -B For rebuild all, it does not pass that to the submake. I want the submake to also do a rebuild. The only ...
Scott Franco's user avatar
0 votes
1 answer
63 views

I installed mingw64 on my Windows 11 system a few days ago. When using mingw32-make, the following code (lines 27 and 28) in the makefile is failing. voice.exe: ${OBJS} ${CC} -o "$@" ${...
JavaLatte's user avatar
  • 386
0 votes
2 answers
69 views

Here is my Makefile. All the %.o depend on %.c and main.h, except the ones under main, event, cmd folder, which depend on $(MAIN_HEADERS). How do I combine the below and make them simpler, as their ...
Metal Slime's user avatar
1 vote
1 answer
64 views

I have a minimal Makefile with just this one pattern rule: %: %.m4 m4 $< > $@ Then, with GNU Make: touch foo.in.m4 ; make foo.in executes as expected: m4 foo.in.m4 > foo.in but for foo....
nwcyclist's user avatar
1 vote
1 answer
131 views

Trying to create a Makefile that compiles C source into a .o file in a subfolder as well as creating the executable in a different subfolder depending on the architecture of the host PC. When I run &...
LesFromIL's user avatar
0 votes
1 answer
108 views

Goal Use concise makefile with organized directory structure. In particular, I don't want to have to edit the makefile to manage dependencies with every new source addition. The assumed directory ...
Kungfunk's user avatar
  • 115
0 votes
0 answers
68 views

Visual Studio Code 1.104.1, running on Fedora 42 (Workstation Edition). I can't seem to be able to build a project that requires two build steps, cmake and make. Part of the problem is that I want to ...
Alex Sokolek's user avatar
0 votes
1 answer
43 views

I have a recursive Makefile setup where a root Makefile delegates builds to subdirectory Makefiles via $(MAKE) BUILDTARGET=.... Most subdirectories build fine, but the boot/ directory behaves ...
martin esparragoza's user avatar
0 votes
1 answer
93 views

Consider this Makefile: run-%: % ./$< I have a test1.cpp file, so I expect make to build test1.o and test1 using chained implicit rules when I run make run-test1. However, what I get is make: *...
Jason's user avatar
  • 386
3 votes
2 answers
150 views

For context, I have been working on a game engine for a while now. The engine requires several libraries to function (Wayland, XKB, Vulkan, etc.). Because the added complexity of shared libraries ...
user avatar
1 vote
2 answers
73 views

I'm modifying a makefile and a bit in the dark. I've tried googling and reading make primers but nothing has obvious answers to my problems below Its first target: "default" compiles and ...
Francis Cagney's user avatar
-4 votes
1 answer
61 views

I want GNU make command to fail if the environment var AUTO_CALL is not specified. I could do so: .PHONY: x x: ifndef AUTO_CALL @echo "Don't call `make` manually." else ... endif ...
porton's user avatar
  • 5,909
0 votes
1 answer
41 views

Metakit can be found here: https://github.com/jnorthrup/metakit So, I'm trying to build Metakit on Debian. The readme file on GitHub have Unix (C++) build instructions. They are basically just the ...
Avi Caspe's user avatar
  • 575
2 votes
1 answer
56 views

I have been making a Haskell project that I want to continue on in C at some point through the FFI. I wanted to create a makefile to compile all the source with Clang for C and GHC for Haskell. The ...
Jacob Bauer's user avatar
0 votes
1 answer
54 views

I have a Makefile where I define a user-provided DEBUG variable to switch compile flags and target files. In one specific target, test, I want this variable to always be 1. Essential bits: DEBUG ?= 0 ...
user3758232's user avatar
0 votes
1 answer
39 views

I want to build and push a docker image as two different recipes in a Makefile. However, to avoid installations on the environment, the version tag of the Dockerfile is created inside the container ...
KrawallKurt's user avatar
0 votes
1 answer
69 views

How can I use the output of a shell script as variable in another shell script. Suppose the following Makefile build: DOCKER_IMAGE_ID=$(shell docker build -q -t myimage .); \ OUT=$(shell ...
KrawallKurt's user avatar
0 votes
1 answer
91 views

I'm trying to find a way to easily compile a project with debugging flags or with optimized flags. I.e. make debug would build the project with FLAGS = -static -W -Wall -Wextra -g -ggdb and make ...
optical's user avatar
  • 267
0 votes
1 answer
99 views

I have the following script and makefile: Makefile WORKING_DIR := /home/user1/working_dir outdir := /home/user1/working_dir/outdir script := ./myscript.sh my_target: file1.ini file2.ini file3.ini ...
Ulises V.'s user avatar
0 votes
1 answer
230 views

I was for a while developing an SDL project in code blocks but wanted to transition to instead using VS Code. My experience with compiling my own programs hasn't gone beyond single file, non-dependent ...
Levi's user avatar
  • 123
1 vote
0 answers
76 views

I am working on Windows OS. And here is my makefile snippet. COMPILER_ROOT := C:/Users/kpt DATE := $(COMPILER_ROOT)/build/busybox_glob.exe date SED := $(COMPILER_ROOT)/build/busybox_glob.exe sed ...
kathy's user avatar
  • 45
0 votes
1 answer
125 views

I am working on OpenWrt 23.05, to run a CGI script from the browser URL e.g. http://192.168.1.1/cgi-bin/myapp.cgi The server is uHTTPd. My CGI file is written in C++ that needs no interpreter. The CGI ...
InfiniteStorm's user avatar
1 vote
2 answers
62 views

I cannot comment out an info line inside a define. The following makefile shows the behavior (mind the tabs) define tmpl $(info info inside define, not commented, parameter is: $(1)) # $(info info ...
stefan's user avatar
  • 3,791
0 votes
0 answers
98 views

I am trying to bulid glibc from source at Ubuntu 18.04 GLIBC_VERSION="2.28" GLIBC_DIR="$HOME/.local/src/opt/glibc-$GLIBC_VERSION" GLIBC_TAR="$HOME/.local/src/opt/glibc-$...
zhang's user avatar
  • 689
0 votes
3 answers
65 views

I am building a C library with external dependencies that I have to compile separately. E.g. I have ./ext/lib1/src/lib1.c ./ext/lib2/lib2.c ./ext/lib3/xyz/whatever.c Which I want to compile into ./...
user3758232's user avatar
0 votes
1 answer
113 views

Python version: 3.12 pip-tools: 7.4.1 Project structure /projectdir ------requirements/ ------------requirements.in ------------requirements.txt ------------requirements-dev.in ------------...
Tarun's user avatar
  • 527
0 votes
1 answer
59 views

I typed make aaa.zzz after touch a b c. I got nothing. No stdout, no stderr. Why? GNU Make 3.82 It doesn't work. .SECONDEXPANSION: %.xxx: $$(shell echo a b c) echo in xxx %.zzz: %.xxx $$(shell ...
karsu's user avatar
  • 11
0 votes
0 answers
80 views

I'm building a kernel image, with my own kernel module being added to the build, using my own Makefile and Kbuild scripts. The final complete kernel image gets flashed to a ROM. I have a few kernel ...
Ken Y-N's user avatar
  • 15.2k
1 vote
1 answer
83 views

I'm trying to keep my Makefile compatible between BSD and GNU make. It is not particularly complicated, but there is one spot, where I'd very much like to assign a value based on the output of a ...
Mikhail T.'s user avatar
  • 4,302
3 votes
1 answer
230 views

I'm working on a project in C, and I'm using GNU Make to handle compiling everything, but I'm having a lot of trouble trying to compile every .c file in my project, including ones in subdirectories. ...
TimeSquared's user avatar
3 votes
2 answers
261 views

I am having an issue with my module compilation written in C for Kernel and I even can't find documentation which would be helpful. My issue looks like following. There are several files written in C ...
yrvsvd's user avatar
  • 35
0 votes
0 answers
45 views

I have a small issue where make or the command prompt reports an error when I invoke make clean. This is my Makefile: CC = gcc DEPS = $(wildcard *.c *.h) SRCS = $(wildcard *.c) TARGET = mforth.exe # ...
toobie's user avatar
  • 51
0 votes
3 answers
52 views

Makefile MWE snippet: ifdef REVISION $(info "Revision is ${REVISION}") else $(error "REVISION missing, can't compile code") endif all: echo "Hello" .PHONY: ...
ST Renegade's user avatar
0 votes
0 answers
49 views

please help. I am learning the DirectInput API, but I am having trouble calling a single function DirectInput8Create() in my MSYS2-MINGW64 environment. I verified dinput.dll is in the bin/ directory......
WarrenJay's user avatar
1 vote
1 answer
132 views

In my training course, makefile example is written. The full makefile code is below can be used to get exe file successfully. TARGET: exe exe: main.o mylibmath.a gcc main.o -o exe -L . mylibmath....
MonteKont's user avatar
  • 111
1 vote
2 answers
89 views

I am trying to download two files, A and B, using curl in a Makefile. The download of A has to be finished to download B. When I am executing the following command in zsh, the order is respected (B is ...
tony_merguez's user avatar
1 vote
2 answers
61 views

A = $(shell date) B := $(shell date) all: @echo $(A) sleep 2s; @echo $(A) sleep 2s; @echo $(A) @echo $(B) As per the documentation that B is evaluated immediately when make is run and A ...
Inquisitive's user avatar
  • 5,939
0 votes
0 answers
62 views

I need to load the symbols into gdb so that I can debug the boot loader. I am on an ARM architecture compiling for x86. I have tried this and the symbols do not load. This is the process I follow. ...
Jeremy's user avatar
  • 185
0 votes
1 answer
56 views

I have the below project structure which consists of multiple submodule Makefiles along with main Makefile. The Makefiles make use of common functions/rules which are placed inside common/...
Harry's user avatar
  • 4,198
0 votes
0 answers
31 views

I have a setup wherein I am building the solution through makefile rather than Visual Studio IDE, I need to give "/FAcs Machine, source, and assembly code; .cod" option by providing as an ...
MiVoice Integrations's user avatar
0 votes
2 answers
77 views

I have an issue in a Makefile where I'm trying to read a value in from an AWS secret manager secret into a Make variable as follows: $(eval SECRET_NAME := some/aws/secretname) $(eval SECRET_FILE := ....
scot's user avatar
  • 1,310
0 votes
0 answers
32 views

I'm trying to port Newlib following this tutorial after following this tutorial, and I'm running into an issue near the end. I'm at this step: mkdir build-newlib cd build-newlib ../newlib-x.y.z/...
jack101yello's user avatar

1
2 3 4 5
514