Make Makefile not recompile everything

This commit is contained in:
Théophile Bastian 2018-02-13 15:08:04 +01:00
parent 56d8e22f21
commit ab0cac72c3

View file

@ -24,17 +24,17 @@ all: $(TARGETS:=.bin)
%.bin: main_%.o $(OBJS)
$(CXX) $(CXXFLAGS) $(CXXLIBS) $(OBJS) $< -o $@
_gen/marching_cubes_data.cpp: tools/gen_marching_cubes_conf.py _gen
_gen/marching_cubes_data.cpp: tools/gen_marching_cubes_conf.py
mkdir -p _gen
python3 $< > $@
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
_gen:
mkdir -p _gen
############################################################
.PRECIOUS: %.o
.PHONY: clean
clean: