Skip to content

Commit

Permalink
Add -lpthreads to handle non-explicit linking
Browse files Browse the repository at this point in the history
  • Loading branch information
vasi committed Sep 18, 2012
1 parent ee8a340 commit c5f99bf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +29,7 @@ all: $(PROGS)
$(COMPILE) $@ $<

$(PROGS): %: %.o $(COMMON)
$(LD) $@ $^ -llzma -larchive
$(LD) $@ $^ $(LIBADD)

clean:
rm -f *.o $(PROGS)
Expand Down

0 comments on commit c5f99bf

Please sign in to comment.