make

How should a very simple Makefile look like for Cuda compiling under linux

Hi, I want to compile a very basic hello world level Cuda program under Linux. I have three files: the kernel: helloWorld.cu main method: helloWorld.cpp common header: helloWorld.h Could you write me a simple Makefile to compile this with nvcc and g++? Thanks, Gabor ...

Pre-build step in makefile

Hi! How can I run a script, which must execute before all other makefile commands? And it will be nice (but not mandatory) to the script is not executed if there is nothing to build. I've searched SO and Google, but can't find anything. I have this workaround: # myscript.bat output is empty CHEAT_ARGUMENT = (shell myscript.bat) CFLAG...

Where can I set path to make.exe on Windows?

When I try run "make" from cmd-console on Windows, it runs Turbo Delphi's make.exe but I need MSYS's make.exe. There is no mention about Turbo Delphi in %path% variable, maybe I can change it to MSYS in registry? Please, help. ...

Can't make Mplayer in OpenSolaris 2009.06

I downloaded the latest SVN source of Mplayer from the official website and have successfully run: ./configure --cc=/usr/bin/gcc-4.3.2 But when I run make I get a single line error message saying: gmake: *** osdep/: Is a directory. Stop. What does this mean and what should I do? Thanks! P.S. This is being attempted on i386 Open...

Makefile to archive/link together auto-generated source files

Basically, I have a file 'blah.txt'. That files gets parsed by a 'compiler' and from it will generate N output .c files. I want a makefile that will from that .txt file generate the c files then compile all of them and archive them in a libmystuff.a I tought of something like this : all: dogen libmystuff.a dogen: source.txt mycomp...

Makefile generator for c++?

Do the following build systems: cmake, jam and bjam also generate makefiles like qmake does? What utility does MS visual c++ uses to generate make file? ...

Multicore make in parallel rather than "threaded" execution?

I have a Makefile to execute a test suite that looks roughly like this: %.diff.png: %.test.png echo '$*: Comparing with good PNG.' %.test.png: %.pdf echo '$*: Converting PDF to PNG.' %.pdf: %.tex echo '$*: Generating PDF output.' with all the echo statements supplemented with the actual tests in the real Makefile. When...

Wildcard targets in a Makefile

How can I compact the folllowing Makefile targets? $(GRAPHDIR)/Complex.png: $(GRAPHDIR)/Complex.dot dot $(GRAPHDIR)/Complex.dot -Tpng -o $(GRAPHDIR)/Complex.png $(GRAPHDIR)/Simple.png: $(GRAPHDIR)/Simple.dot dot $(GRAPHDIR)/Simple.dot -Tpng -o $(GRAPHDIR)/Simple.png $(GRAPHDIR)/IFileReader.png: $(GRAPHDIR)/IFileReader....

Makefile.am ... what are those?

I've stumbled on a make file "Makefile.am" and I tried to use "make -f Makefile.am" on it to no avail. What am I doing wrong? ...

How do I pause to inspect results of sh commands run by a Makefile?

So, I have a Makefile which runs different commands of how to build S/W. I execute make from within a MSYS / MinGW enviroment. I found for example, the sleep <seconds> command, but this only delays the execution. How can I make it wait for a key being pressed, for example? ...

running grep from within GNU make

I need to find the text 'ifeq ($(Param1)' using grep. I try to assign search result to make variable. The problem is that single quotes don't escape text in make so when I try: GrepResult:= $(shell grep 'ifeq ($$(Param1)' TextFile) I get: Makefile:214: *** unterminated call to function `shell': missing `)'. Stop. The $ can be esca...

In what order prerequisites will be made by the GNU make?

Assuming we have the rule: a: b c d e and b, c, d and e are independent of each other. Is the order of making b, c, d, e defined? It seems that generally they will be made in order b, c, d, e, but may it sometimes happen, that the order will be different? ...

BASS 2.4.4 Error When Making

Hello, I'm trying to make the BASS 2.4.4 library for my Linux Ubuntu Hardy Heron, but when I run make I'm getting many errors, see: [ubuntu@eeepc:~/Desktop/bass24-linux] make make -C 3dtest make[1]: Entering directory `/home/ubuntu/Desktop/bass24-linux/3dtest' cc -Os -I/home/ubuntu/Desktop/bass24-linux -L/home/ubuntu/Desktop/bass24-lin...

makefile missing separator

Hi guys... I have a makefile (provided by third party) which gives the following error Makefile:108: *** missing separator. Stop. The line in question is the following if statement.... any ideas? have tried various replacing tabs with spaces and not got very far at all... if have_sdl libiulib_a_SOURCES += $(srcdir)/utils/...

How to reduce compilation cost in GCC and make?

I am trying to build some big libraries, like Boost and OpenCV, from their source code via make and GCC under Ubuntu 8.10 on my laptop. Unfortunately the compilation of those big libraries seem to be big burden to my laptop (Acer Aspire 5000). Its fan makes higher and higher noises until out of a sudden my laptop shuts itself down withou...

Invoking makefile in the project root directory from subdirectory Emacs - C++

I have a makefile in the project root directory. If I am editing a file in a subdirectory, how do I invoke make from EMACS? M-x compile make will not work as it looks for the makefile in the current directory. But I have the makefile in the project root directory. Any thoughts? Edit As suggested, *make -f fullpath_to_makefile* did th...

Parallelization of recursive jobs in GNU make

Hi, I am looking for an elegant way for the parallelization of jobs in GNU make. Here is a sample of what I did so far. Make processes the directories dir-1, dir-2 and dir-3 in a serial fashion which is logical but not my intention: SUBDIRS=dir-1 dir-2 dir-3 default: all all: @for dir in $(SUBDIRS); do (cd $$dir; $(MAKE)); done .P...

Using make to generate bison grammar

In a project that uses make and bison, I'm having difficulty specifying that the compiled grammar grammar.tab.c depends on the grammar input grammar.y, that each object file depends on a corresponding source file (including grammar.tab.o), and that the executable depends on all object files. The problem is that running make when grammar...

How to make dependency in makefile so that target is built when bazaar revision changes?

I have a script that is designed to generate a config.h in the source tree, to be used by the code at compile-time. Information included in this includes the bazaar revision number. My project is based only on a Makefile. I would like to add config.h as a target to be built when the script to make config.h is changed or the bazaar revis...

Using extern in C doesn't work as expected

Hi, I have created two files: tunables.h #ifndef TUNABLES_H #define TUNABLES_H void tunables_load_conservative(); void tunables_load_aggressive(); extern int timer_x; #endif /*TUNABLES_H */ and tunables.c #include "tunables.h" int timer_x; void tunables_load_conservative(){ timer_x = 3; } void tunables_load_aggressive(){ ...