I am learning makefiles and I know how to create a simple makefile. I am moving on to nested makefiles. Here is my directory structure
/src
...makefile
...main.cpp
...foo
......makefile
......foo.cpp
......foo.h
When root makefile is called, it calls the makefile in directory foo. Here are my questions
Which makefile should I use to...
I downloaded zthreads (found here: http://zthread.sourceforge.net/) and tried to compile but I get this error from make:
MutexImpl.h:156: error: there are no arguments to 'ownerAcquired' that depend on a template parameter, so a declaration of 'ownerAcquired' must be available
MutexImpl.h:156: error: (if you use '-fpermissive', G...
I use a Makefile (with GNU make running under Linux) to automate my grunt work when refactoring a Python script.
The script creates an output file, and I want to make sure that the output file remains unchanged in face of my refactorings.
However, I found no way to get the status code of a command to affect a subsequent shell if command...
Hi all,
On UNIX, I have to produce numeric results out of previous data by means of various command-line utilities. These utilities read the starting data (in general, but not only, from csv files), perform computations, and write the data (again, in general, but not only, to csv files).
Of course, I don't want to run the risk to have ...
I often have multiple viewports opened in vim, using the :vsp and :sp commands. After I've been editing for a while, I'll often run the :make command from within vim. When I get errors, vim will then show me the lines that gcc says caused my errors. However, vim will often open the file with errors in another viewport, even if that file ...
I'm following the directions on the Using Check with the Autotools page in an attempt to build in support for unit test in a (currently) small C project. Although I am using Cgreen instead of Check.
I'm having trouble with step 9, which is causing automake to emit a warning about the use of `%'-style pattern rules being a GNU make exten...
The last sentence in the article caught my eye
[F]or C/C++ developers and
students interested in learning to
program in C/C++ rather than users of
Linux. This is because the compiling
of source code is made simple in
GNU/Linux by the use of the 'make'
command.
I have always used gcc to compile my C/C++ programs, whereas...
What does TEMP0_FILES below compute to? SOURCE_FILES can equal to multiple source files. Please tell me the purpose of the following syntax :.cpp=.o
SOURCE_FILES = main.cpp
TEMP0_FILES = $(SOURCE_FILES:.cpp=.o)
...
Is there any way to get the version and vendor of the compiler used by the user through qmake? What I need is to disable building some targets of my project when g++ 3.x is used and enable them when g++ 4.x is used. Any ideas are welcome.
Update: Most answers targeted the preprocessor. This is something that I want to avoid. I don't wan...
I use MacVim as my editor within Xcode. By default Command-B and :make are bound to call 'make' from the command line. As we're using Xcode for building and project configuration, I'd like to replace the :make/Command-B calls to make with an applescript command. Is this possible, and how would I go about doing it?
...
Hi,
I am kind of stuck here. We have two makefiles (A requirement that I can't change)
defs.mk : It contains the source file names & their extra compile flags (apart from the standard flags)
e.g:
C_FILES = c/src/main/rule_main.c
rule_main_OPTIONAL_FLAG = +w127
rule_main_DEBUG = TRUE
Makefile : It contains all the rules.
Now I want t...
Using nmake, is it possible to have the makefile build all the .cpp files in the current directory automatically, without having to specify them individually?
So, instead of something like:
O = $(OBJ_DIR)/main.obj
{$(SOURCE_DIR)}.cpp{$(OBJ_DIR)}.obj:
---COMPILE $< HERE---
I'd like to avoid having to specify each obj to make. Can...
When recursively invoking nmake, via the $(MAKE) macro, how can I pass on the target specified on the command line to the new instance?
So, say I execute the following from the command line:
c:\nmake clean
I want the recursive call to nmake to pass the 'clean' target to the new nmake instance.
...
What are the best policies for unit testing build files?
The reason I ask is my company produces highly reliable embedded devices. Software patches are just not an option, as they cost our customers thousands to distribute. Because of this we have very strict code quality procedures(unit tests, code reviews, tracability, etc). Those ...
I would like to compile the following C program for 32- and 64-bit systems.
#include <stdio.h>
#include <stdlib.h> ...
I am a newbie to Boost C++ libraries. I was wondering if there are any advantages of Boost bjam over GNU make? And what are the cons if I use make for building C++ code utilizing Boost.Python libraries?
...
Is there a tool in the market that takes Visual Studio "nmake" files, and converts them to Unix-style "make" files? Is there any tool that eases the pain of managing makefiles in large projects?
...
hi...
i would like to know if it's possible to know once a kernel is configured which files are going to be compiled and in what order ?
I want to know that because i'm interested in the variations of the building process according to the architecture and i don't want to have as many toolchains as architecture...
thanks
...
The question is probably not the best one to describe my issue but I couldn't think of a better one. My makefile goes like this:
PROGRAM_NAME = prog
OBJECT_FILES = $(PROGRAM_NAME).o
CFLAGS = -O2 -Wall -g
$(PROGRAM_NAME) : $(OBJECT_FILES)
gcc $(CFLAGS) -o $@ $(OBJECT_FILES)
$(PROGRAM_NAME).o : $(PROGRAM_NAME).c data.h
gcc $(CF...
hi ,
D:\usr\xtensa\XtDevToolsDE\install\builds\RB-2008.4-win32\DC_108mini\examples\XTMP>make
Makefile:168: *** missing separator. Stop.
Regards
Rg
...