File: Makefile.common

package info (click to toggle)
lablgl 1:1.05-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,444 kB
  • ctags: 2,438
  • sloc: ansic: 8,270; ml: 6,118; tcl: 342; makefile: 294; xml: 84; perl: 12
file content (57 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download | duplicates (3)
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
# Common parts of the Makefile, shared by everybody

# Ocaml commands
CAMLC=ocamlc
CAMLOPT=ocamlopt
COMPILER=$(CAMLC) -c -w s
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`
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)

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

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

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

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

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