power: fix frequency list buffer validation
[dpdk.git] / examples / fips_validation / Makefile
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
3
4 # binary name
5 APP = fips_validation
6
7 # all source are stored in SRCS-y
8 SRCS-y := fips_validation.c
9 SRCS-y += fips_validation_aes.c
10 SRCS-y += fips_validation_hmac.c
11 SRCS-y += fips_validation_tdes.c
12 SRCS-y += fips_validation_gcm.c
13 SRCS-y += fips_validation_cmac.c
14 SRCS-y += fips_validation_ccm.c
15 SRCS-y += fips_validation_sha.c
16 SRCS-y += fips_dev_self_test.c
17 SRCS-y += main.c
18
19 # Build using pkg-config variables if possible
20 $(shell pkg-config --exists libdpdk)
21 ifeq ($(.SHELLSTATUS),0)
22
23 all: shared
24 .PHONY: shared static
25 shared: build/$(APP)-shared
26         ln -sf $(APP)-shared build/$(APP)
27 static: build/$(APP)-static
28         ln -sf $(APP)-static build/$(APP)
29
30 PC_FILE := $(shell pkg-config --path libdpdk)
31 CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
32 LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
33 LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
34
35 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
36         $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
37
38 build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
39         $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
40
41 build:
42         @mkdir -p $@
43
44 .PHONY: clean
45 clean:
46         rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
47         rmdir --ignore-fail-on-non-empty build
48
49 else
50
51 ifeq ($(RTE_SDK),)
52 $(error "Please define RTE_SDK environment variable")
53 endif
54
55 # Default target, can be overridden by command line or environment
56 RTE_TARGET ?= x86_64-native-linux-gcc
57
58 INC += $(sort $(wildcard *.h))
59
60 include $(RTE_SDK)/mk/rte.vars.mk
61
62 CFLAGS += $(WERROR_FLAGS)
63
64 # workaround for a gcc bug with noreturn attribute
65 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
66 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
67 CFLAGS_main.o += -Wno-return-type
68 endif
69
70 CFLAGS += -DALLOW_EXPERIMENTAL_API
71 CFLAGS += -I$(SRCDIR)
72 CFLAGS += -O3
73 CFLAGS += $(WERROR_FLAGS)
74
75 include $(RTE_SDK)/mk/rte.extapp.mk
76
77 endif