| 1 |
# Type `make' for native code |
| 2 |
# Type `make byte' for byte code instead of native code |
| 3 |
|
| 4 |
VERSION = 1.3.1 |
| 5 |
export VERSION |
| 6 |
|
| •7 |
PACKS = camlp-streams |
| 8 |
SOURCES = \ |
| 9 |
version.ml lexer.mli lexer.mll \ |
| 10 |
parser_directive.mly directive.ml main.ml |
| 11 |
RESULT = camlmix |
| 12 |
|
| 13 |
.PHONY: default native byte all opt install www version force clean veryclean |
| 14 |
|
| 15 |
default: native |
| 16 |
native: version nc |
| 17 |
byte: version bc |
| 18 |
|
| 19 |
ifndef PREFIX |
| 20 |
PREFIX := $(shell dirname `which ocaml`)/.. |
| 21 |
endif |
| 22 |
export PREFIX |
| 23 |
|
| 24 |
all: byte |
| 25 |
opt: native |
| 26 |
install: |
| 27 |
install -m 0755 $(addsuffix $(EXE), \ |
| 28 |
$(sort $(BCRESULT) $(NCRESULT))) $(PREFIX)/bin/ |
| 29 |
|
| 30 |
www: all test install archive |
| 31 |
|
| 32 |
version: |
| 33 |
contents='let version = "$(VERSION)"'; \ |
| 34 |
if test "`cat version.ml`" != "$$contents"; then \ |
| 35 |
echo "$$contents" > version.ml;\ |
| 36 |
fi |
| 37 |
|
| 38 |
.PHONY: examples |
| 39 |
examples: |
| 40 |
cd examples && $(MAKE) |
| 41 |
|
| 42 |
force: |
| 43 |
$(MAKE) clean |
| 44 |
$(MAKE) |
| 45 |
$(MAKE) archive |
| 46 |
|
| 47 |
TRASH = META.mlx.ml langmix.* camlmix.exe *~ |
| 48 |
|
| 49 |
clean:: |
| 50 |
cd examples && $(MAKE) clean |
| 51 |
|
| 52 |
|
| 53 |
LIBS = unix |
| 54 |
|
| 55 |
OCAMLMAKEFILE = OCamlMakefile |
| 56 |
include $(OCAMLMAKEFILE) |