Run osflags for compile/link of tests as well

src/common.c is linked into test binary, might require some libs
This commit is contained in:
Erik Ekman 2014-02-07 23:12:21 +01:00
parent d57aebacdc
commit f249ee3b5d

View file

@ -6,8 +6,8 @@ SRCOBJS = ../src/base32.o ../src/base64.o ../src/common.o ../src/read.o ../src/
OS = `uname | tr "a-z" "A-Z"` OS = `uname | tr "a-z" "A-Z"`
CHECK_PATH = /usr/local CHECK_PATH = /usr/local
LDFLAGS = -L$(CHECK_PATH)/lib `pkg-config check --libs` -lpthread LDFLAGS = -L$(CHECK_PATH)/lib `pkg-config check --libs` -lpthread `sh ../src/osflags $(TARGETOS) link`
CFLAGS = -g -Wall -D$(OS) `pkg-config check --cflags` -I../src -I$(CHECK_PATH)/include -pedantic CFLAGS = -g -Wall -D$(OS) `pkg-config check --cflags` -I../src -I$(CHECK_PATH)/include -pedantic `sh ../src/osflags $(TARGETOS) cflags`
all: $(TEST) all: $(TEST)
@LD_LIBRARY_PATH=${CHECK_PATH}/lib ./$(TEST) @LD_LIBRARY_PATH=${CHECK_PATH}/lib ./$(TEST)