Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 85 lines (60 sloc) 1.95 kb
749463a Colin Benner Changed the build system to be able to compile the compiler, the runtime...
authored
1 # Enable parallel build by default.
2 BUILDFLAGS=-j 5
3 LIBDIR=/home/joghurt/ocaml-bin/lib/ocaml
4 RANLIB=ranlib
5 OCAMLC=ocamlc
6 OCAMLOPT=ocamlllvm
7
fb380b9 Colin Benner Initial import based on https://github.com/bmeurer/ocamlnat
authored
8 # OASIS_START
9 # DO NOT EDIT (digest: bc1e05bfc8b39b664f29dae8dbd3ebbb)
10
11 SETUP = ocaml setup.ml
12
13 build: setup.data
14 $(SETUP) -build $(BUILDFLAGS)
15
16 doc: setup.data build
17 $(SETUP) -doc $(DOCFLAGS)
18
19 test: setup.data build
20 $(SETUP) -test $(TESTFLAGS)
21
22 all:
23 $(SETUP) -all $(ALLFLAGS)
24
25 install: setup.data
26 $(SETUP) -install $(INSTALLFLAGS)
27
28 uninstall: setup.data
29 $(SETUP) -uninstall $(UNINSTALLFLAGS)
30
31 reinstall: setup.data
32 $(SETUP) -reinstall $(REINSTALLFLAGS)
33
34 clean:
35 $(SETUP) -clean $(CLEANFLAGS)
36
37 distclean:
38 $(SETUP) -distclean $(DISTCLEANFLAGS)
39
40 setup.data:
41 $(SETUP) -configure $(CONFIGUREFLAGS)
42
43 .PHONY: build doc test all install uninstall reinstall clean distclean configure
44
45 # OASIS_STOP
749463a Colin Benner Changed the build system to be able to compile the compiler, the runtime...
authored
46
47 asmrun src/asmrun/libasmrun.a:
48 cd src/asmrun; make -j 5
49
50 asmrun-install: src/asmrun/libasmrun.a
51 cd src/asmrun; make install
52
53 asmrun-clean:
54 cd src/asmrun; make clean
55
56
57 .PHONY: stdlib install-stdlib stdlib-clean
58 stdlib: src/stdlib/_build/std_exit.o src/stdlib/_build/stdlib.a src/stdlib/_build/stdlib.cmxa
59 @touch /dev/null
60
61 src/stdlib/_build/std_exit.o src/stdlib/_build/stdlib.a src/stdlib/_build/stdlib.cmxa:
62 cd src/stdlib; ocamlbuild
63 cd src/stdlib; OCAMLLIB=$(LIBDIR) ocamlbuild $(BUILDFLAGS) -ocamlopt $(OCAMLOPT) stdlib.otarget
64
65
66 stdlib-install: src/stdlib/_build/std_exit.o src/stdlib/_build/stdlib.a src/stdlib/_build/stdlib.cmxa
67 cd src/stdlib/_build; cp std_exit.o stdlib.a stdlib.cmxa *.cmi $(LIBDIR)
68 cd $(LIBDIR); $(RANLIB) stdlib.a; \
69 ln -fs stdlib.cmxa stdlib.p.cmxa; \
70 ln -fs stdlib.a stdlib.p.a; \
71 ln -fs std_exit.cmx std_exit.p.cmx; \
72 ln -fs std_exit.o std_exit.p.o
73
74 stdlib-clean:
75 cd src/stdlib; ocamlbuild -clean
76
77 compile-and-install-everything:
78 make
79 sudo make install
80 make asmrun
81 make asmrun-install
82 make stdlib-clean
83 make stdlib
84 make stdlib-install
Something went wrong with that request. Please try again.