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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
include ../Makefile.config
CAMLC = $(OCAMLFIND) $(CAMLCNAME2) $(DBG)
CAMLDOC = $(OCAMLFIND) ocamldoc
FLAGS =
CAMLCOPT = $(OCAMLFIND) $(CAMLOPTNAME) $(DBG)
CAMLDEP = $(OCAMLFIND) ocamldep $(LIBDIRS)
NAME = test_pp
LIB= -package netstring,ssl,lwt $(LIBDIRS) -I +camlp4
PP =
# -pp "camlp4o ../lib/xhtmlsyntax.cma -- -loc loc"
ALL_CMO = multipart.cmo http_headers.cmo \
ocsigen_http_frame.cmo http_parser.cmo http_lexer.cmo \
framepp.cmo ocsigen_http_com.cmo ocsigen_charset_mime.cmo \
ocsigen_senders.cmo ocsigen_headers.cmo ocsigen_range.cmo
#test_pp.cmo
ALL_CMX = $(ALL_CMO:.cmo=.cmx)
.PHONY: depend
byte: $(ALL_CMO)
# $(CAMLC) $(LIB) -o $(NAME) unix.cma lwt.cma netstring.cma xhtml.cma $(ALL_CMO)
# cp *.cmi *.cmo ../lib
opt: $(ALL_CMX)
# cp *.cmi *.cmx *.o ../lib
doc:
$(CAMLDOC) $(PP) $(LIB) -html -d documentation *.ml *.mli
clean:
-rm -f $(NAME) $(OPTNAME) *.cm[oiax] *.cmxa *.cmxs *.o *.annot \
http_parser.ml http_parser.mli http_lexer.ml documentation/*
viclean: clean
-rm *~
depend:
$(CAMLDEP) $(PP) $(LIBDIRS) *.ml *.mli *.mll *.mly > .depend
http_parser.cmo:http_parser.ml http_parser.mli http_parser.cmi
http_parser.cmx:http_parser.ml http_parser.mli http_parser.cmi
http_lexer.cmo:http_lexer.ml http_lexer.cmi
http_lexer.cmx:http_lexer.ml http_lexer.cmi
http_lexer.ml: http_lexer.mll
http_parser.ml: http_parser.mly
# generic rules :
#################
.SUFFIXES: .mll .mly .mli .ml .cmi .cmo .cmx
.mll.mli:
$(CAMLLEX) $<
.mll.ml:
$(CAMLLEX) $<
.mly.ml:
$(CAMLYACC) $<
.mly.mli:
$(CAMLYACC) $<
.mli.cmi:
$(CAMLC) -c $(FLAGS) $(LIB) $<
.ml.cmi:
$(CAMLC) -c $(FLAGS) $(LIB) $<
.ml.cmo:
# -rm $(LIBDIR)/$(<:.ml=.cmo)
# -rm $(LIBDIR)/$(<:.ml=.cmi)
$(CAMLC) $(PP) -c $(FLAGS) $(LIB) $<
.ml.o:
$(CAMLCOPT) -c $(FLAGS) $(LIB) $<
.ml.cmx:
$(CAMLCOPT) $(PP) -c $(PROFILE) $(FLAGS) $(LIB) $<
-include .depend
|