Hi,
After calling make using the makefile bellow i receive .o and .p files. but in the linking part i receive errors : undefined reference to....
thhe makefile:
CC=gcc -c
LD=g++
SRCS= a.cpp b.cpp tmp/c.cpp tmp/d.cpp............
OBJ=$(SRCS:.cpp=.o)
INCLI= ...
all: BBB
BBB: $(OBJ)
@echo "Linking...."
$(LD) $(OBJ) -o BBB $(OBJLIBS)
@echo "Linking complete"
%.o : %.cpp
@echo "Compiling: "
@echo $@
$(CC) $(INCLI) -MD -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
rm -f $*.d
Could anyone advise me ?