26 lines
451 B
Makefile
26 lines
451 B
Makefile
CC := gcc
|
|
CFLAGS := -Wall -Werror -I../include
|
|
|
|
SRCS := dining_philosophers_deadlock.c \
|
|
dining_philosophers_deadlock_print.c \
|
|
dining_philosophers_no_deadlock.c \
|
|
dining_philosophers_no_deadlock_print.c \
|
|
join.c \
|
|
binary.c \
|
|
zemaphore.c
|
|
|
|
OBJS := ${SRCS:c=o}
|
|
PROGS := ${SRCS:.c=}
|
|
|
|
.PHONY: all
|
|
all: ${PROGS}
|
|
|
|
${PROGS} : % : %.o Makefile
|
|
${CC} $< -o $@ -pthread
|
|
|
|
clean:
|
|
rm -f ${PROGS} ${OBJS}
|
|
|
|
%.o: %.c Makefile
|
|
${CC} ${CFLAGS} -c $<
|