Home | History | Annotate | Download | only in ipp
      1 #!/usr/bin/make -f
      2 
      3 API_INCLUDE_DIR = ./include
      4 SRC_INCLUDE_DIR = ./sources/include
      5 LIB_INSTALL_DIR = $(epidinstalldir)/lib/posix-$(ARCH)/
      6 
      7 PCP_INCLUDE_DIR = ./sources/ippcp
      8 PCP_SRC = $(wildcard ./sources/ippcp/*.c)
      9 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcparcfour*.c), $(PCP_SRC))
     10 PCP_SRC := $(filter-out ./sources/ippcp/pcpmain.c, $(PCP_SRC))
     11 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/*sm2.c), $(PCP_SRC))
     12 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcpsha1ca.c), $(PCP_SRC))
     13 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcpaes*.c), $(PCP_SRC))
     14 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcpdes*.c), $(PCP_SRC))
     15 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcpdlp*.c), $(PCP_SRC))
     16 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcphmac*.c), $(PCP_SRC))
     17 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcpmd5*.c), $(PCP_SRC))
     18 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcpng*.c), $(PCP_SRC))
     19 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcpprime*.c), $(PCP_SRC))
     20 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcprij*.c), $(PCP_SRC))
     21 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcprsa*.c), $(PCP_SRC))
     22 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcpsm3*.c), $(PCP_SRC))
     23 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcpsms4*.c), $(PCP_SRC))
     24 PCP_SRC := $(filter-out $(wildcard ./sources/ippcp/pcptdes*.c), $(PCP_SRC))
     25 PCP_SRC := $(filter-out ./sources/ippcp/pcpmont_expbinbnu_sscm.c, $(PCP_SRC))
     26 PCP_SRC := $(filter-out ./sources/ippcp/pcpmont_expwinbnu.c, $(PCP_SRC))
     27 PCP_SRC := $(filter-out ./sources/ippcp/pcpmont_expwinbnu_sscm.c, $(PCP_SRC))
     28 
     29 PCP_OBJ = $(PCP_SRC:.c=.o)
     30 PCP_LIB = ./sources/ippcp/libippcp.a
     31 
     32 ifeq ($(ARCH), x86)
     33 	CFLAGS += -D_ARCH_IA32
     34 else
     35 	CFLAGS += -D_ARCH_EM64T
     36 endif
     37 CFLAGS += -D_IPP_DEBUG
     38 CFLAGS += -D_IPP_DEBUG
     39 CFLAGS += -D_IPP_C99
     40 CFLAGS += -D_IPP_v50_
     41 CFLAGS += -D_PX
     42 CFLAGS += -D_ABL_
     43 CFLAGS += -D_DISABLE_ECP_SM2_
     44 CFLAGS += -D_DISABLE_ALG_SHA224_
     45 CFLAGS += -D_DISABLE_ALG_SHA512_224_
     46 CFLAGS += -D_DISABLE_ALG_MD5_
     47 CFLAGS += -D_DISABLE_ALG_SM3_
     48 
     49 $(PCP_OBJ): %.o: %.c
     50 	$(CC) $(CFLAGS) $(IPP_FLAGS) -I$(API_INCLUDE_DIR) -I$(SRC_INCLUDE_DIR) -I$(PCP_INCLUDE_DIR) -c -o $@ $<
     51 
     52 $(PCP_LIB): $(PCP_OBJ)
     53 	$(AR) rc $@ $^
     54 	$(RANLIB) $@
     55 
     56 build: all
     57 
     58 all: $(PCP_LIB)
     59 
     60 install:
     61 	mkdir -p '$(LIB_INSTALL_DIR)'
     62 	cp $(PCP_LIB) '$(LIB_INSTALL_DIR)'
     63 
     64 clean:
     65 	rm -f $(PCP_OBJ) $(PCP_LIB)
     66