xref: /freebsd/crypto/libecc/src/examples/sig/Makefile (revision f0865ec9906d5a18fa2a3b61381f22ce16e606ad)
1ROOT_DIR=../../../
2BUILD_DIR=$(ROOT_DIR)/build
3include $(ROOT_DIR)/common.mk
4
5RSA_DIR=rsa/
6DSA_DIR=dsa/
7SDSA_DIR=sdsa/
8KCDSA_DIR=kcdsa/
9GOST_DIR=gostr34_10_94/
10
11CFLAGS += -I$(ROOT_DIR)/include/
12
13all:	_rsa _dsa _sdsa _kcdsa _gost
14ifeq ($(WITH_DYNAMIC_LIBS),1)
15# If the user asked for dynamic libraries, compile versions of our binaries against them
16all:	_rsa_dyn _dsa_dyn _sdsa_dyn _kcdsa_dyn _gost_dyn
17endif
18
19_rsa:
20	$(VERBOSE_MAKE)cd $(RSA_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
21_dsa:
22	$(VERBOSE_MAKE)cd $(DSA_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
23_sdsa:
24	$(VERBOSE_MAKE)cd $(SDSA_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
25_kcdsa:
26	$(VERBOSE_MAKE)cd $(KCDSA_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
27_gost:
28	$(VERBOSE_MAKE)cd $(GOST_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
29
30# If the user asked for dynamic libraries, compile versions of our binaries against them
31ifeq ($(WITH_DYNAMIC_LIBS),1)
32_rsa_dyn:
33	$(VERBOSE_MAKE)cd $(RSA_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
34_dsa_dyn:
35	$(VERBOSE_MAKE)cd $(DSA_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
36_sdsa_dyn:
37	$(VERBOSE_MAKE)cd $(SDSA_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
38_kcdsa_dyn:
39	$(VERBOSE_MAKE)cd $(KCDSA_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
40_gost_dyn:
41	$(VERBOSE_MAKE)cd $(GOST_DIR) && EXTRA_CFLAGS="$(CFLAGS)" make
42endif
43
44
45clean:
46	$(VERBOSE_MAKE)cd $(RSA_DIR) && make clean
47	$(VERBOSE_MAKE)cd $(DSA_DIR) && make clean
48	$(VERBOSE_MAKE)cd $(SDSA_DIR) && make clean
49	$(VERBOSE_MAKE)cd $(KCDSA_DIR) && make clean
50	$(VERBOSE_MAKE)cd $(GOST_DIR) && make clean
51
52.PHONY: all clean 16 32 64 debug debug16 debug32 debug64 force_arch32 force_arch64
53