summaryrefslogtreecommitdiff
path: root/testsuite/tests/unwind/Makefile
blob: 66deadb5c222e86a159686adf27c377f38ed5f69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
default:
	@printf " ... testing 'unwind_test':"
	@if [ $(SYSTEM) = macosx ] && ! $(BYTECODE_ONLY); then \
	  $(MAKE) native_macosx_tests; \
	else \
	  echo " => skipped"; \
	fi

native_macosx_tests:
	@$(MAKE) clean ; $(MAKE) unwind_test && \
	./unwind_test >/dev/null 2>&1 && echo " => passed" || echo " => failed"

unwind_test:
	@$(OCAMLOPT) -c -opaque mylib.mli
	@$(OCAMLOPT) -c driver.ml
	@$(OCAMLOPT) -c mylib.ml
	@$(OCAMLOPT) -c stack_walker.c
	@$(OCAMLOPT) -cclib -Wl,-keep_dwarf_unwind -o unwind_test mylib.cmx \
	             driver.cmx stack_walker.o

clean:
	@rm -f *.cm* *.o unwind_test

include $(BASEDIR)/makefiles/Makefile.common