CC = gcc CFLAGS = -g -Wall -Wextra -Werror -std=c17 -lpthread # test2.o: test2.c # $(CC) $(CFLAGS) -c test2.c -o test2.o # test1.o: test1.c # $(CC) $(CFLAGS) -c test1.c -o test1.o %.o: %.c $(CC) $(CFLAGS) -c $^ -o $@ objfiles = test1.o test2.o test: $(objfiles) $(CC) $(CFLAGS) $^ -o $@ all: test @echo "Build complete" .PHONY: clean clean: rm -f test1.o test2.o test