Question
Keep getting Error: make: *** No rule to make target 'craps.o', needed by 'craps'. Stop. C = g++ PROG = craps LIBSRCS = craps.cpp craps_game.cpp
Keep getting
Error:
make: *** No rule to make target 'craps.o', needed by 'craps'. Stop.
C = g++
PROG = craps
LIBSRCS = craps.cpp craps_game.cpp craps_helper.cppcraps_io.cpp
LIBOBJS = $(patsubst %.cpp, %.o, $(LIBSRCS))
LIBCRAPS = craps
CXXFLAGS = -I./ -fpic
LDFLAGS = -L./
all: $(PROG)
$(PROG): $(PROG).o lib$(LIBCRAPS).so
$(C) $(LDFLAGS) -l$(LIBCRAPS) -o$(PROG) $(PROG).o
lib$(LIBCRAPS).so: $(LIBOBJS)
$(C) -shared -o lib$(LIBCRAPS).so$(LIBOBJS)
.PHONY: clean
clean:
rm -f $(LIBOBJS) $(PROG)
.PHONY: depend
depend:
$(C) -MM $(PROG).cpp $(LIBSRCS) >depends.mak
include depends.mak
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started