Permalink
Browse files

make file without ocamlbuildfor opam

  • Loading branch information...
1 parent 715d216 commit e00e5333e0b10cf00dd7c7e6f433dfc882b693a8 @MarwanG MarwanG committed Jul 10, 2013
Showing with 28 additions and 11 deletions.
  1. +28 −11 src/Makefile
View
39 src/Makefile
@@ -1,18 +1,35 @@
-SRCS = $(wildcard *.ml *.mli *.mll *.mly)
+# where to install the binaries
+prefix=/usr/local
+exec_prefix=${prefix}
+BINDIR=${exec_prefix}/bin
+
+# where to install the man page
+MANDIR=${prefix}/share/man
+
+# other variables set by ./configure
+OCAMLC = ocamlc
+OCAMLOPT = ocamlopt
+OCAMLDEP = ocamldep
+OCAMLLEX = ocamllex
+OCAMLYACC= ocamlyacc
+OCAMLLIB = /usr/lib/ocaml
+OCAMLBEST= op
+
+SRCS = Options.ml Util.ml Grammar.ml CombSys.ml OracleSimple.ml Tree.ml Gen.ml GParser.ml ArboLib.ml Arbogen.ml
TARGS = arbogen
-KIND = native # d.byte
-FLAGS = -w,Ae,-warn-error,A
all: $(TARGS)
-arbogen: _build/Arbogen.$(KIND)
- cp $< $@
+arbogen: $(SRCS)
+ $(OCAMLOPT) -o arbogen $(SRCS)
-_build/%.$(KIND): $(SRCS)
- ocamlbuild -cflags $(FLAGS) -no-links $*.$(KIND)
-clean:
- @ocamlbuild -clean
- @rm -f *~ $(TARGS)
+install:: arbogen
+ mkdir -p $(BINDIR)
+ mv arbogen $(BINDIR)
+ mkdir -p $(MANDIR)/man1
+ cp -f doc/$(TARGS).1 /usr/local/man/man1/$(TARGS).1
-.PHONY: all clean
+clean:
+ rm arbogen
+ rm *.cmi *.cmx *.o

0 comments on commit e00e533

Please sign in to comment.