[ROOT] Makefile question

From: Patois Yannick (patois@ganil.fr)
Date: Mon Jun 18 2001 - 14:37:39 MEST


Hello rooters,

Even if this is not directly a ROOT question, but more a make one, I
think that some people here certainly had to do such things and could
help.

So, I have a ROOT project, with an 'src' and and 'include' dir.
I use a toplevel Makefile made like this:

<<<< extracts from File Makefile

# The following line seems hugly to me
ABSPATH :=      $(shell pwd)

SRC      =      $(ABSPATH)/src

OBJECTS       = $(SRC)/source1.o $(SRC)/source2.o ...
OBJECTSDICT   = $(INC)/header1.dict_o $(INC)/header2.dict_o ...


# Generation C++ objects
%.o : %.cpp
	$(CXX) $(CXXFLAGS) $< -c -o $@

# Compiling dictionnaries
%.dict_o : %.C
        $(CXX) $(CXXFLAGS) $< -c -o $@

#Creating dictionnaries
%.C : %.H
        rootcint -f $@ -c $<

>>>>

This works well.
I can create my targets from the sources files, and link everything OK.

But, I dont really like this 'ABSPATH', so I tried to change it to '.' :
ABSPATH = .

But, when I compile, I got the following error:

rootcint -f include/GTDataParameters.C -c include/GTDataParameters.H
g++ -g -D_REENTRANT -I/usr/local/root/prod/include -fPIC -I/home/patois/work/code/ganil_tape/include -Iinclude
include/GTDataParameters.C -c -o include/GTDataParameters.dict_o
In file included from include/GTDataParameters.C:5:
include/GTDataParameters.h:29: include/GTDataParameters.H: Aucun fichier
ou répertoire de ce type
make: *** [include/GTDataParameters.dict_o] Error 1

rootcint generates it's file with a line inside like:
#include "include/GTDataParameters.H"

Which is wrong as this file already reside in include.
What is a good way to solve this problem ?

	Yannick



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:49 MET