make

What do $< and $@ represent in a Makefile?

can anybody please explain the working of '$< and $@' in Makefile? ...

GNU make with many target directories

I have to integrate the generation of many HTML files in an existing Makefile. The problem is that the HTML files need to reside in many different directories. My idea is to write an implicit rule that converts the source file (*.st) to the corresponding html file %.html: %.st $(HPC) -o $@ $< and a rule that depends on all html fi...

How can I ignore command line variable assignment in a recursive build?

I'm trying to glue two build systems together. Both are recursive (rules in the makefile use make to call other makefiles to build components of the project). I'll call them 'A' and 'B' where 'A' builds the application and 'B' builds libraries used by 'A'. The top level makefile in A calls 'make TARGET=whatever' which means that all ...

how do you make a makefile

I would like to know how to makefile for Unix. ...

Is it possible to implement a `trap' for GNU make

I'm wondering if there's a way to implement the similar functionality as you get in bash scripts using `trap', but for gmake, such that if the user presses CTRL-C, or if make itself fails, it can call a particular target or macro. ...

Iterating over lists in Makefiles?

I find I'm writing a lot of Makefiles that could be cleaned up with the use of n-tuple lists. But I can't find any way to do this properly (and cleanly). So far I've only been able to come up with using $(shell ...) and tr, sed, or otherwise non-Makefile standards. For example, I'd like to do this: XYZs = \ dog.c pull_tail bark \...

Best hardware/software solution for parallel makes?

We've got a Linux-based build system in which a build consists of many different embedded targets (with correspondingly different drivers and featuresets enabled), each one built with another single main source tree. Rather than try to convert our make-based system to something more multiprocess-friendly, we want to just find the best w...

Experience building and using Qt Embedded

I am currently trying to compile and build QT for Embedded Linux on an Ubuntu box for ARM architecture. So far, I have run into MANY errors while trying to MAKE. The biggest one being a 2000 line C++ function which caused a compiler error. What are other peoples experiences with this and how did you fix it? ...

Qt Build Error

After configuring with $./configure -embedded arm -xplatform qws/linux-arm-g++ -opensource I get this output when Making and can't figure out why: ../../src/corelib/arch/qatomic_arm.h: In function char q_atomic_swp(volatile char*, char)': ../../src/corelib/arch/qatomic_arm.h:125: warning: address requested for ret', which is ...

How to create two mains in an eclipse C++ project

We've got a program which runs separately, executed with an execvp command. So it needs a main method, but I believe that poses a problem to eclipse with a managed make. Do we have to keep this code segregated into a separate project, or is there a way to incorporate it into the same eclipse project? ...

Separating objects and source with a makefile

Hi, I have been having troubles getting my makefiles to work the way I want. First off, I would like to say this is POSIX make, as in http://www.opengroup.org/onlinepubs/009695399/utilities/make.html I am needing my build system to work with both BSDs and GNUs(Linux). What I am wanting is a zero maintenance makefile. I want it to just c...

cross platform building/compiling solutions

Hi All, For C++/Objective-C Mac, Windows, Linux Most robust compiler/build system? There is GCC and MakeFiles. Intel makes Compilers, but they don't do Objective-C right? I have read that Intel built apps are 30% faster in the math and graphics arenas. MinGW is Windows only? LLVM/Clang doesn't seem prime-time ready. I dont know i...

How can I get dev tools (such as make) for Mac OS X via the command line

Hi guys - I am in a bit of a pickle. I have a few Mac Minis that I am colocating at my ISP and only have shell access (via ssh for example) to administer the boxes. This is fine, but I just realized - after downloading some tar files for a couple of packages I needed - that I don't have the basic dev tools installed (such as make, fo...

ant+cpptasks vs. scons vs. make

I'm looking into scons and I just want to make sure I know what the alternatives are, before I invest a chunk of brain cells into something completely different. I've been using GNU make in the past but have never been particularly happy with it. Particularly: why isn't Ant used more often with C / C++ projects? (given that there's ant ...

Get the Linux Kernel make process to rebuild modified files

I'm building a custom Ubuntu kernel and have modified one of the source files. When I issue the build command: NOEXTRAS=1 skipabi=true skipmodule=true fakeroot debian/rules binary-insp8600 it rebuilds the debs, but none of the modified source files are rebuilt. What's up? Do I have to do a completely clean rebuild every time I modi...

Strange Build Message from Linux Kernel

I was trying to rebuild my kernel after modifying some source files and noticed the following message in the build output: II: New modules (you've been busy, wipe the poop off your nose) What is that supposed to mean? What other weirdness awaits me in the Kernel? ...

Problem installing flex-2.5.33.tar.gz on linux (debian); 'make' fails

Hello, I'm trying to install 'flex'. I don't have a previous version of flex installed. I'm running a stripped down version of linux, so I don't have apt-get or yum. To install I untarred the flex package (flex-2.5.33.tar.gz) and ran ./configure (which works). However, then I ran make and it failed. I've attached the output of ./configur...

Why does SCons VariantDir() not put output in the given directory?

I'm thinking about using SCons for a new project. It looks really good, though I'm finding VariantDir quite confusing. I have a simple project with a handful of C source files in one directory, and I want to build in "normal" and in "profile" mode -- with two different sets of options to gcc. I want the outputs to go in the normal/ and ...

How can I configure my makefile for debug and release builds?

I have the following makefile for my project, and I'd like to configure it for release and debug builds. In my code, I have lots of #ifdef DEBUG macros in place, so it's simply a matter of setting this macro and adding the '-g3 -gdwarf2' flags to the compilers. How can I do this? EDIT: Just to clarify, when I say release/debug builds, I...

building a Cygwin version of GNU make

I want to add a couple of logging options to GNU make so I can see what is happening when building FireFox and friends. I have the make-3.80 sources and a complete working Cygwin build environment. Starting with ./configure and the Make I get a working executable as expected. Question: What configuration is required so the executable...