From c5f99bf4b4d34922ca7c97e23bea519e65794a89 Mon Sep 17 00:00:00 2001 From: Dave Vasilevsky Date: Tue, 18 Sep 2012 03:10:03 -0400 Subject: [PATCH] Add -lpthreads to handle non-explicit linking --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 48db5c7..b837fb7 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,10 @@ endif OPT = -g -O0 CFLAGS = $(patsubst %,-I%/include,$(LIBPREFIX)) $(OPT) -std=gnu99 \ -Wall -Wno-unknown-pragmas - LDFLAGS = $(patsubst %,-L%/lib,$(LIBPREFIX)) $(OPT) -Wall +LDFLAGS = $(patsubst %,-L%/lib,$(LIBPREFIX)) $(OPT) -Wall + +THREADS = -lpthread +LIBADD = $(THREADS) -llzma -larchive CC = gcc COMPILE = $(CC) $(CFLAGS) -c -o @@ -26,7 +29,7 @@ all: $(PROGS) $(COMPILE) $@ $< $(PROGS): %: %.o $(COMMON) - $(LD) $@ $^ -llzma -larchive + $(LD) $@ $^ $(LIBADD) clean: rm -f *.o $(PROGS)