make

Help with this Makefile

Hi, Here is my makefile http://pastie.org/1104332. I am trying to compile different .c files and .s files (assembly files) from different sub directories into E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/ then the linker should link all the .o files from the build directory (E:/em35x/build/mfg-sample-app-cortexm3-iar-e...

Compiling PHP with modified DEBUG_ZEND level

I'm debugging a PHP extension and found this while poking through the PHP source code: #if DEBUG_ZEND>=2 printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, Z_REFCOUNT_PP(zval_ptr), Z_REFCOUNT_PP(zval_ptr) - 1); #endif So I want to compile with DEBUG_ZEND set to 2. In Zend/zend_compile.h, I saw: #define DEBUG_Z...

VIM open compile error in existing or new tab

When I compile or run a file from VIM all error references are opened in the last active buffer regardless if the file is open already in another vim tab. This behavior is very annoying. Is there any way to force vim to behave like ':tab drop' on compile errors? (See http://vim.wikia.com/wiki/Edit_a_file_or_jump_to_it_if_already_open) ...

Make like tool that supports automatic deletion of temp files and regular expression pattern rules?

I am searching a make like build tool that supports (besides usual make features): Automatic deletion of temporary created files (like in GNU make for example) Regular expressions in rule patterns (like e.g. in Cook About 1: By default GNU make deletes temporary files. For example have these rules: %.c: %.y some-comand %....

Create linux make/build file

I am moving a C++ project from Windows to Linux and I now need to create a build/make file. I have never created a build/make file before. I also need to include Boost libraries to make it more complicated. It must also be a makefile and I need to learn how to create makefile anyway, so CMake and SCON are out. IDEs are also out because o...

Error when building arm-elf-gcc

I'm trying to build a arm-elf-gcc cross compiler. So firts I installed binutils 2.18 with the following configure options: ./configure --target=arm-elf --enable-interwork --enable-multilib This seems to work fine. next I installed gmp, mpfr and libmpc so now to the gcc itself. //edit - removed previous error and updated with the ...

Makefile examples and/or templates

Hi everyone, After some time using make to build C++ programs I still don't have a very good knowledge about Makefiles. I am thinking about asking for a "good" example and use it from now on. I have been searching, but the ones I found is too complicated for me to understand. Please give me a template, with comments explaining how it wo...

What is an efficient workflow with C? - Makefile + bash script

I'm working on one of my first projects that will span more than one C file. For my first couple practice programs, I just wrote my code in main.c and compiled using gcc main.c -o main. This worked for me as I was learning. Now, I'm working on a much bigger project on my own. I want to continue doing compilation on my own (or at least s...

What is g++-3 / gcc-3?

Trying to use make from cygwin using g++ I was getting Access Denied error messages. Googling the error message I found a positing referring to g++-3 and gcc-3 http://www.linuxquestions.org/questions/linux-software-2/cygwin-g-3-exe-gcc-3-exe-corrupted-to-g-3-exe-dam-and-gcc-3-exe-dam-769722/)... Changing the compiler to g++-3 seems ...

Can a Makefile target invoke commands even if a prerequisite fails?

Here's a skeleton Makefile just to make it easier to describe the problem: all_tests : unit_tests other_tests_1 other_tests_2 ... other_tests_N unit_tests : set1_summary.txt set2_summary.txt ... setN_summary.txt %_summary.txt : %_details.txt perl createSummary.pl --in $^ -out $@ %_details.txt : test_harness ./test_harness --t...

Header file not found when building under cygwin

I am trying to build a certain library under cygwin (OpenEXR), and I get the following error: b44ExpLogTable.cpp:52:18: error: half.h: No such file or directory half.h is referenced using #include <half.h>, and is actually a part of another library I successfully run make/make install on previously. The question is -- when using #inc...

Building GMP under MinGW - makefile problems

Downloaded and installed latest MinGW yesterday, and GMP 4.3.2 $ ./configure ran just fine. On running make check, The first problem was $ make check makefile:15: *** missing separator. Stop. OK, so, I put the TAB char at the beginning of line 15. Next problem is $ make check makefile:15: *** commands commence before first targe...

How to understand makefiles and python

I'm trying to understand how a makefile works for compiling some .ui files to .py (PyQt -> Python). This is the makefile that I am using that was autogenerated: # Makefile for a PyQGIS plugin UI_FILES = Ui_UrbanAnalysis.py RESOURCE_FILES = resources.py default: compile compile: $(UI_FILES) $(RESOURCE_FILES) %.py : %.qrc pyrc...

Makefile for Eclipse C/C++ in Linux

Hello, i'm using Eclipse 3.6 for C/C++ for Linux. I need to compile existing project with my own working makefile. This makefile works well from the command line, but when I imported my project into Eclipse and try to use Build, it doesn't work, seems that it try to use makefile automatically created by Eclipse. I unchecked the switch "G...

Makefile variable substitution sometimes ignored

Compiling a CUDA enabled version of aircrack-ng that hasn't been bug-fixed in a while so needed a bit of patching to get most of the way there. Basically, the make cannot find the relevant compiler (nvcc) for this one section of code; Relevent Makefile section ifeq ($(CUDA), true) CFLAGS += -DCUDA_ENABLED NVCC := $(CUDA_BIN)/nvcc IN...

How to know if make is using gcc or g++

If I run make then how can I tell if gcc or g++ is being used? I tried to look at the Makefile but didn't find anything. Here is the output from make. I can't figure it out from this either. cd threads; make depend make[1]: Entering directory `/home/anthony/nachos-4.0/code/threads' g++ -I../lib -I../threads -I../machine -DTHREADS -Dx86...

Where to get iostream.h

I'm trying to make something in Linux, but it complains that it can't find iostream.h. What do I need to install to get this file? ...

How to use an older version of gcc in Linux

In Linux I am trying to compile something that uses the -fwritable-strings option. Apparently this is a gcc option that doesn't work in newer version of gcc. I installed gcc-3.4 on my system, but I think the newer version is still being used because I'm still get the error that says it can't recognize the command line option -fwritable-s...

Is anyone using Maven/NAR for any large scale C/C++ projects?

And, what has your experience been? Do you think that Maven has been well suited to your project, and how would you advise others on following your path? Thanks in advance! ...

How to return the first character of a variable in gmake

Using GNU's make, I'd like to extract the first character of a variable. Currently I'm using the shell function to have bash perform the substring. I'm wanting to know if there is a way using gmake's built-ins to do the same. DIR=/user/$(shell echo "$${USER:0:1}")/$(USER)/ ...