You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.6 KiB

################################################################################
#
# Copyright (c) Hisilicon Technologies Co., Ltd. All rights reserved.
#
# This program is confidential and proprietary to Copyright (c) Hisilicon Technologies Co., Ltd.
# (Huanglong), and may not be copied, reproduced, modified, disclosed to
# others, published or used, in whole or in part, without the express prior
# written permission of Huanglong.
#
# Create By Huanglong 2021.07.01
#
################################################################################
CFLAGS := -I../include -fpic
SRCS := fscanf_s.c memmove_s.c secureinput_a.c snprintf_s.c strcpy_s.c swprintf_s.c vscanf_s.c vswprintf_s.c wcscpy_s.c wmemcpy_s.c \
fwscanf_s.c memset_s.c secureinput_w.c sprintf_s.c strncat_s.c swscanf_s.c vsnprintf_s.c vswscanf_s.c wcsncat_s.c wmemmove_s.c \
gets_s.c scanf_s.c secureprintoutput_a.c sscanf_s.c strncpy_s.c vfscanf_s.c vsprintf_s.c vwscanf_s.c wcsncpy_s.c wscanf_s.c \
memcpy_s.c securecutil.c secureprintoutput_w.c strcat_s.c strtok_s.c vfwscanf_s.c vsscanf_s.c wcscat_s.c wcstok_s.c
OBJECTS=$(patsubst %.c,%.o,$(SRCS))
.PHONY:clean lib
AR ?=ar
RANLIB ?=ranlib
lib: $(OBJECTS)
$(AR) crv libsecurec.a $(patsubst %.o,../obj/%.o,$(OBJECTS))
$(RANLIB) libsecurec.a
-mkdir -p ../lib
-cp libsecurec.a ../lib
@echo "finish libsecurec.a"
#you may add you custom commands here
.c.o:
@mkdir -p ../obj
$(CC) -c $< $(CFLAGS) -o ../obj/$(patsubst %.c,%.o,$<)
clean:
echo "cleaning ...."
-rm -rf *.a ../obj ../lib $(PROJECT)
echo "clean up"