Debian Codegraph @

crt/s2n/tests/viz/Makefile

raw symbols SCIP
1 #
2 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License").
5 # You may not use this file except in compliance with the License.
6 # A copy of the License is located at
7 #
8 # http://aws.amazon.com/apache2.0
9 #
10 # or in the "license" file accompanying this file. This file is distributed
11 # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 # express or implied. See the License for the specific language governing
13 # permissions and limitations under the License.
14 #
15
16 .PHONY : all
17 all: build_viz
18
19 include ../../s2n.mk
20
21 LDFLAGS += ../../lib/libs2n.a -L$(LIBCRYPTO_ROOT)/lib ${CRYPTO_LIBS} ${LIBS}
22
23 UNAME_S := $(shell uname -s)
24 ifeq ($(UNAME_S),Linux)
25 CFLAGS := -Wl,--no-as-needed $(CFLAGS)
26 endif
27
28 # Run state machine graph generation
29 # with `make STATE_MACHINE_GRAPHS=1`.
30 # graphviz is required.
31
32 build_viz::
33 ${CC} ${CFLAGS} -o s2n_state_machine_viz s2n_state_machine_viz.c ${LDFLAGS}
34 @[ "${STATE_MACHINE_GRAPHS}" ] && \
35 DYLD_LIBRARY_PATH="$(LIBCRYPTO_ROOT)/lib:$$DYLD_LIBRARY_PATH" \
36 LD_LIBRARY_PATH="$(LIBCRYPTO_ROOT)/lib:$$LD_LIBRARY_PATH" \
37 ./s2n_state_machine_viz || true
38
39 .PHONY : clean
40 clean: decruft
41 rm -f s2n_state_machine_viz