makefile

How can I set where a Qt app finds a Qt module?

I would like to include libQtGui.so.4 libQtNetwork.so.4 and libQtCore.so.4 in the same directory as where my app resides. How would I make Qt understand this? y purpose is to have a standalone app that uses shared libraries ...

How can I handle template dependencies in Template Toolkit?

My static web pages are built from a huge bunch of templates which are inter-included using Template Toolkit's "import" and "include", so page.html looks like this: [% INCLUDE top %] [% IMPORT middle %] Then top might have even more files included. I have very many of these files, and they have to be run through to create the web pag...

running a bash script from a make file

I have a makefile from which I want to call another external bash script to do another part of the building. How would I best go about doing this. ...

choosing which main() to use in the Makefile

In a C project, I have a main() function in several files. When I compile I thus have an error "multiple declarations of main". Is it possible to choose in the Makefile which one of those main() functions should be used to compile ? (the other ones would then be ignored...) ...

How to fix this Makefile

I want my Makefile to be as simple as possible and still function. This is what it looks like. load: load.cpp g++ load.cpp -g -o load list: list.cpp g++ list.cpp -g -o list It worked fine when there was only one entry. But when I added the second entry, it doesn't check to see if it's updated and needs to be recompiled, unle...

Makefile - What does "all" stand for?

I read some tutorials concerning Makefiles but for me it is still unclear for what the target "all" stands for and what it does! Any ideas? ...

What is the best approach to use different CFLAGS for the same source files?

Hello, i need to build the same source tree twice, 1 - with normal cflags to build the project binary 2 - with cflags plus -fPIC to build a static library that would be some sort of SDK to develop project dynamic modules. Using only one Makefile, what is the best approach to accomplish this? It would be nice to do some sort of : al...

Is everything to be explicit for makefile of c++?

I mean,does makefile search some default directories that is not specified explicitly? ...

Run script before compilation in Makefile

Hi, in a Makefile, I have: all: $(PROG) $(PROG): $(CPP_OBJS) $(CPP_LD) $(CPP_LD_FLAGS) $(CPP_OBJS) -o $(PROG) I would like to add some script before the compilation so I tried: all: $(PROG) $(PROG): $(CPP_OBJS) sh script.sh ; $(CPP_LD) $(CPP_LD_FLAGS) $(CPP_OBJS) -o $(PROG) but it does not work. What is the ri...

How can I write a makefile to auto-detect and parallelize the build with GNU Make?

Not sure if this is possible in one Makefile alone, but I was hoping to write a Makefile in a way such that trying to build any target in the file auto-magically detects the number of processors on the current system and builds the target in parallel for the number of processors. Something like the below "pseudo-code" examples, but much...

How to compile runnable jar from packages?

Hey. My java application has got a package structure similar to this; src/com/name/app , src/com/name/app/do , src/com/name/utils/db and so on. How would I go about compiling java files in these directories in to a runnable jar? I need to package required libraries into the generated JAR (jdbc). I've always done these things in Eclip...

makefile from Linux doesn't work in OpenSolaris

In OpenSolaris OS, when I run makefile generated by Eclipse CDT on the Linux OS, I get an error on the first -include line. The same error was in FreeBSD, and was solved by executing gmake instead of make. In OpenSolaris (just installed) gmake doesn't work (command not found). What package should I install and how exactly, to build L...

What does a typical ./configure do in linux?

Why is it necessary though everything is specified in a makefile? ...

When will implicit rule be applied for a makefile?

It says: In general,make searches for an implicit rule for each target[1], and for each double-colon rule[2], that has no commands[3]. This can have two different understanding: 1 or (2 and 3) (1 or 2) and 3 Which does it mean? ...

What are Makefile.am and Makefile.in?

These 2 files are mostly seen in Open Source projects. What are they for, and how do they work? ...

How to run a makefile in Windows?

I have some demos that I downloaded and they come with a Makefile.win and a Makefile.sgi. How can I run these in Windows to compile the demos? ...

How to compile and build c++ application with hand written makefile in windows?

Can someone provide a HelloWorld demo ? ...

How to create Visual studio solution from make files ?

Hi all!! I have a source code for a project with their make files. I want to create a Visual Studio (2005) solution from it. Is there any direct way to do this? can anyone help me please. I spent hours for searching, but couldn't find a way to do this. Thanks. ...

Trying to build the LEVMAR math library on a mac using the Accelerate Framework

Hello. I want build levmar-2.5 math library on a mac using the included Makefile. It requires LAPACK, another math library which is included in the Accelerate Framework. I do not know how to modify the Makefile to indicate the location of the library so that it builds correctly. There is a libLAPACK.dylib in the framework. Ultimately...

GNU make copy files to distro directory

I keep my source html (and images etc.) in separate directories for source control. Part of making the distro is to have make copy files to output folder and set the attributes. Today my makefile shows (extract): %.html: /usr/bin/install -c -p -m 644 $< $@ www: $(HTMLDST)/firmware.html $(HTMLDST)/firmware_status.html $(HTMLDST)/i...