25,697 questions
0
votes
0
answers
129
views
Build fails as both LOCAL_SDK_VERSION and LOCAL_PRIVATE_PLATFORM_APIS are set
I'm beginning to customize my phone and I'm following this guide to build AOSP for an Xperia.
I selected aosp_arm64-eng target by running source build/envsetup.sh && lunch, then ran make -j$(...
3
votes
3
answers
166
views
How to write Makefile for debugging only one header and source in c
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 ...
2
votes
2
answers
128
views
Nested C Makefile
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
...
0
votes
1
answer
49
views
How to pass -B (rebuild all) to submake
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 ...
0
votes
2
answers
65
views
How to apply the same recipe to different target with pattern?
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 ...
1
vote
1
answer
122
views
Makefile to create .o and program file in separate directories depending on architecture of host PC
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 &...
0
votes
0
answers
64
views
Can't build a project in Visual Studio Code when there are two build steps, cmake and make
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 ...
0
votes
1
answer
91
views
Makefile not building pattern rule prerequisites when it involves a chain [closed]
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: *...
1
vote
2
answers
61
views
Conditional declarations in makefile based on target
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 ...
-4
votes
1
answer
61
views
I want `make` to fail if an environment var is not specified
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
...
2
votes
1
answer
56
views
GHC(Haskell) not picking up imports from makefile
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 ...
0
votes
1
answer
39
views
How to pass information between Makefile recipes
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 ...
0
votes
1
answer
86
views
Makefile "profiles" to define different flags for the build target
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 ...
0
votes
1
answer
175
views
How do I compile with gcc using SDL2 on Windows with a Makefile?
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 ...
0
votes
1
answer
98
views
Set custom library path to execute a CGI file from the uhttpd
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 ...
0
votes
0
answers
86
views
glibc build error: `syslog` function not inlinable
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-$...
0
votes
1
answer
105
views
python pip compile is rending absolute path of requirements.in file
Python version: 3.12
pip-tools: 7.4.1
Project structure
/projectdir
------requirements/
------------requirements.in
------------requirements.txt
------------requirements-dev.in
------------...
0
votes
0
answers
78
views
Add a /etc/sysctl.d/50-foo.conf to a kernel image build
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 ...
3
votes
1
answer
186
views
Using GNU Make to compile all .c files in a subdirectory
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. ...
0
votes
0
answers
43
views
Makefile clean recipe not working on Windows
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
# ...
0
votes
0
answers
49
views
undefined reference to `DirectInput8Create' [duplicate]
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......
1
vote
2
answers
84
views
Curl command executed concurrently in makefile
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 ...
0
votes
0
answers
59
views
Auto-sync of config file in linux kernel compilation produces wrong configuration
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.
...
0
votes
0
answers
28
views
How to give option "/FAcs Machine, source, and assembly code; .cod" through makefile
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 ...
0
votes
0
answers
32
views
Issue when Porting Newlib (sys/crt0.o: No such file)
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/...