From: Lukel495 Date: Wed, 22 Nov 2023 14:38:38 +0000 (+0100) Subject: gitignoreing X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=4da6eb8e4af74a4c4e9dea7493edd0d3c8e71aa4;p=TDDC76_proj.git gitignoreing --- diff --git a/Makefile b/Makefile deleted file mode 100644 index bd5e408..0000000 --- a/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -CC := g++ -CCFLAGS := -std=c++17 -Wall -Wextra -pedantic -Weffc++ -Wold-style-cast -I src -LDFLAGS := -L${SFML_ROOT}/lib -I${SFML_ROOT}/include -lsfml-window -lsfml-graphics -lsfml-system - -OBJDIR := build -EXEDIR := build/exe -EXE := $(EXEDIR)/game.out -TEST := $(EXEDIR)/test.out - -SRC := $(shell find src -type f -name '[^_]*.cc') -SRC_H := $(shell find src -type f -name '[^_]*.h') -OBJECTS := $(addprefix $(OBJDIR)/, $(SRC:src/%.cc=%.o) ) - -vpath %.cc src - -.PHONY: all clean - -all: dir game-target test-target - -dir: - mkdir -p $(OBJDIR) - mkdir -p $(EXEDIR) - -game: dir - @$(MAKE) --no-print-directory game-target - -testing: dir - @$(MAKE) --no-print-directory test-target - -game-target: $(OBJDIR)/_main.o $(OBJECTS) - $(CC) $(LDFLAGS) $^ -o $(EXE) $(LDFLAGS) - -test-target: $(OBJDIR)/_test.o $(OBJECTS) - $(CC) $(LDFLAGS) $^ -o $(TEST) $(LDFLAGS) - -$(OBJDIR)/%.o: %.cc $(SRC_H) - $(CC) $(CCFLAGS) -c -o $@ $< - -run: - ./$(EXE) - -test: - ./$(TEST) - -clean: - rm -rf $(OBJDIR)/* \ No newline at end of file