Help with makefile



I have the following makefile for my project:

NEW_GCC = /afs/ies.auc.dk/sw/released
3G = /afs/ies.auc.dk/project/3.9G/Private/dist
CXX = g++
CPPFLAGS = -g -Wall -pipe -I$(3G)/include -I$(NEW_GCC)/include
-I$(3G)/../libraries_cpp -pg
LDFLAGS = -L$(NEW_GCC)/lib -L$(3G)/lib -lboost_filesystem-gcc-d-1_33_1
-lboost_program_options-gcc-1_33_1 -lxerces-c

..SUFFIXES: .c .cpp

TARGET = EUTRAN
HDR = Debug.h GlobalFunctions.h NormalDistribution.h

OBJ = Antenna.o HandOver.o RadioChannel.o BaseStation.o Mobility.o
Sector.o Connection.o Network.o ShadowFading.o EUTRAN.o PathGain.o
UserEquipment.o PilotMeasurement.o PowerControl.o FairResourcePS.o
FastFading.o PacketScheduler.o PathLossBasedPS.o SinrBasedPS.o
SinrBasedPS_II.o SinrBasedPartialAllocationPS.o
SinrBasedWithoutPowerScalingPS.h WriteToFile.o UeTxBuffer.o Block.o

PARSEROBJ = Parameter.o StrX.o DOMParserErrorHandler.o

all: parser $(OBJ) $(TARGET) $(HDR)

..cpp.o:
$(CXX) $(CPPFLAGS) $< -c

parser: parser/Parameter.o parser/StrX.o parser/DOMParserErrorHandler.o

$(TARGET): $(OBJ) $(PARSEROBJ)
$(CXX) $(CPPFLAGS) $(OBJ) $(PARSEROBJ) $(LDFLAGS) -o ../$@

purify: $(OBJ)
purify $(CXX) $(OBJ) -o ../$(TARGET)

clean:
-find . -name "*.o" -exec rm -rf {} \;

it perfectly worked till recently when I added some more .cpp files
that were anyway included in the OBJ definition. Now, when I run the
make command, I get the following error:
make: *** No rule to make target `EUTRAN.o', needed by `all'. Stop.
EUTRAN.cpp is the main.

Can anyone help?

Thanks
Cesco

.



Relevant Pages

  • Re: make problem
    ... in the variables SRC and OBJ respectively. ... If you want to have two rules with the same target name in gnu-make, they must both be double-colon rules, but that's probably not what you need here. ... Remove the first 'proj' target and replace it with a pattern rule that creates %.o files from %.cpp files. ...
    (Debian-User)
  • Re: help compiling a project
    ... I looked a the error closer, the obj is x86 which is what you want, but it ... thinks the target is SH3. ...
    (microsoft.public.windowsce.embedded.vc)