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 66
|
bin_SCRIPTS = slat
slat_SRCS = unparse.mli unparse.ml formulas.mli formulas.ml \
identifier.mli identifier.ml parse_policy_mls.mly lex_policy_mls.mll \
read_policy_mls.mli read_policy_mls.ml print_version.mli \
print_version.ml slat.ml
EXTRA_DIST = $(slat_SRCS)
slat_MLI_SRCS = $(filter %.mli, $(slat_SRCS:.mly=.mli))
slat_ML_SRCS = $(filter %.ml, $(patsubst %.mll, %.ml, $(slat_SRCS:.mly=.ml)))
slat_OBJS = $(slat_ML_SRCS:.ml=.cmo)
slat_DEPS = $(slat_MLI_SRCS:.mli=.di) $(slat_ML_SRCS:.ml=.d)
slat_MLY_SRCS = $(filter %.mly, $(slat_SRCS))
slat_MLL_SRCS = $(filter %.mll, $(slat_SRCS))
slat_ML_DERS = $(slat_MLY_SRCS:.mly=.ml) $(slat_MLY_SRCS:.mly=.mli) \
$(slat_MLL_SRCS:.mll=.ml)
slat: $(slat_OBJS)
$(OCAMLLINKER) $(OCAMLFLAGS) -o $@ $(slat_OBJS)
# Clean up
clean:
-rm slat
-rm $(slat_OBJS)
-rm $(slat_MLI_SRCS:.mli=.cmi)
-rm $(slat_ML_DERS)
-rm $(slat_DEPS)
include $(slat_DEPS)
# Ocaml specific variables set by ./configure
OCAMLC = @OCAMLC@
OCAMLDEP = @OCAMLDEP@
OCAMLLEX = @OCAMLLEX@
OCAMLYACC= @OCAMLYACC@
OCAMLLIB = @OCAMLLIB@
OCAMLVERSION = @OCAMLVERSION@
OCAMLWEB = @OCAMLWEB@
OCAMLWIN32 = @OCAMLWIN32@
INCLUDES= # all relevant -I options here
OCAMLFLAGS=$(INCLUDES) # add other options for ocamlc here
OCAMLLINKER=$(OCAMLC) -custom
# Pattern Rules
%.cmo: %.ml
$(OCAMLC) $(OCAMLFLAGS) -c $<
%.cmi: %.mli
$(OCAMLC) $(OCAMLFLAGS) -c $<
%.ml %.mli: %.mly
$(OCAMLYACC) $<
%.ml: %.mll
$(OCAMLLEX) $<
%.d: %.ml
$(OCAMLDEP) $(INCLUDES) $< > $@
%.di: %.mli
$(OCAMLDEP) $(INCLUDES) $< > $@
# Don't regenerate intermediate files for dependency processing.
.PRECIOUS: %.ml %.mli
|