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