diff --git a/dtls/Makefile b/dtls/Makefile index f49edfac..5297077f 100644 --- a/dtls/Makefile +++ b/dtls/Makefile @@ -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)