makefile

How to write configure.ac and Makefile.am for freeglut?

I want to use freeglut for my project. In my configure.ac it looks like this, it worked like this for SDL so I just replaced some potions and hoped it works for freeglut as well but it does not. So what am I doing wrong? # Check for freeglut PKG_CHECK_MODULES([FREEGLUT], [freeglut >= 3.0]) AC_SUBST(FREEGLUT_CFLAGS) AC_SUBST(FREEGLUT_LI...

Makefile issue: smart way to scan directory tree for .c files

I am doing a project which is growingprety fast and keeping the object files up date is no option. The problem beyon wildcard command lies somewhere between "I do not want recursive makefiles" and "I do not want it to list by hand". The objects are supposed to go into a seperate diretory, which works allready. Note: I am not that used to...

How to add custom targets in a qmake generated Makefile?

Hi Today when I play with Qt I use qmake to generate the Makefile, and that works quite well. However sometimes I want to add more stuff to the generated Makefile, without having to edit the generated Makefile. Let's say that we beside the source code have a Doxygen directory, and there I need to run some doxygen commands to gener...

Any difference between configure.ac and configure.in, and Makefile.am and Makefile.in?

I have seen both in different things I have configured. What I the difference? Is it notable to use only one? Or does it not matter which one to use? ...

makefile for java

Hi, i don't understand what i did wrong with my makefile : JAVA_SRCS:=$(wildcard tasks/src/*.java) JAVA_CLASSES=$(subst /src/,/build/,$(JAVA_SRCS:.java=.class)) JFLAGS=-cp jar/octobot.jar -d tasks/build JC=javac .SUFFIXES: .java .class .java.class: $(JC) $(JFLAGS) $*.java default: build build: $(JAVA_CLASSES) clean: $(RM) tasks/...

Two header with same name in include path

Hi, In CINCLUDE path in my make file there are two headers with same name. I cannot remove one of them . How can I instruct makefile to give priority to header files in a specific folder. ...

Why use make over a shell script?

Make seems to me simply a shell script with slightly easier handling of command line arguments. Why is it standard to run make instead of ./make.sh ...

sed in makefile, usage

hi, I am in the process of learning makefile creation. Current target is to scan the $(SOURCEDIR) for .c files and create (according to that lise of .c file paths in the format of /path/file.c) a nice $(VPATH) so I do not need to use recursive makefiles (aka pain in the a..). Atm I am stuck with this, where $(SOURCETREE) will be empty ...

Converting .vcproj/.sln to make file

I have huge Visual C++ project, which contains around 40 projects. Few of them need to be ported to UNIX environment. Is there any reliable tool available which can convert .vcproj file to make file so I can compile and build the project on UNIX environment ?? Any help will be appreciated ...

How do I get make to figure out the correct dependencies to link in the correct downstream object files?

I'm going to use a small example for reference. Consider a project with: inner_definitions.o : inner_definitions.cpp inner_definitions.h gcc $^ -o $@ inner_class_1.o : inner_class_1.cpp inner_class_1.h inner_definitions.h gcc $^ -o $@ inner_class_2.o : inner_class_2.cpp inner_class_2.h inner_definitions.h gcc $^ -o $@ ...

gnu make reloads includes but doesn't update the targets

I'm trying to create a Makefile that will download and process file a file to generate targets, this is a simplified version: default: all .PHONY: all clean filelist.d clean: @rm -fv *.date *.d #The actual list comes from a FTP file, but let's simplify things a bit filelist.d: @echo "Getting updated filelist..." @echo "LIST...

Eclipse CDT: can I use the parameters defined in Project Settings from a custom makefile ?

Eclipse CDT: can I use the parameters defined in Project Settings from a custom makefile ? I would like to graphically edit the include paths, library paths... and use them inside my custom Makefile. ...

Makefile Packages in C

What packages do i need to install in order to use a Makefile. I've already installed cmake, would i need ocamlmakefile? My problem is that whenever i type 'make' into the terminal, i'm told "make command not found". ...

using legacy project in Eclipse

Hi, I wish to use "C" legacy project in the Eclipse. In the project it require "autoreconf -vi" followed by "./configure" before make to start. My problem is I am not able to do "autoreconf -vi" and "./configure" from the eclipse. Thanks Arpit ...

What do companies use to build their binaries?

What do modern companies use to compile and link their projects? Especially with large projects, makefiles don't seem usable enough to be scalable. As far as I can tell, many companies use either in-house build systems or in-house scripts on top of existing build systems. Do large projects use make? Is pure Ant, Maven, etc used or is...

Visual Studio Makefile Project Synchronization

I've inherited some C99 code that I'm planing on reusing in a C++-centric solution. Unfortunately, even Microsoft's latest compiler has virtually no support for non-trivial C99 features. The code in question has been tested to death and I'd rather not go through the trouble of rewriting it in C++. This means that in order for me to reus...

rules for makefile

hello everyone, let's assume I have some Makefile for Unix prog:a.o b.o c.o gcc a.o b.o c.o -o prog a.o:a.c a.h b.h gcc -c a.c b.o:b.c b.h gcc -c b.c c.o:c.c c.h b.h gcc -c c.c I read that if I change *.c file I must recompile only this file, but if I change *.h file I must recompile all files which are depending on my...

Howto make gnumake behave as if default options in command line were passed?

I am using a makefile in which if I pass options in the command line like make OPT1=opt1 OPT1=2 I get a different behavior than if I edit Makefile and write there OPT1=opt1 OPT2=opt2 and then then run make on the command line. The behavior I want is the one where I use the options in the command line.Right now I am using an al...

BSD Make and GNU Make compatible makefile

I have a BSDmakefile and GNUmakefile that are pretty much identical except for dependency management. The GNUmakefile: ifneq ($(MAKECMDGOALS), "clean") -include $(dependencies) endif The BSDmakefile: .for i in $(dependencies) .sinclude "${i}" .endfor Is there a way to make it so that I can detect if I am running under gmake or bsd...

G++ preprocessor does not pick up -D defines

Where am I going wrong; I want to define a preprocessor value on the command-line for g++ but it fails. Below is sample code that replicate my problem: [edit] I'm using:g++ (Debian 4.3.2-1.1) 4.3.2GNU Make 3.81 test.h #ifndef _test_h_ #define _test_h_ #include "iostream" #if defined(MY_DEFINED_VALUE) #if (MY_DEFINED_VALUE != 5) #und...