summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2018-03-13 08:37:21 -0400
committerAnthony Green <green@moxielogic.com>2018-03-13 08:37:21 -0400
commit9291f941c2df5ddf967f701b258ac2b3cc9d0820 (patch)
tree62a8761c12c806e9bd890709976deebaf4b151b4 /testsuite
parentbede01d82ec2f1cfe2bb42233fcd408a6e3a6323 (diff)
downloadlibffi-9291f941c2df5ddf967f701b258ac2b3cc9d0820.tar.gz
Add bhaible's missing Makefile
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/libffi.bhaible/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/libffi.bhaible/Makefile b/testsuite/libffi.bhaible/Makefile
new file mode 100644
index 0000000..3322de9
--- /dev/null
+++ b/testsuite/libffi.bhaible/Makefile
@@ -0,0 +1,28 @@
+CC = gcc
+CFLAGS = -O2 -Wall
+prefix =
+includedir = $(prefix)/include
+libdir = $(prefix)/lib
+CPPFLAGS = -I$(includedir)
+LDFLAGS = -L$(libdir) -Wl,-rpath,$(libdir)
+
+all: check-call check-callback
+
+test-call: test-call.c testcases.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o test-call test-call.c -lffi
+
+test-callback: test-callback.c testcases.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o test-callback test-callback.c -lffi
+
+check-call: test-call
+ ./test-call > test-call.out
+ LC_ALL=C uniq -u < test-call.out > failed-call
+ test '!' -s failed-call
+
+check-callback: test-callback
+ ./test-callback > test-callback.out
+ LC_ALL=C uniq -u < test-callback.out > failed-callback
+ test '!' -s failed-callback
+
+clean:
+ rm -f test-call test-callback test-call.out test-callback.out failed-call failed-callback