Skip to content

Commit

Permalink
Fixed test Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
chetant authored and sethfowler committed Mar 20, 2014
1 parent 8da02b1 commit c52bbd3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -4,7 +4,6 @@ test/*.hi
test/*.o
test/*_hs
test/*_c
test/Makefile
src/Clang/Internal/FFI_stub_ffi.c
src/Clang/Internal/FFI_stub_ffi.h
cabal-dev
Expand Down
11 changes: 7 additions & 4 deletions test/Makefile.in → test/Makefile
@@ -1,6 +1,9 @@
CC=@CC@
CFLAGS=-std=gnu99 @CFLAGS@
LDFLAGS=@LDFLAGS@
LLVM_CFG=../build/out/bin/llvm-config
CC=gcc
CFLAGS=-std=gnu99
LLVM_CFLAGS=$(shell $(LLVM_CFG) --cflags)
LDFLAGS=$(shell $(LLVM_CFG) --ldflags)
LIBS=-ldl -pthread -Wl,-rpath -Wl,$(shell $(LLVM_CFG) --libdir) $(shell $(LLVM_CFG) --libs core) -lclang

all: Test_Diagnostics_c Test_Diagnostics_hs Test_InclusionVisitor_c Test_InclusionVisitor_hs Test_ChildVisitor_c Test_ChildVisitor_hs

Expand All @@ -11,7 +14,7 @@ test: all
@./runTest.sh Test_ChildVisitor Test_ChildVisitor.c

%_c : %.c
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
$(CC) $(CFLAGS) $(LLVM_CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)

%_hs : %.hs
ghc -o $@ $<
Expand Down

0 comments on commit c52bbd3

Please sign in to comment.