Permalink
Browse files

moved the source of the compiler to a directory

  • Loading branch information...
1 parent 485e9f9 commit ed3028f21b2f021d8f412a8b4b0eaa587f6bbf23 @pikatchu committed Feb 23, 2011
@@ -1,7 +1,6 @@
OCAMLBIN =
OCAMLLIB ?= /usr/lib/ocaml/llvm-2.8
-STDLIB_PATH = /home/pika/LinearML/stdlib/
OCAMLC = ocamlc -dtypes -warn-error A
OCAMLOPT = ocamlopt
@@ -23,11 +22,10 @@ LIBS = unix.cma $(LLVM_LIBS)
LIBSOPT = $(LIBS:.cma=.cmxa)
INCLUDE = -I $(OCAMLLIB)
CLIBS = $(addprefix $(OCAMLLIB)/, $(LLVM_LIBS:.cma=.a))
-LIML_STDLIB = -ccopt -Lstdlib -ccopt -lliml
-default: liml
+default: limlc
-.PHONY: liml
+.PHONY: limlc
OBJECTS_ML = \
genGlobals.ml\
@@ -85,14 +83,14 @@ OBJECTS_ML = \
OBJECTS_CMO = $(OBJECTS_ML:.ml=.cmo)
OBJECTS_CMX = $(OBJECTS_ML:.ml=.cmx)
-liml: $(OBJECTS_CMX) stdlib/libliml.so
+limlc: $(OBJECTS_CMX) ../stdlib/libliml.a
echo $(LIBS)
$(OCAMLOPT) -cc $(CC) $(INCLUDE) -linkall $(CLIBS) $(LIBSOPT) $(OBJECTS_CMX) \
- $(LIML_STDLIB) -o $@
+ -o $@
-liml.bc: $(OBJECTS_CMO) stdlib/libliml.so
+limlc.bc: $(OBJECTS_CMO) ../stdlib/libliml.a
$(OCAMLC) -g -cc $(CC) $(INCLUDE) $(LIBS) $(OBJECTS_CMO) \
- $(LIML_STDLIB) -o $@
+ -o $@
##############################################################################
@@ -116,20 +114,20 @@ liml.bc: $(OBJECTS_CMO) stdlib/libliml.so
genGlobals.ml:
echo "let root = \"$(STDLIB_PATH)\"" > genGlobals.ml
-stdlib/libliml.so:
+../stdlib/libliml.a:
@echo "Compiling the standard library"
- cd stdlib && make
+ cd ../stdlib && make
.depend: $(OBJECTS_ML)
$(OCAMLDEP) -native -slash $(INCLUDE) $(OBJECTS_ML) > .depend
clean:
rm -f *.cm* pkl *~ lexer.ml parser.ml parser.mli lexer.mli *.o* \#*
rm -f limlc limlc.bc liml liml.bc *.annot .depend
- rm -f stdlib/*.o stdlib/*.s stdlib/*.bc stdlib/*~ test/*.o test/*.s
+ rm -f test/*.o test/*.s
rm -f test/*.bc test/*~
rm -f genGlobals.ml
- cd stdlib && make clean
+ cd ../stdlib && make clean
-include .depend
-include Makefile.config
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,31 @@
+(*
+Copyright (c) 2011, Julien Verlaguet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+2. 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.
+
+3. Neither the name of Julien Verlaguet nor the names of
+contributors may be used to endorse or promote products derived
+from this software without specific prior written permission.
+
+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
+OWNER 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.
+*)

0 comments on commit ed3028f

Please sign in to comment.