Problems with Makefile generation

0

I'm having a problem generating the Makefile file in my project. The project folder structure is:

Home - > Project    Subfolders - > include (my files with extension .h), src (my files with extension .cpp) and test (test files of the program) and the file Makefile in the main folder

This is my Makefile :

#Makefile for "Lab02IMD0030"C++ application
#Created by Italo 21/04/2018

PROG    =   geometry

CC  =   g++

CPPFLAGS    =   -O0 -g  -Wall   -ansi   -pedantic   -I  include -std=c++11

OBJS    =   teste2.o    triangulo.o retangulo.o quadrado.o  circulo.o   piramide.o  paralelepipedo.o    cubo.o  esfera.o

$PROG:  $(OBJS)

    $(CC)   -o  $(PROG) $(OBJS)

teste2.o:

    $(CC)   $(CPPFLAGS) -c  teste/teste2.cpp

triangulo.o:    triangulo.h

    $(CC)   $(CPPFLAGS) -c  triangulo.cpp

retangulo.o:    retangulo.h

    $(CC)   $(CPPFLAGS) -c  retangulo.cpp

quadrado.o: quadrado.h

    $(CC)   $(CPPFLAGS) -c  quadrado.cpp

circulo.o:  circulo.h

    $(CC)   $(CPPFLAGS) -c  circulo.cpp

piramide.o: piramide.h

    $(CC)   $(CPPFLAGS) -c  piramide.cpp

paralelepipedo.o:   paralelepipedo.h

    $(CC)   $(CPPFLAGS) -c  paralelepipedo.cpp

cubo.o: cubo.h

    $(CC)   $(CPPFLAGS) -c  cubo.cpp

esfera.o:   esfera.h

    $(CC)   $(CPPFLAGS) -c  esfera.cpp


clean:
    rm  -f  core    $(PROG) $(OBJS)

You are currently experiencing this error:

  

Make: *** No rule to make target 'triangulo.h', needed by   triangle. Stop.

I can not understand why

    
asked by anonymous 21.04.2018 / 21:14

0 answers