Anonymous avatar Anonymous committed 117d23c

Initial submit of OCaml NAE BEEP Core.

Comments (0)

Files changed (3)

+  Copyright (c) 2003-2004, James H. Woodyatt
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+    Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+    Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+  OF THE POSSIBILITY OF SUCH DAMAGE. 
+# The following META file is a guess by ocamlfind:
+name="beep"
+version="1.01"
+description="Pagoda BEEP Core"
+requires="unix cf mime xml iom sasl"
+archive(byte)="beep.cma"
+archive(native)="beep.cmxa"
+# FILE     Makefile
+#
+# Copyright (c) 2003-2004, James H. Woodyatt
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#
+#   Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in
+#   the documentation and/or other materials provided with the
+#   distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+# OF THE POSSIBILITY OF SUCH DAMAGE. 
+
+DEBUG_OPT = -g -passopt -principal -warn-error A
+REQUIRE = unix cf mime xml iom sasl
+PREDICATES =
+
+###############################################################################
+
+.PHONY: default opt test test.opt clean install uninstall depend doc
+
+default::
+
+#OCAMLFINDOPT = -pp camlp4o -package "$(REQUIRE)" -predicates "$(PREDICATES)"
+#OCAMLDEP = ocamldep -pp camlp4o
+
+OCAMLFINDOPT = -package "$(REQUIRE)" -predicates "$(PREDICATES)"
+
+OCAMLC       = ocamlfind ocamlc $(OCAMLFINDOPT)
+OCAMLOPT     = ocamlfind ocamlopt $(OCAMLFINDOPT)
+OCAMLMKLIB   = ocamlmklib
+OCAMLMKTOP   = ocamlfind ocamlmktop $(OCAMLFINDOPT)
+OCAMLDEP     = ocamldep
+
+CC_OPT       = -ccopt -O2 -ccopt -Wall -ccopt -Wno-unused-variable
+CMI_OPT      = $(DEBUG_OPT)
+CMO_OPT      = $(DEBUG_OPT)
+CMX_OPT      = -unsafe -noassert -inline 9
+
+CMA_OPT      =
+CMXA_OPT     =
+
+.SUFFIXES: .ml .mli .mll .mly .cmo .cmi .cma .cmx .cmxa
+
+%.ml : %.mll
+	$(OCAMLLEX) $<
+
+%.ml %.mli : %.mly
+	$(OCAMLYACC) -b$* $<
+
+%.cmi : %.mli
+	$(OCAMLC) $(CMI_OPT) -o $@ -c $<
+
+%.cmi %.cmo : %.ml
+	$(OCAMLC) $(CMO_OPT) -o $@ -c $<
+
+%.cmi %.cmx %.o : %.ml
+	$(OCAMLOPT) $(CMX_OPT) -o $@ -c $<
+
+%.o : %.c
+	$(OCAMLC) $(CC_OPT) -o $@ -c $<
+
+clean::
+	rm -f *.cmi *.cmo *.cma
+	rm -f *.cmx *.cmxa *.o *.a dll*.so
+
+###############################################################################
+
+default:: beep.cma
+
+opt:: beep.cmxa
+
+BEEP_LEXYACC_MODULES =
+
+BEEP_YACC_MODULES = $(BEEP_LEXYACC_MODULES:%=beep_yacc_%)
+BEEP_LEX_MODULES = $(BEEP_LEXYACC_MODULES:%=beep_lex_%)
+
+clean::
+	rm -rf $(BEEP_LEX_ML_FILES)
+	rm -rf $(BEEP_YACC_ML_FILES)
+	rm -rf $(BEEP_YACC_MLI_FILES)
+
+beep_lex_%.cmo : beep_yacc_%.cmi beep_lex_%.cmi
+beep_lex_%.cmx : beep_yacc_%.cmi beep_lex_%.cmi
+
+#manual dependencies
+
+#beep_yacc_foo.cmi: beep_foo_bar.cmi
+#beep_lex_foo.cmi: beep_foo_bar.cmi
+
+BEEP_LEX_ML_FILES = $(BEEP_LEX_MODULES:%=%.ml)
+BEEP_YACC_ML_FILES = $(BEEP_YACC_MODULES:%=%.ml)
+BEEP_YACC_MLI_FILES = $(BEEP_YACC_MODULES:%=%.mli)
+
+BEEP_MODULES = \
+    error locale frame tcp_frame exchange \
+	frame_exchange entity_exchange parsed_exchange xml_exchange \
+	channel transport tcp_mapping tcp4_endpoint tcp6_endpoint \
+	sasl
+
+BEEP_PRIMITIVES =  # no primitives yet
+
+BEEP_ML_FILES = $(BEEP_MODULES:%=beep_%.ml)
+BEEP_MLI_FILES = $(BEEP_MODULES:%=beep_%.mli)
+BEEP_CMI_FILES = $(BEEP_MODULES:%=beep_%.cmi)
+BEEP_CMO_FILES = $(BEEP_MODULES:%=beep_%.cmo)
+BEEP_CMX_FILES = $(BEEP_MODULES:%=beep_%.cmx)
+BEEP_O_FILES = $(BEEP_MODULES:%=beep_%.o)
+
+BEEP_P_C_FILES = $(BEEP_PRIMITIVES:%=beep_%_p.c)
+BEEP_P_H_FILES = $(BEEP_PRIMITIVES:%=beep_%_p.h)
+BEEP_P_O_FILES = $(BEEP_PRIMITIVES:%=beep_%_p.o)
+
+#libbeep.a : $(BEEP_P_O_FILES) $(BEEP_CMI_FILES) $(BEEP_CMO_FILES)
+#	$(OCAMLMKLIB) -o beep $(BEEP_P_O_FILES)
+#
+#beep.cma : libbeep.a $(BEEP_CMI_FILES) $(BEEP_CMO_FILES)
+#	$(OCAMLMKLIB) -o beep $(BEEP_CMO_FILES) -lbeep
+#
+#beep.cmxa beep.a : libbeep.a $(BEEP_CMI_FILES) $(BEEP_CMX_FILES) \
+#  $(BEEP_O_FILES)
+#	$(OCAMLMKLIB) -o beep $(BEEP_CMX_FILES) -lbeep
+#
+#install:: libbeep.a beep.cma beep.cmxa beep.a
+#	{ test ! -f beep.cmxa || extra="beep.cmxa beep.a"; }; \
+#	ocamlfind install beep \
+#	  $(BEEP_P_H_FILES) $(BEEP_MLI_FILES) $(BEEP_CMI_FILES) \
+#	  beep.cma libbeep.a META $$extra
+
+beep.cma : $(BEEP_CMI_FILES) $(BEEP_CMO_FILES)
+	$(OCAMLC) -a -o $@ $(CMA_OPT) $(BEEP_CMO_FILES)
+
+beep.cmxa beep.a : $(BEEP_CMI_FILES) $(BEEP_CMX_FILES)
+	$(OCAMLOPT) -a -o $@ $(CMXA_OPT) $(BEEP_CMX_FILES)
+
+install:: beep.cma beep.cmxa beep.a
+	{ test ! -f beep.cmxa || extra="beep.cmxa beep.a"; }; \
+	ocamlfind install beep \
+	  $(BEEP_P_H_FILES) $(BEEP_MLI_FILES) $(BEEP_CMI_FILES) \
+          beep.cma META $$extra
+
+uninstall::
+	ocamlfind remove beep
+
+###############################################################################
+
+TEST_MODULES = beep
+
+TEST_PROGRAMS = $(TEST_MODULES:%=t.%)
+TEST_OPT_PROGRAMS = $(TEST_MODULES:%=t-opt.%)
+
+TEST_ML_FILES = $(TEST_MODULES:%=t/t_%.ml)
+
+TEST_LINKOPT = -cclib -L. -linkpkg
+TEST_LIBS = beep
+
+default:: $(TEST_PROGRAMS)
+
+opt:: $(TEST_OPT_PROGRAMS)
+
+t.% : t/t_%.ml beep.cma
+	$(OCAMLC) $(DEBUG_OPT) $(TEST_LINKOPT) -o $@ $(TEST_LIBS:%=%.cma) $<
+
+t-opt.% : t/t_%.ml beep.cmxa
+	$(OCAMLOPT) $(TEST_LINKOPT) -o $@ $(TEST_LIBS:%=%.cmxa) $<
+
+test:: $(TEST_PROGRAMS)
+	@for i in $(TEST_PROGRAMS); do echo; echo $$i; ./$$i; done
+
+test.opt:: $(TEST_OPT_PROGRAMS)
+	@for i in $(TEST_OPT_PROGRAMS); do echo; echo $$i; ./$$i; done
+
+clean::
+	rm -f t/*.cmi t/*.cmo
+	rm -f t/*.cmx t/*.o
+	rm -f t.* t-opt.*
+
+###############################################################################
+
+default:: ocamltop
+
+ocamltop: beep.cma
+	$(OCAMLMKTOP) $(TEST_LINKOPT) -o $@ beep.cma
+
+clean::
+	rm -f ocamltop
+
+###############################################################################
+
+DOC_SOURCES = $(BEEP_MLI_FILES) $(BEEP_ML_FILES)
+
+DOC_INCLUDE_CF = `ocamlfind query cf`
+DOC_INCLUDE_IOM = `ocamlfind query iom`
+DOC_INCLUDE_MIME = `ocamlfind query mime`
+DOC_INCLUDE_XML = `ocamlfind query xml`
+
+doc::
+	@mkdir -p doc
+	ocamldoc.opt -v -d doc -html -colorize-code -m A \
+	  -I $(DOC_INCLUDE_CF) -I $(DOC_INCLUDE_IOM) \
+	  -I $(DOC_INCLUDE_MIME) -I $(DOC_INCLUDE_XML) $(DOC_SOURCES)
+
+###############################################################################
+
+DEPEND_FILE=.depend
+
+$(DEPEND_FILE) ::
+	#$(OCAMLC) -c -ccopt -MM $(BEEP_P_C_FILES) > .depend
+	$(OCAMLDEP) $(BEEP_MLI_FILES) $(BEEP_ML_FILES) $(BEEP_ML_FILES) > .depend
+
+depend:: $(DEPEND_FILE)
+
+include $(DEPEND_FILE)
+
+# End of file [ Makefile ]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.