File: Makefile.common

package info (click to toggle)
lablgl 1:1.06-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,316 kB
  • sloc: ansic: 12,852; ml: 12,372; tcl: 342; makefile: 307; xml: 84; perl: 12
file content (65 lines) | stat: -rw-r--r-- 1,235 bytes parent folder | download
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
65
# Common parts of the Makefile, shared by everybody

# Ocaml commands
CAMLC=ocamlc
CAMLOPT=ocamlopt
CAMLP4O=camlp5o pr_o.cmo
OCAMLFIND=ocamlfind
COMPILER=$(CAMLC) -c -w s #-warn-error A
OPTCOMP=$(CAMLOPT) -c
LIBRARIAN=ocamlmklib
OPTLIB=$(CAMLOPT) -a
LINKER=$(CAMLC)
OPTLINK=$(CAMLOPT)
SRCDIR=$(TOPDIR)/src
VAR2DEF=ocamlrun $(SRCDIR)/var2def
VAR2SWITCH=ocamlrun $(SRCDIR)/var2switch

# Default settings
CONFIG = $(TOPDIR)/Makefile.config
LIBDIR = `$(CAMLC) -where`
LABLTKDIR = `$(OCAMLFIND) query -qe labltk || echo +labltk`
DLLDIR = $(LIBDIR)/stublibs
INSTALLDIR = $(LIBDIR)/lablGL
TOGLDIR = Togl
TOGL_WS = TOGL_X11
COPTS = -c -O

# Default toolchain (unix)
TOOLCHAIN = unix
XA = .a
XB =
XE =
XO = .o
XS = .so

# Windows specific
MKLIB=link /lib /nologo /debugtype:CV /out:
MKDLL=link /nologo /dll /out:
OCAMLDLL= "$(LIBDIR)/ocamlrun$(XA)"

include $(CONFIG)

# Default rules
.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .var .h .opt $(XA) $(XO) $(XE) .d$(XO)
.SUFFIXES: .ml4

.ml.cmo:
	$(COMPILER) $(OCAMLINC) $<

.ml.cmx:
	$(OPTCOMP) $(OCAMLINC) $<

.mli.cmi:
	$(COMPILER) $(OCAMLINC) $<

.c$(XO):
	$(COMPILER) -ccopt "$(COPTS) $(INCLUDES)" $<

.var.h:
	$(VAR2DEF) < $< > $@

ifneq ($(CAMLP4O),no)
.ml4.ml:
	$(CAMLP4O) -impl $< -o $@
endif