소스 검색

add ld option `-pthread` when LTC_PTHREAD is enabled

Steffen Jaeckel 8 년 전
부모
커밋
73934ad2fd
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      makefile_include.mk

+ 6 - 1
makefile_include.mk

@@ -42,8 +42,9 @@ endif
 endif
 endif
 
-
+#
 # Compilation flags. Note the += does not write over the user's CFLAGS!
+#
 CFLAGS += -I./src/headers/ -Wall -Wsign-compare -Wshadow -DLTC_SOURCE
 
 ifdef OLD_GCC
@@ -99,6 +100,10 @@ CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
 endif
 
 
+ifneq ($(findstring -DLTC_PTHREAD,$(CFLAGS)),)
+LDFLAGS += -pthread
+endif
+
 #List of demo objects
 DSOURCES = $(wildcard demos/*.c)
 DOBJECTS = $(DSOURCES:.c=.o)