Good afternoon I have a problem with my makefile file, I think it's in the variable "objs=" but I do not see where the fault is. I would appreciate your help. Work environment is windows.
My directory structure has:
c:\Users\usuario\WORKSP~1\tema2\types\make>tree /f
Listado de rutas de carpetas
El número de serie del volumen es 000AF440 9894:2AEF
C:.
│
│
├───bin
├───obj
└───src
makefile
refandpointer.cpp
The error shown at
c:\Users\usuario\WORKSP~1\tema2\types\make\src>c:\MinGW\bin\mingw32-make
Creando - c:\Users\usuario\WORKSP~1\tema2\types\make\bin\pointer... con
g++ -g -Wall -std=c++0x -o
c:\Users\usuario\WORKSP~1\tema2\types\make\bin\pointer
g++: fatal error: no input files
compilation terminated.
makefile:15: recipe for target
'c:\Users\usuario\WORKSP~1\tema2\types\make\bin\pointer'
mingw32-make: ***
[c:\Users\usuario\WORKSP~1\tema2\types\make\bin\pointer] Error 1
My makefile file is as follows.
BIN = c:\Users\usuario\WORKSP~1\tema2\types\make\bin
SRC = c:\Users\usuario\WORKSP~1\tema2\types\make\src
OBJ = c:\Users\usuario\WORKSP~1\tema2\types\make\obj
CXX = g++
CPPFLAGS = -g -Wall -std=c++0x
SOURCES = $(wildcard $(SRC)\*.cpp)
OBJS =$(addprefix $(OBJ)\,$(notdir $(SOURCES:.cpp=.o)))
target = pointer
all: $(BIN)\$(target)
$(BIN)\$(target): $(OBJS)
@echo Creando $@... con $^
$(CXX) $(CPPFLAGS) $(OBJS) -o $@
$(OBJ)\%.o: %.cpp
@echo Creando $@... con $^
$(CXX) $(CPPFLAGS) -c $<