some thread API examples
This commit is contained in:
21
threads-api/Makefile
Normal file
21
threads-api/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
CC := gcc
|
||||
CFLAGS := -Wall -Werror -I../include
|
||||
|
||||
SRCS := thread_create.c \
|
||||
thread_create_simple_args.c \
|
||||
thread_create_with_return_args.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 $<
|
||||
Reference in New Issue
Block a user