File: Makefile

package info (click to toggle)
ocaml-num 1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 556 kB
  • sloc: ml: 4,454; ansic: 1,415; makefile: 202; sh: 13
file content (32 lines) | stat: -rw-r--r-- 817 bytes parent folder | download | duplicates (2)
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
include ../Makefile.common

CAMLCFLAGS=
CAMLOPTFLAGS=$(CAMLCFLAGS)

FILES=test.ml test_nats.ml test_big_ints.ml test_ratios.ml test_nums.ml test_io.ml end_test.ml

all:: test.byt
	@echo "----- Testing in bytecode..."
	$(OCAMLRUN) -I ../src ./test.byt

ifeq "$(NATIVE_COMPILER)" "true"
all:: test.exe
	@echo "----- Testing in native code..."
	./test.exe
endif

test.byt: $(FILES) ../src/nums.cma ../src/libnums.$(A)
	$(OCAMLC) -I ../src $(CAMLCFLAGS) ../src/nums.cma $(FILES) -o test.byt

test.exe: $(FILES) ../src/nums.cmxa ../src/libnums.$(A)
	$(OCAMLOPT) -I ../src $(CAMLOPTFLAGS) ../src/nums.cmxa $(FILES) -o test.exe

%.cmi: %.mli
	$(OCAMLC) $(CAMLCFLAGS) -c $*.mli
%.cmo: %.ml
	$(OCAMLC) $(CAMLCFLAGS) -c $*.ml
%.cmx: %.ml
	$(OCAMLOPT) $(CAMLOPTFLAGS) -c $*.ml

clean:
	rm -f *.cm[ioxt] *.$(O) test.byt test.exe