| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
ROOT := ../../.. |
| 11 |
include $(ROOT)/Makefile.config |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
PATH := $(BIN):$(shell echo $$PATH) |
| 16 |
mlton := mlton -default-ann 'allowFFI true' |
| 17 |
|
| 18 |
.PHONY: all all-win32 |
| 19 |
all-win32: import import2 export test_quot |
| 20 |
./import |
| 21 |
./import2 |
| 22 |
./export |
| 23 |
./test_quot |
| 24 |
all: all-win32 iimport |
| 25 |
./iimport |
| 26 |
|
| 27 |
export: export.sml ffi-export.o |
| 28 |
import: import.sml ffi-import.o |
| 29 |
import2: import2.sml ffi-import.o |
| 30 |
test_quot : test_quot.sml c_quot.o |
| 31 |
|
| 32 |
ffi-import.o: export.h |
| 33 |
ffi-export.o: export.h |
| 34 |
c_quot.o : test_quot.h |
| 35 |
|
| 36 |
iimport: iimport.sml |
| 37 |
$(mlton) \ |
| 38 |
-target-link-opt linux -ldl \ |
| 39 |
-target-link-opt solaris -ldl \ |
| 40 |
iimport.sml |
| 41 |
|
| 42 |
%.o: %.c |
| 43 |
gcc -Wall -c -o $@ $< |
| 44 |
%.h: %.sml |
| 45 |
$(mlton) -export-header $@ -stop tc $< |
| 46 |
%: |
| 47 |
$(mlton) -output $@ $^ |
| 48 |
|
| 49 |
$(eval $(MK_COMMON_GOALS)) |