File: Makefile

package info (click to toggle)
camlp4 2.04-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,576 kB
  • ctags: 3,108
  • sloc: ml: 26,444; makefile: 736; sh: 203
file content (56 lines) | stat: -rw-r--r-- 1,200 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
# $Id: Makefile,v 2.4 1999/09/06 10:43:15 ddr Exp $

include ../config/Makefile

INCLUDES=
OCAMLCFLAGS=$(INCLUDES)
OBJS=stdpp.cmo token.cmo plexer.cmo gramext.cmo grammar.cmo
SHELL=/bin/sh
TARGET=gramlib.cma

all: $(TARGET)
opt: $(TARGET:.cma=.cmxa)

$(TARGET): $(OBJS)
	$(OCAMLC) $(OBJS) -a -o $(TARGET)

$(TARGET:.cma=.cmxa): $(OBJS:.cmo=.cmx)
	$(OCAMLOPT) $(OBJS:.cmo=.cmx) -a -o $(TARGET:.cma=.cmxa)

steal::

compare_stolen::

clean::
	rm -f *.cm[ioax] *.cmxa *.pp[io] *.o *.a *.bak .*.bak $(TARGET)

depend:
	cp .depend .depend.bak
	> .depend
	@for i in *.mli *.ml; do \
	  ../tools/apply pr_depend.cmo -- $(INCLUDES) $$i >> .depend; \
	done

promote:
	cp $(OBJS) $(OBJS:.cmo=.cmi) ../boot/.

compare:
	@for j in $(OBJS) $(OBJS:.cmo=.cmi); do \
		if cmp $$j ../boot/$$j; then :; else exit 1; fi; \
	done

install:
	-$(MKDIR) $(LIBDIR)
	cp $(TARGET) *.mli $(LIBDIR)/.
	cp *.cmi $(LIBDIR)/.
	if test -f $(TARGET:.cma=.cmxa); then $(MAKE) installopt LIBDIR=$(LIBDIR); fi

installopt:
	cp $(TARGET:.cma=.cmxa) *.cmx $(LIBDIR)/.
	if test -f $(TARGET:.cma=.lib); then \
		cp $(TARGET:.cma=.lib) $(LIBDIR)/.; \
	else \
		tar cf - $(TARGET:.cma=.a) | (cd $(LIBDIR)/.; tar xf -); \
	fi

include .depend