mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Fixing mac build: negating Darwin ~~> OKaying linux
Signed-off-by: Kakadu <Kakadu@pm.me>
This commit is contained in:
parent
8a8fc3432b
commit
cd033ddbe3
8 changed files with 9 additions and 57 deletions
|
|
@ -1,10 +0,0 @@
|
||||||
FLAGS=-g -fstack-protector-all
|
|
||||||
|
|
||||||
all: byterun.o
|
|
||||||
$(CC) $(FLAGS) -o byterun byterun.o ../runtime/runtime.a
|
|
||||||
|
|
||||||
byterun.o: byterun.c
|
|
||||||
$(CC) $(FLAGS) -g -c byterun.c
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) *.a *.o *~ byterun
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
TESTS=$(sort $(basename $(wildcard *.lama)))
|
|
||||||
|
|
||||||
LAMAC=../src/lamac
|
|
||||||
|
|
||||||
.PHONY: check $(TESTS)
|
|
||||||
|
|
||||||
check: $(TESTS)
|
|
||||||
|
|
||||||
$(TESTS): %: %.lama
|
|
||||||
@echo $@
|
|
||||||
LAMA=../runtime $(LAMAC) $< && `which time` -f "$@\t%U" ./$@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) test*.log *.s *~ $(TESTS) *.i
|
|
||||||
|
|
@ -28,3 +28,4 @@ printf.o: printf.S
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) *.a *.o *~ negative_scenarios/*.err
|
$(RM) *.a *.o *~ negative_scenarios/*.err
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
(rule
|
(rule
|
||||||
(target runtime.a)
|
(target runtime.a)
|
||||||
(enabled_if
|
(enabled_if
|
||||||
(<> %{ocaml-config:os_type} "Darwin"))
|
(= %{system} "linux"))
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
(deps Makefile gc_runtime.s runtime.c runtime.h)
|
(deps Makefile gc_runtime.s runtime.c runtime.h)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
(rule
|
(rule
|
||||||
(enabled_if
|
(enabled_if
|
||||||
(<> %{ocaml-config:os_type} "Darwin"))
|
(= %{system} "linux"))
|
||||||
(deps
|
(deps
|
||||||
../Makefile
|
../Makefile
|
||||||
../../runtime32/Std.i
|
../../runtime32/Std.i
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
.PHONY: clean
|
|
||||||
|
|
||||||
GTD = tool.exe
|
|
||||||
|
|
||||||
LAMA_CMXES = ../src/Language.cmx
|
|
||||||
OCAMLC = ocamlfind c
|
|
||||||
OCAMLOPT = ocamlfind opt
|
|
||||||
BFLAGS += -package GT,ostap,re,str -I ../src -rectypes -g
|
|
||||||
|
|
||||||
all: $(GTD) $(OUT2)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(GTD): tool.cmx
|
|
||||||
$(OCAMLOPT) $(BFLAGS) $(LAMA_CMXES) -linkpkg $^ -o $@
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) *.cmi *.cmo *.cmx *.annot *.o *.opt *.byte *~ .depend $(OUT) $(GENERATED)
|
|
||||||
|
|
||||||
%.cmi: %.ml
|
|
||||||
$(OCAMLC) -c $(BFLAGS) $<
|
|
||||||
|
|
||||||
%.cmx: %.ml
|
|
||||||
$(OCAMLOPT) -c $(BFLAGS) $<
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Expressions.x32.exe)
|
(targets Expressions.x32.exe)
|
||||||
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
(enabled_if (= %{ocaml-config:os_type} "linux"))
|
||||||
(deps (:lama Expressions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama Expressions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Functions.x32.exe)
|
(targets Functions.x32.exe)
|
||||||
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
(enabled_if (= %{ocaml-config:os_type} "linux"))
|
||||||
(deps (:lama Functions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama Functions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Hello.x32.exe)
|
(targets Hello.x32.exe)
|
||||||
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
(enabled_if (= %{ocaml-config:os_type} "linux"))
|
||||||
(deps (:lama Hello.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama Hello.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -127,7 +127,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets PatternMatching.x32.exe)
|
(targets PatternMatching.x32.exe)
|
||||||
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
(enabled_if (= %{ocaml-config:os_type} "linux"))
|
||||||
(deps (:lama PatternMatching.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama PatternMatching.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
@ -169,7 +169,7 @@
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
(targets Values.x32.exe)
|
(targets Values.x32.exe)
|
||||||
(enabled_if (<> %{ocaml-config:os_type} "Darwin"))
|
(enabled_if (= %{ocaml-config:os_type} "linux"))
|
||||||
(deps (:lama Values.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
(deps (:lama Values.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i)
|
||||||
(mode
|
(mode
|
||||||
(promote (until-clean)))
|
(promote (until-clean)))
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ let () =
|
||||||
template
|
template
|
||||||
|> Str.global_replace (Str.regexp "%DEMO%") (demo^".x32")
|
|> Str.global_replace (Str.regexp "%DEMO%") (demo^".x32")
|
||||||
|> Str.global_replace (Str.regexp "%DEMOSRC%") demo
|
|> Str.global_replace (Str.regexp "%DEMOSRC%") demo
|
||||||
|> Str.global_replace (Str.regexp "%COND%") {|(enabled_if (<> %{ocaml-config:os_type} "Darwin"))|}
|
|> Str.global_replace (Str.regexp "%COND%") {|(enabled_if (= %{ocaml-config:os_type} "linux"))|}
|
||||||
|> Str.global_replace (Str.regexp "%RUNTIME%") "../runtime32"
|
|> Str.global_replace (Str.regexp "%RUNTIME%") "../runtime32"
|
||||||
|> Str.global_replace (Str.regexp "%STDLIB%") "../stdlib/x32"
|
|> Str.global_replace (Str.regexp "%STDLIB%") "../stdlib/x32"
|
||||||
|> Str.global_replace (Str.regexp "%EXTRASWITCHES%") "-march=x86"
|
|> Str.global_replace (Str.regexp "%EXTRASWITCHES%") "-march=x86"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue