make

Makefile to compile both C and Java programs at the same time

I have three programs that need to be compiled at the same time, 2 written in C and 1 in java. I had all three working with the Makefile when they were in C, but then switched one of them to java... is there a way to compile all 3 at once with the same makefile? Here is my current Makefile: CC=gcc JC=javac JFLAGS= -g CFLAGS= -Wall -...

make command to get only symbols directory in out

Hi, Is there a way to compile the code in such a way that we get only specific files/directory in out folder rather than the whole out directory. what if i want to get only symbols directory specific to the target without host directory in it.Is it possible? ...

gcc architecture question

Hi, I'm compiling my program with architecture set to -mtune=i386 However, I'm also linking statically against several libs (libpng, zlib, jpeglib, vorbisfile, libogg). I've built these libs on my own using configure and make, so I guess these libs were built with architecture being set to my system's architecture which would be i686...

How to make this Makefile more concise?

I know there are ways to remove duplicates $(CC) $(CFLAGS) $@ $^ in Makefile. Can you tell me how to make the Makefile below more concise? CC=gcc CFLAGS=-pthread -g -o all: p1 p2 p1: p1.c $(CC) $(CFLAGS) $@ $^ p2: p2.c $(CC) $(CFLAGS) $@ $^ ...

How to print message(s) at the end of configure/make?

Hi, I'm trying to setup a software package with GNU autotools and would like for a message "Build successful!" to be outputted after a user has run make (after configure). How would I implement such a feature? Thanks ...

GNU make rule for multiple targets

Hi there, I'm trying to get GNU make to produce multiple outputs from a single input. The most simple example I can demonstrate is: a b : test cp $< $@ which, I believe, should copy the file test to the files name a and b. However, it only makes the file a, which seems to me to be contrary to the instructions listed here: http:/...

awk / sed script to remove text

Hi, I am currently in need of a way to programmatically remove some text from Makefiles that I am dealing with. Now the problem is that (for whatever reason) the makefiles are being generated with link commands of -l<full_path_to_library>/<library_name> when they should be generated with -l<library_name>. So what I need is a script to f...

make: invoke command for multiple targets of multiple files?

Hi, I looking to optimize an existing Makefile. It's used to create multiple plots (using Octave) for every logfile in a given directory using an scriptfile for every plot which takes a logfilename as an argument. In the Moment, I use one single rule for every kind of plot available, with a handwritten call to Octave, giving the specifi...

Hiding the removal of intermediate files using Make

I use intermediate files in my Makefile, however make prints out the rm command that it uses to delete them all afterwards. How do I hide this print statement? ...

How to learn to use make? I'm never ever able to build sources with make and makefiles

Hi, I'm new to *N*X OSes, actually MacOS, and when I try to build sources with make and makefiles, I never can. I try to run make, even try to run it passing the makefile as an argument, but all I get is "There's nothing for make to do" Can you point me to a tutorial, reference, or something ? ...

How to make automake less ugly?

I recently learned how to use automake, and I'm somewhat annoyed that my compile commands went from a bunch of: g++ -O2 -Wall -c fileName.cpp To a bunch of: depbase=`echo src/Unit.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ g++ -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/Unit.o -MD -MP -MF $depbase.Tpo -c -o src/Unit.o src/Unit.cp...

Android NDK keeps looking for "g/David/..."

I installed the latest version of the Android NDK (r4) on Windows, plus a fresh installation of cygwin with the required packages, latest Android SDK, Eclipse + Android plugins. Whenever I try to build any of the JNI code from cygwin (Be it the samples from the NDK, or a custom project), I'm getting: $ make APP=demo Android NDK: Buildi...

Do you know any build systems with decent support for parallelization?

Hi, I am looking for a build system (working on ms windows) that has good support for parallelization of tasks/targets (or whatever you call them). To be more specific - during build (that is initiated on MS Windows machine) I need to copy source files to a number of different machines (which are not necessarily running Windows) and st...

configure question: What would be the most appropriate place to install example programs for a library?

Hi, I'm currently writing a configure script for a library and would like to package it with some sample binaries to give examples on how to use it. Where would be the most appropriate location to install these binaries when a user runs "make install"? I ask what would be appropriate in terms of what would comply with GNU standards. Th...

How to check for installed libraries e.g. libpcap when installing software using gnu make?

I am developing an application which depends on libpcap and want to know how to write the gnu makefile such that i can check for installation of libpcap on a machine before proceeding with the installation of my application. ...

"commence before first target. Stop." error

Hi! In *.mak file I receive commands "commence before first target. Stop." I didn't change it before. How to solve this problem? Thanks! ...

How do make dependency generation work for C? (Also..decode this sed/make statement!)

Hi all. I have a make build system that I am trying to decipher that someone else wrote. I am getting an error when I run it on a redhat system, but not when I run it on my solaris system. The versions of gmake are the same major revision (one off on minor revision). This is for building a C project, and the make system has a global Mak...

Looking for introduction of nmake & makefile structure

Hi, I am looking for some basic information regarding makefile structure. Any pointers will be highly appreciated. Thanks. ...

How can I make Strawberry Perl's cpan(1) find perl?

I'm having trouble installing Template module with Strawberry Perl. cpan Template yields the following: Writing Makefile for AppConfig C:strawberryperlbinperl.exe: not found dmake.EXE: Error code 255, while making 'blib\lib\.exists'` I haven't been able to understand either how to affect the path so dmake will work correctly...

Makefile issue with compiling a C++ program

I recently got MySQL compiled and working on Cygwin, and got a simple test example from online to verify that it worked. The test example compiled and ran successfully. However, when incorporating MySQL in a hobby project of mine it isn't compiling which I believe is due to how the Makefile is setup, I have no experience with Makefiles ...