I am trying to create a makefile to build a program and am getting the following error:
make -f tsimplex.mk
make: *** No rule to make target `/main/tsimplex_main.cpp', needed by `tsimplex_main.o'. Stop.
OPSYS = $(shell uname -s )
TARGET = tsimplex
ROOTDIR = ../../..
GTSDIR = $(ROOTDIR)/tomso/
OBJDIR = $(ROOTDIR)/tools/release/obj
BINDIR = $(ROOTDIR)/tools/release/bin
MAINDIR = $(SRCDIR)/main
# C++ compiler
CPP_COMP = g++
# C++ compiler options
CPP_OPTS = -I$(ROOTDIR)/ -O3 -Wno-non-template-friend -Wno-deprecated -DNDEBUG
# Directories
LIBINC = $(GTSDIR)/parse/loglev.hpp \
$(GTSDIR)/parse/parse.hpp \
$(GTSDIR)/parse/prargs.hpp \
$(GTSDIR)/parse/errors.hpp \
$(GTSDIR)/algeb/numeric.hpp \
$(GTSDIR)/optim/simplex.hpp \
$(GTSDIR)/tomog/tomog.hpp \
$(GTSDIR)/main/help/tsimplex_help.hpp
LIBSRC = $(SRCDIR)/algeb/impl/cpp/vect.cpp \
$(SRCDIR)/algeb/impl/vector.ipp \
$(SRCDIR)/tomog/impl/tomog.ipp \
$(SRCDIR)/parse/impl/parse.ipp \
$(SRCDIR)/optim/impl/simplex.ipp \
$(SRCDIR)/algeb/impl/matrix.ipp \
$(SRCDIR)/parse/impl/cpp/string.cpp \
$(SRCDIR)/raytr/impl/cpp/layer.cpp \
$(SRCDIR)/raytr/impl/cpp/layintfclinr.cpp \
$(SRCDIR)/raytr/impl/cpp/laymodellinr.cpp \
$(SRCDIR)/raytr/impl/cpp/velmod.cpp \
$(SRCDIR)/main/help/impl/tsimplex_help.cpp
.PHONY : help
$(TARGET) : tsimplex_main.o error.o numeric.o
$(CPP_COMP) -o $(TARGET) tsimplex_main.o numeric.o error.o
tsimplex_main.o : $(MAINDIR)/tsimplex_main.cpp
g++ $(CPP_OPTS) -c $(MAINDIR)/tsimplex_main.cpp
tomog.o : $(SRCDIR)/tomog/impl/cpp/tomog.cpp
g++ $(CPP_OPTS) -c $(SRCDIR)/tomog/impl/cpp/tomog.cpp
numeric.o : $(SRCDIR)/algeb/numeric.cpp
g++ $(CPP_OPTS) -c $(SRCDIR)/algeb/numeric.cpp
error.o : $(SRCDIR)/parse/impl/cpp/error.cpp
g++ $(CPP_OPTS) -c $(SRCDIR)/parse/impl/cpp/error.cpp
tsimplex_help.o : $(MAINDIR)/help/impl/cpp/tsimplex_help.cpp $(INCDIR)/parse/prargs.hpp
g++ $(CPP_OPTS) -c $(MAINDIR)/help/impl/cpp/tsimplex_help.cpp
prargs.o : $(SRCDIR)/parse/impl/cpp/prargs.cpp $(INCDIR)/parse/prargs.hpp $(INCDIR)/algeb/vect2.hpp
g++ $(CPP_OPTS) -c $(SRCDIR)/parse/impl/cpp/prargs.cpp
loglev.o : $(SRCDIR)/parse/impl/cpp/loglev.cpp $(INCDIR)/parse/loglev.hpp
g++ $(CPP_OPTS) -c $(SRCDIR)/parse/impl/cpp/loglev.cpp