Files
aplatasz 79d06a4e58 Added missing compiler and linker security flags
Added security-focused compiler and linker flags

---------

Signed-off-by: Anna Platasz <anna.platasz@intel.com>
2026-03-06 12:41:47 +01:00

30 lines
520 B
Makefile

#
# Copyright(c) 2011-2026 Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
#
include ../../buildenv.mk
CFLAGS += $(ENCLAVE_CFLAGS) -Werror=format-security
CPPFLAGS += $(ADDED_INC) -Werror=format-security \
-I$(COMMON_DIR)/inc/tlibc/
SRCS := $(wildcard *.c)
OBJS := $(sort $(SRCS:.c=.o))
TARGET := libcompiler-rt.a
.PHONY: all
all: $(TARGET)
$(TARGET): $(OBJS)
$(AR) rcsD $@ $^
$(OBJS): %.o: %.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
.PHONY: clean
clean:
@$(RM) $(OBJS) $(TARGET)