Skip to content

Commit

Permalink
Merge pull request #29 from deker104/fix/build-files
Browse files Browse the repository at this point in the history
Update build files to install standard library
  • Loading branch information
dboulytchev authored Nov 12, 2024
2 parents 5da0273 + 91b18d0 commit bf74ca7
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 9 deletions.
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ build:
install: all
dune b @install --profile=release
dune install --profile=release
$(MKDIR) -p `opam var share`/Lama/x64
$(INSTALL) $(shell ls _build/default/stdlib/x64/*.[oi] _build/default/stdlib/x64/stdlib/*.lama \
runtime/runtime.a runtime/Std.i) \
`opam var share`/Lama/x64
$(MKDIR) -p `opam var share`/Lama/x32
$(INSTALL) $(shell ls _build/default/stdlib/x32/*.[oi] _build/default/stdlib/x32/stdlib/*.lama \
runtime32/runtime.a runtime32/Std.i) \
`opam var share`/Lama/x32

_build/default/Lama.install:
dune b @install
Expand Down
4 changes: 3 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(lang dune 3.3)
(lang dune 3.11)

(name Lama)

(cram enable)

Expand Down
6 changes: 6 additions & 0 deletions runtime/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
(deps Makefile gc.c gc.h runtime_common.h runtime.c runtime.h printf.S)
(action
(run make)))

(install
(section share)
(files
(runtime.a as x64/runtime.a)
(Std.i as x64/Std.i)))
6 changes: 6 additions & 0 deletions runtime32/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
(deps Makefile gc_runtime.s runtime.c runtime.h)
(action
(run make -j2)))

(install
(section share)
(files
(runtime.a as x32/runtime.a)
(Std.i as x32/Std.i)))
5 changes: 5 additions & 0 deletions stdlib/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(install
(section share)
(files
(glob_files (*.lama with_prefix x64))
(glob_files (*.lama with_prefix x32))))
5 changes: 5 additions & 0 deletions stdlib/x32/dune
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@
LAMAC
"../../src/Driver.exe -32 -I ../../runtime32"
(run make -j2 -f ../Makefile all)))))))
(install
(section share)
(files
(glob_files (*.i with_prefix x32))
(glob_files (*.o with_prefix x32))))
6 changes: 6 additions & 0 deletions stdlib/x64/dune
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@
LAMAC
"../../src/Driver.exe -64 -I ../../runtime"
(run make -j2 -f ../Makefile all)))))))

(install
(section share)
(files
(glob_files (*.i with_prefix x64))
(glob_files (*.o with_prefix x64))))

0 comments on commit bf74ca7

Please sign in to comment.