123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- include ../../../buildenv.mk
- OCAML_VERSION_MAJOR=$(shell ocamlopt -version | head -n 1 | cut -d . -f 1)
- OCAML_VERSION_MINOR=$(shell ocamlopt -version | head -n 1 | cut -d . -f 2)
- OCAML_VERSION=$(OCAML_VERSION_MAJOR)$(OCAML_VERSION_MINOR)
- .PHONY: all
- all: build | $(BUILD_DIR)
- @$(CP) $(CUR_DIR)/_build/Edger8r.native $(BUILD_DIR)/sgx_edger8r
- .PHONY: build
- build:
- ifeq ($(shell test $(OCAML_VERSION) -lt 402 && echo 1), 1)
- ocamlbuild -lflag -ccopt -lflag "-Wl,-z,now" -no-links -libs str,unix Edger8r.native
- else
- ocamlbuild -cflags -ccopt,-fpie -lflags -runtime-variant,_pic,-ccopt,-pie,-ccopt -lflag "-Wl,-z,now" -no-links -libs str,unix Edger8r.native
- endif
- $(BUILD_DIR):
- @$(MKDIR) $@
- .PHONY:
- clean:
- @ocamlbuild Edger8r.native -clean
- @$(RM) $(BUILD_DIR)/sgx_edger8r
|