File: Makefile.Debian

package info (click to toggle)
mlgtk 2.0.0-13
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 596 kB
  • ctags: 1,197
  • sloc: ml: 3,638; ansic: 2,522; makefile: 248; sh: 85
file content (64 lines) | stat: -rw-r--r-- 1,371 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CC = gcc
CAMLC = ocamlc -g -thread
CAMLMKTOP = ocamlmktop -g -thread
CAMLO = ocamlopt -thread
CAMLINC = -I +mlgtk

ZOBJS = unix.cma threads.cma gtk.cma
ZOBJSOPT = unix.cmxa threads.cmxa gtk.cmxa

.PHONY : clean distclean depend all all_opt

LDFLAGS = "$(shell gtk-config --libs)"
LDFLAGSOPT = "$(shell gtk-config --libs)"

TESTS = tut_1 tut_2 tut_3 tut_4 tut_cat tut_threads
XTESTS = tut_1_opt tut_2_opt tut_3_opt tut_4_opt tut_cat_opt

all: $(TESTS) depend
all_opt: $(XTESTS) depend

t%: t%.cmo
	$(CAMLC) -o $@ -cclib $(LDFLAGS) $(CAMLINC) $(ZOBJS) $+

t%_opt: t%.cmx
	$(CAMLO) -o $@ -cclib $(LDFLAGSOPT) $(CAMLINC) $(ZOBJSOPT) $+

tut_cat: pty.cmo tut_cat.cmo
	$(CAMLC) -o $@ -cclib $(LDFLAGS) $(CAMLINC) $(ZOBJS) $+

tut_cat_opt: pty.cmx tut_cat.cmx
	$(CAMLO) -o $@ -cclib $(LDFLAGSOPT) $(CAMLINC) $(ZOBJSOPT) $+

tut_threads:  tut_threads.cmo
	$(CAMLMKTOP) -o $@ -cclib $(LDFLAGS) $(CAMLINC) $(ZOBJS) $^

tut_cat.ml:
	gunzip tut_cat.ml.gz

tut_threads.ml:
	gunzip tut_threads.ml.gz

clean:
	-rm -f *.cm* *.o $(TESTS) $(XTESTS)
	-gzip tut_cat.ml tut_threads.ml

distclean: clean
	-rm .depend

depend:
	ocamldep $(CAMLINC) *.ml* >.depend

.depend:
	ocamldep *.ml* >.depend

.ml.cmo:
	$(CAMLC) $(CAMLINC) $(ZFLAGS) -c $<
.ml.cmx:
	$(CAMLO) $(CAMLINC) $(ZFLAGSOPT) -c $<
.mli.cmi:
	$(CAMLC) $(CAMLINC) $(ZFLAGS) -c $<

.SUFFIXES: .ml .cmo .cmx .mli .cmi

include .depend