Second try
http://www.gnu.org/software/make/manual/make.htmlThe manual
Current makefile
Code:
all: $(BINARIES) $(OBJS) $(ASMS)
#Assembly output
%.S: %.cpp
$(CXX) -c -S $< $(CXXFLAGS) -o $@
#Compiling
%.o: %.cpp
$(CXX) -c $^ $(CXXFLAGS)
# linking
test: $(OBJS) $(ASMS)
$(CXX) $^ -o $@
And explanations
BINARIES has only test.
OBJS have all cpp files but they end with .o
ASMS have all cpp files but they end with .S
And the makefile only produces .o files and executable.
Not the assembly files which I also want. Help appreciated.