Merge pull request #149 from liuqun/dtls-fixup-makefile-pthread

Fix up build error on dtls/server-dtls-threaded
pull/155/head
Kaleb Himes 2019-06-26 11:58:59 -06:00 committed by GitHub
commit c9cf2492d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,10 @@ all: $(TARGETS)
debug: CFLAGS+=$(DEBUG_FLAGS)
debug: all
# add the -pthread flag and -lpthread lib to any threaded examples
%-threaded: CFLAGS+=-pthread
%-threaded: LIBS+=-lpthread
# build template
%: %.c
$(CC) -o $@ $< $(CFLAGS) $(LIBS)