Im trying to compile a project with white space into path directories. here you have my Makefile :
NAME = ./Release/Online_pricer
SRCS = ./Online_pricer/main.cpp \
./Online_pricer/Currency.cpp \
./Online_pricer/Curve.cpp \
./Online_pricer/Environment.cpp \
./Online_pricer/My_convert.cpp \
./Online_pricer/My_exception.cpp \
./Online_pricer/ParserTab.cpp \
./Online_pricer/Spot.cpp \
./Online_pricer/Volatility.cpp \
./Online_pricer/VolatilityCapFloor.cpp \
./Online_pricer/VolatilitySwaption.cpp \
../Files\\ cpp/Functions.cpp \
../Files\\ cpp/UtilitiesWeb.cpp
#####################################################
OBJS = $(SRCS:.cpp=.o)
CC = g++
RM = rm -f
CFLAGS = -g -W -Wall -Werror
INCL = ../Files\ .h/
#####################################################
$(NAME) : $(OBJS)
@$(CC) $(OBJS) -I$(INCL) $(LIB) -o $(NAME)
@printf "\n \033[33m[Message]\033[39m Compilation under Linux done\n"
.cpp.o :
@$(CC) -I$(INCL) $(CFLAGS) -c $< -o $@
@printf " \033[34m[Compilation]\033[39m %s\n" $<
re : fclean all
all : $(NAME)
clean :
@$(RM) *~ $(OBJS)
@printf " \033[31m[Delete] \033[39m%s\n" $(OBJS)
fclean : clean
@$(RM) $(NAME)
@printf "\n \033[31m[Delete] \033[39m%s\n" $(NAME)
When i launch "make re", i have this result :
make: *** No rule to make target `../Files\', needed by `Release/Online_pricer'. Stop.
i don't succeed to fix this problem of the directory with white space. The name of the directory is Files cpp
.
Anyone can help me plz ?
edit : i try with one \
and it's not working. i had this result :
g++: error: ../Files: No such file or directory
g++: error: cpp/Functions.cpp: No such file or directory
g++: error: cpp/Functions.o: No such file or directory
g++: fatal error: no input files
compilation terminated.
make: *** [../Files cpp/Functions.o] Error 4
"../Files cpp/Functions.cpp"
make: *** No rule to make target "../Files', needed by Release/Online_pricer'. Stop.