Use pkg-config to find needed libs for check.

Also add -lpthread explicitly
This commit is contained in:
Erik Ekman 2014-01-29 22:12:16 +01:00
parent 9ee78b6f4d
commit 46a3d82639
1 changed files with 2 additions and 3 deletions

View File

@ -6,8 +6,8 @@ SRCOBJS = ../src/base32.o ../src/base64.o ../src/read.o ../src/dns.o ../src/enc
OS = `uname | tr "a-z" "A-Z"`
CHECK_PATH = /usr/local
LDFLAGS = -L$(CHECK_PATH)/lib -lcheck `../src/osflags link`
CFLAGS = -g -Wall -D$(OS) -I../src -I$(CHECK_PATH)/include -pedantic `../src/osflags cflags`
LDFLAGS = -L$(CHECK_PATH)/lib `pkg-config check --libs` -lpthread
CFLAGS = -g -Wall -D$(OS) `pkg-config check --cflags` -I../src -I$(CHECK_PATH)/include -pedantic
all: $(TEST)
@LD_LIBRARY_PATH=${CHECK_PATH}/lib ./$(TEST)
@ -20,7 +20,6 @@ $(TEST): $(OBJS) $(SRCOBJS)
@echo CC $<
@$(CC) $(CFLAGS) -c $<
clean:
@echo "Cleaning tests/"
@rm -f *~ *.core $(TEST) $(OBJS)