diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..04d6739 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +EXE=main +OBJECT_FILES=main.o math_vector.o chfb.o obj3d.o vertex_data.o vertex.o tri_vertex.o +CC=g++ +LD=g++ +COMMON_ARGS=-Wall -Wextra +CC_ARGS=$(COMMON_ARGS) +LD_ARGS=$(COMMON_ARGS) -lncurses + +.PHONY: clean + +$(EXE): $(OBJECT_FILES) + $(LD) -o $@ $^ $(LD_ARGS) + +main.o: main.cpp chfb.h obj3d.h math_vector.h vertex_data.h vertex.h tri_vertex.h + $(CC) -o $@ -c $< $(CC_ARGS) + +math_vector.o: math_vector.cpp math_vector.h + $(CC) -o $@ -c $< $(CC_ARGS) + +chfb.o: chfb.cpp chfb.h math_vector.h vertex_data.h vertex.h tri_vertex.h + $(CC) -o $@ -c $< $(CC_ARGS) + +obj3d.o: obj3d.cpp obj3d.h math_vector.h vertex_data.h vertex.h tri_vertex.h + $(CC) -o $@ -c $< $(CC_ARGS) + +vertex_data.o: vertex_data.cpp vertex_data.h + $(CC) -o $@ -c $< $(CC_ARGS) + +vertex.o: vertex.cpp vertex.h math_vector.h vertex_data.h + $(CC) -o $@ -c $< $(CC_ARGS) + +tri_vertex.o: tri_vertex.cpp tri_vertex.h math_vector.h vertex_data.h vertex.h + $(CC) -o $@ -c $< $(CC_ARGS) + +clean: + rm -f $(EXE) $(OBJECT_FILES) |