# not graded .SUFFIXES: # remove all the implicit rules (avoid conflicts with our own rules) .SECONDARY: # all files are intermediate (keep them, otherwise they are removed) .PHONY: all clean # these targets are not files (even if a file named "all" or "clean" exists, the rule is applied) LDFLAGS= LIBS= CFLAGS=-std=c++20 -Wall -g BIN=inventory all: $(BIN) main: main.o g++ $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) inventory: inventory.o g++ $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) %.o: %.cpp g++ $(CFLAGS) -o $@ -c $< clean: rm -f $(BIN) *.o *~