Skip to content

Commit

Permalink
Properly find check using pkg-config.
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Dec 29, 2008
1 parent 1358a83 commit 29c7f8b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
CC=gcc
CFLAGS=-g -Wall $(DEFS)
OBJECTS=gc.o symbol.o read.o

TEST_CFLAGS=
TEST_LIBS=
TEST_CFLAGS=$(shell pkg-config check --cflags)
TEST_LIBS=$(shell pkg-config check --libs)
TEST_LDFLAGS=
TEST_OBJECTS=tests.o /usr/lib/libcheck.a
TEST_OBJECTS=tests.o
TESTER=tests

all: check
Expand All @@ -14,7 +15,8 @@ check: $(TESTER)

$(TEST_OBJECTS): CFLAGS += $(TEST_CFLAGS)

$(TESTER): LDFLAGS += $(TEST_LDFLAGS) $(foreach lib,$(TEST_LIBS), -l$(lib))
$(TESTER): LDFLAGS += $(TEST_LDFLAGS)
$(TESTER): LDLIBS += $(TEST_LIBS)
$(TESTER): $(TEST_OBJECTS) $(OBJECTS)

clean:
Expand Down

0 comments on commit 29c7f8b

Please sign in to comment.