File: Makefile

package info (click to toggle)
mlton 20100608-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 36,624 kB
  • sloc: ansic: 18,441; lisp: 2,879; makefile: 1,572; sh: 1,326; pascal: 256; asm: 97
file content (44 lines) | stat: -rw-r--r-- 950 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
## Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
 #    Jagannathan, and Stephen Weeks.
 # Copyright (C) 1997-2000 NEC Research Institute.
 #
 # MLton is released under a BSD-style license.
 # See the file MLton-LICENSE for details.
 ##

PATH  := ../../../build/bin:$(shell echo $$PATH)
mlton := mlton -default-ann 'allowFFI true'

.PHONY: all all-win32
all-win32: import import2 export test_quot
	./import
	./import2
	./export
	./test_quot
all:	all-win32 iimport
	./iimport

export: export.sml ffi-export.o
import: import.sml ffi-import.o
import2: import2.sml ffi-import.o
test_quot : test_quot.sml c_quot.o

ffi-import.o: export.h
ffi-export.o: export.h
c_quot.o : test_quot.h

iimport: iimport.sml
	$(mlton) 				\
		-target-link-opt linux -ldl 	\
		-target-link-opt solaris -ldl	\
		iimport.sml

%.o:	%.c
	gcc -Wall -c -o $@ $<
%.h:	%.sml
	$(mlton) -export-header $@ -stop tc $<
%:
	$(mlton) -output $@ $^

clean:
	../../../bin/clean