Skip to content

Commit

Permalink
Allow passing CAMLEXTRAFLAGS for standalone build
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGross committed Nov 12, 2023
1 parent 47379ed commit 0b20a0d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile.standalone
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ else
CAMLOPT_PERF ?= $(OCAMLOPTP)
CAMLOPT_PERF_SHOW:=OCAMLOPTP
endif
CAMLEXTRAFLAGS ?=
STANDALONE_CAMLFLAGS ?= -package unix -w -20 -g $(CAMLEXTRAFLAGS)

ENSURE_STACK_LIMIT := . etc/ensure_stack_limit.sh || true

Expand All @@ -33,12 +35,12 @@ ENSURE_STACK_LIMIT := . etc/ensure_stack_limit.sh || true
$(STANDALONE_OCAML:%=src/ExtractionOCaml/%.cmi) : %.cmi : %.ml
$(SHOW)'$(CAMLOPT_PERF_SHOW) $*.mli'
$(HIDE)$(ENSURE_STACK_LIMIT); \
$(TIMER) $(CAMLOPT_PERF) -package unix -w -20 -g $*.mli
$(TIMER) $(CAMLOPT_PERF) $(STANDALONE_CAMLFLAGS) $*.mli

$(STANDALONE_OCAML:%=src/ExtractionOCaml/%) : % : %.ml %.cmi
$(SHOW)'$(CAMLOPT_PERF_SHOW) $< -o $@'
$(HIDE)$(ENSURE_STACK_LIMIT); \
$(TIMER) $(CAMLOPT_PERF) -package unix -linkpkg -w -20 -g -I src/ExtractionOCaml/ -o $@ $<
$(TIMER) $(CAMLOPT_PERF) $(STANDALONE_CAMLFLAGS) -linkpkg -I src/ExtractionOCaml/ -o $@ $<

$(STANDALONE_HASKELL:%=src/ExtractionHaskell/%) : % : %.hs
$(SHOW)'GHC $< -o $@'
Expand Down

0 comments on commit 0b20a0d

Please sign in to comment.