Skip to content

Instantly share code, notes, and snippets.

@steinuil
Last active March 7, 2019 11:17
Show Gist options
  • Save steinuil/211328478d914d02f65dd24f4666c69a to your computer and use it in GitHub Desktop.
Save steinuil/211328478d914d02f65dd24f4666c69a to your computer and use it in GitHub Desktop.
B = build
$B/%.o: %.cpp | $B
$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
$B/%.debug.o: %.cpp $B
$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
%.exe: %.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
LIGMA_DEPS = ligma.o sugma.o
ligma.exe: LIGMA_DEPS
ligma.debug.exe: $(LIGMA_DEPS:%.o=%.debug.o)
%.exe: CXXFLAGS = -ligma
%.debug.exe: CXXFLAGS = -ligma -sugma
$(B):
mkdir $(B)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment