Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | ## Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh |
2 | # Jagannathan, and Stephen Weeks. | |
3 | # Copyright (C) 1997-2000 NEC Research Institute. | |
4 | # | |
5 | # MLton is released under a BSD-style license. | |
6 | # See the file MLton-LICENSE for details. | |
7 | ## | |
8 | ||
9 | PATH := ../../../build/bin:$(shell echo $$PATH) | |
10 | mlton := mlton -default-ann 'allowFFI true' | |
11 | ||
12 | .PHONY: all all-win32 | |
13 | all-win32: import import2 export test_quot | |
14 | ./import | |
15 | ./import2 | |
16 | ./export | |
17 | ./test_quot | |
18 | all: all-win32 iimport | |
19 | ./iimport | |
20 | ||
21 | export: export.sml ffi-export.o | |
22 | import: import.sml ffi-import.o | |
23 | import2: import2.sml ffi-import.o | |
24 | test_quot : test_quot.sml c_quot.o | |
25 | ||
26 | ffi-import.o: export.h | |
27 | ffi-export.o: export.h | |
28 | c_quot.o : test_quot.h | |
29 | ||
30 | iimport: iimport.sml | |
31 | $(mlton) \ | |
32 | -target-link-opt linux -ldl \ | |
33 | -target-link-opt solaris -ldl \ | |
34 | iimport.sml | |
35 | ||
36 | %.o: %.c | |
37 | gcc -Wall -c -o $@ $< | |
38 | %.h: %.sml | |
39 | $(mlton) -export-header $@ -stop tc $< | |
40 | %: | |
41 | $(mlton) -output $@ $^ | |
42 | ||
43 | clean: | |
44 | ../../../bin/clean |