d0efb6ef3bafe3cd3ccd9adb32b657bd77dfb584
[ghc.git] / testsuite / tests / dynlibs / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3 include $(TOP)/mk/test.mk
4
5 .PHONY: T3807
6 T3807:
7 $(RM) T3807Export_stub.c T3807Export_stub.h T3807Export_stub.o
8 $(RM) T3807Export.o T3807Export.hi
9 $(RM) T3807-export.o T3807-load.o
10 $(RM) T3807test.so
11 $(RM) T3807-load
12 '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make -dynamic -fPIC -shared T3807Export.hs T3807-export.c -o T3807test.so -lHSrts-ghc`'$(TEST_HC)' $(TEST_HC_OPTS) --numeric-version`
13 '$(TEST_HC)' $(TEST_HC_OPTS) -no-auto-link-packages -no-hs-main T3807-load.c -o T3807-load -ldl
14 ./T3807-load
15
16 .PHONY: T4464
17 T4464:
18 $(RM) T4464B.o T4464C.o T4464H.hi T4464H.o
19 $(RM) T4464H_stub.c T4464H_stub.h T4464H_stub.o
20 $(RM) HS4464.dll HS4464.dll.a t4464.exe
21 '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -shared T4464H.hs T4464B.c -o HS4464.dll
22 '$(TEST_HC)' $(TEST_HC_OPTS) -v0 T4464C.c HS4464.dll.a -o t4464.exe
23 -./t4464.exe
24 echo "====="
25 echo "=====" >&2
26 $(RM) T4464B.o T4464C.o T4464H.hi T4464H.o
27 $(RM) T4464H_stub.c T4464H_stub.h T4464H_stub.o
28 $(RM) HS4464.dll HS4464.dll.a t4464.exe
29 '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -shared T4464H.hs T4464B.c -o HS4464.dll -rtsopts
30 '$(TEST_HC)' $(TEST_HC_OPTS) -v0 T4464C.c HS4464.dll.a -o t4464.exe
31 ./t4464.exe
32