In make file I took the followng error message; Makefile:4: *** commands commence before first target. Stop.
Makefile:
LINK_TARGET = sample4
OBJS = \
main.o \
remainder.o \
helloWorld.o
REBUILDABLES = $(OBJS) $(LINK_TARGET)
clean :
rm -f $(REBUILDABLES)
echo Clean done
all: $(LINK_TARGET)
echo All done
$(LINK_TARGET) : $(OBJS)
g++ -g -o $@ $^
%.o : %.cpp
g++ -g -o $@ -c $<
%.dep : %.cpp
g++ -M $(FLAGS) $< > $@
include $(OBJS: .o=.dep)
How would I fix this error? Thanks...
main.oetc. are tabs rather than spaces. Also looks like you have some whitespace after your escape backslashes. - TartanLlama