Files
ostep-code/threads-bugs/Makefile
Remzi Arpaci-Dusseau bb639b166c solution for atomicity bug
2019-05-08 14:35:39 -05:00

27 lines
386 B
Makefile

CC := gcc
CFLAGS := -Wall -Werror -I../include -pthread
OS := $(shell uname -s)
LIBS :=
ifeq ($(OS),Linux)
LIBS += -pthread
endif
SRCS := atomicity.c \
atomicity_fixed.c
OBJS := ${SRCS:c=o}
PROGS := ${SRCS:.c=}
.PHONY: all
all: ${PROGS}
${PROGS} : % : %.o Makefile
${CC} $< -o $@ ${LIBS}
clean:
rm -f ${PROGS} ${OBJS}
%.o: %.c Makefile
${CC} ${CFLAGS} -c $<