#===============================================================================
# export variable
#===============================================================================
BUILD_DIR := $(SDK_DIR)/build
include $(BUILD_DIR)/base.mak
#======================================================================
# local variable
#======================================================================
CFLAGS  +=  $(CFG_SOCT_CFLAGS) \
            -I$(PLATFORM_DIR)/secure/include

#if you need a debug version library, use "-g" instead of "-s -DNDEBUG -O2".
# If you compiler report a warning on "break strict-aliasing rules", there is no problem. If you need to clear all warnings, you can add "-fno-strict-aliasing" option to your compiler, but this will impact the performance a little.

SRCS=$(wildcard *.c)

LIB_NAME=libuapi_securec

include $(BUILD_DIR)/soc_rules.mak

PKGNAME := securec
DEBHOME := $(SOCT_OUT_DIR)/deb
PKGHOME := $(DEBHOME)/$(PKGNAME)
#===============================================================================
# rules
#===============================================================================
.PHONY: deb_pkg deb_clean

deb_pkg:
	mkdir -p $(PKGHOME)/DEBIAN
	mkdir -p $(PKGHOME)/usr/lib/
	cp $(CURDIR)/control  $(PKGHOME)/DEBIAN/
	cp $(SOCT_SHARED_LIB64_DIR)/libuapi_securec.so $(PKGHOME)/usr/lib/
	rm -f $(DEBHOME)/$(PKGNAME).deb
	dpkg -b $(PKGHOME) $(DEBHOME)/$(PKGNAME).deb

deb_clean:
	rm -rf $(PKGHOME)
	rm -f $(DEBHOME)/$(PKGNAME).deb
