Files
ostep-code/threads-bugs/Makefile
Remzi Arpaci-Dusseau 89354869b0 ordering example: fixed
2019-05-19 12:14:44 -05:00

29 lines
420 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 \
ordering.c \
ordering_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 $<