Skip to content
Advertisement

Tag: makefile

variable to switch the pre-requisites for a target in a Makefile

I wish to use ‘MY_TYPE’ to switch the prerequisites for the target ‘top’. based on MY_TYPE Can I select the pre-requisites required For example, for MY_TYPE=FOO , I wish to have $(BUILD) $(TARGETS) $(X_LOCALS) as pre-requisites for top MY_TYPE=BAR , I wish to have $(BUILD) $(TARGETS) $(Y_LOCALS) as pre-requisites for top How can I achieve it? Below is a simple

What is cflags’s function?

In this issue, CFLAGS set as path: https://unix.stackexchange.com/questions/149359/what-is-the-correct-syntax-to-add-cflags-and-ldflags-to-configure In this issue, CFLAGS set as compile option: How to use LDFLAGS in makefile I am confused. Answer CFLAGS stands for compiler flags. LDFLAGS is for linker flags. CFLAGS is used to pass flags to tell the compiler information on how to build a file(s). In your link it is used to

*** No targets. Stop on Linux using C [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question This is a very basic program because I am using Make and Linux

error while loading shared libraries: libgmock.so: cannot open shared object file: No such file or directory

I am currently facing an issue with a project of mine foudn while configuring CI. Resume The problem faced is the following: error while loading shared libraries: libgmock.so: cannot open shared object file: No such file or directory. For the problem above I am not installing the google test/google mock framework but I am compiling it. Although it says it

x86_64-conda_cos6-linux-gnu-cc: Command not found with postgres function makefile

I am trying to do this tutorial: https://linuxgazette.net/139/peterson.html so I can learn to write postgres functions. It says to use this makefile, which fails: Errors: I have tried several things, including updating conda and anaconda, as per the answers to similar questions. Nothing has worked yet. How do I compile postgres function given this situation? Answer This error has occurred

Makefile generate numerical list of files

I have a Makefile that I use for building a book I am writing into EPUB and Kindle formats. However, my list of source files is getting really long: I am trying to generate this list programmatically, and I got it working with: But can’t help but feel I feel like there is a simpler way. Is there a simpler

makefile : How to link object files

I have makefile and I need to link two objects into “main” object They are -> oglinet.o and libshape.o their path in system -> home/pi/openvg/ Problem :I need to write full path and objects name(home/pi/openvg/libshapes.o) is possible to “make” them as Makefile variable for example home/pi/openvg/libshape.o into $(OBJ1) in makefile rule ? Tried to make them as variable for example

Advertisement