Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile 346 B
#!/usr/bin/make
.SUFFIXES:
.PHONY: all run clean

TAR = coroutines
SRC = $(wildcard *.c)
OBJ = $(SRC:%.c=%.o)
DEP = $(OBJ:%.o=%.d)
-include $(DEP)

CFLAGS = -std=c11 -Wall -pedantic -MMD -MP

%.o: %.c
	$(CC) $(CFLAGS) $< -c

$(TAR): $(OBJ)
	$(CC) $(CFLAGS) $^ -o $@

all: $(TAR)

run: all
	./$(TAR)

clean:
	$(RM) $(RMFILES) $(TAR) $(OBJ) $(DEP)