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
+CCFLAGS := -std=c++17 -Wall -Wextra -pedantic -Weffc++ -Wold-style-cast -Wno-narrowing -I src
+LDFLAGS := -L /opt/homebrew/Cellar/sfml/2.6.1/lib -I /opt/homebrew/Cellar/sfml/2.6.1/include -lsfml-window -lsfml-graphics -lsfml-system
OBJDIR := build
EXEDIR := build/exe
SRC := $(shell find src -type f -name '[^_]*.cc')
SRC_H := $(shell find src -type f -name '[^_]*.h')
-OBJECTS := $(addprefix $(OBJDIR)/, $(SRC:src/%.cc=%.o) )
+OBJECTS := $(addprefix $(OBJDIR)/, $(SRC:src/%.cc=%.o) )
vpath %.cc src
$(CC) $(LDFLAGS) $^ -o $(TEST) $(LDFLAGS)
$(OBJDIR)/%.o: %.cc $(SRC_H)
- $(CC) $(CCFLAGS) -c -o $@ $<
+ $(CC) $(CCFLAGS) $(LDFLAGS) -c -o $@ $<
run:
./$(EXE)
./$(TEST)
clean:
- rm -rf $(OBJDIR)/*
\ No newline at end of file
+ rm -rf $(OBJDIR)/*