mirror of
https://github.com/intel/linux-sgx
synced 2026-06-08 14:49:32 +00:00
79d06a4e58
Added security-focused compiler and linker flags --------- Signed-off-by: Anna Platasz <anna.platasz@intel.com>
24 lines
548 B
Makefile
24 lines
548 B
Makefile
#
|
|
# Copyright(c) 2011-2026 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
|
|
include ../../../buildenv.mk
|
|
|
|
.PHONY: all
|
|
all: build | $(BUILD_DIR)
|
|
@$(CP) $(CUR_DIR)/_build/Edger8r.native $(BUILD_DIR)/sgx_edger8r
|
|
|
|
.PHONY: build
|
|
build:
|
|
ocamlbuild -cflags -ccopt,-fpie,-ccopt,-fcf-protection -lflags -runtime-variant,_pic,-ccopt,-pie,-ccopt -lflag "-Wl,-z,relro,-z,now,-z,noexecstack" -no-links -libs str,unix Edger8r.native
|
|
|
|
$(BUILD_DIR):
|
|
@$(MKDIR) $@
|
|
|
|
.PHONY:
|
|
clean:
|
|
@ocamlbuild Edger8r.native -clean
|
|
@$(RM) $(BUILD_DIR)/sgx_edger8r
|