c++11 - Makefile and putting objects and executable to subdirectory -
i have been trying read around this, can't figure out how fix it.
i have following makefile , put objects in libs/ subfolder , executable build/ folder...but no matter have tried, can't figure out how tell make such ruling.
cxx = g++ flags = -mwindows sources = $(wildcard *.cpp) objects = $(sources:.cpp=.o) target = engine all: $(sources) $(target) $(target): $(objects) $(cxx) $(objects) -o $@ .cpp.o: $(cxx) -std=c++11 -c $< -o $@
Comments
Post a Comment