xref: /openssl/demos/cms/Makefile (revision 86db9588)
1#
2# To run the demos when linked with a shared library (default) ensure that
3# libcrypto is on the library path. For example, to run the
4# cms_enc demo:
5#
6#    LD_LIBRARY_PATH=../.. ./cms_enc
7
8TESTS = cms_comp \
9        cms_ddec \
10        cms_dec \
11        cms_denc \
12        cms_enc \
13        cms_sign \
14        cms_sign2 \
15        cms_uncomp \
16        cms_ver
17
18CFLAGS  = -I../../include -g -Wall
19LDFLAGS = -L../..
20LDLIBS  = -lcrypto
21
22all: $(TESTS)
23
24cms_comp: cms_comp.o
25cms_ddec: cms_ddec.o
26cms_dec: cms_dec.o
27cms_denc: cms_denc.o
28cms_enc: cms_enc.o
29cms_sign: cms_sign.o
30cms_sign2: cms_sign2.o
31cms_uncomp: cms_uncomp.o
32cms_ver: cms_ver.o
33
34$(TESTS):
35	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
36
37clean:
38	$(RM) $(TESTS) *.o
39
40test: all
41	@echo "\nCMS tests:"
42	LD_LIBRARY_PATH=../.. ./cms_enc
43	LD_LIBRARY_PATH=../.. ./cms_dec
44	LD_LIBRARY_PATH=../.. ./cms_sign2
45	LD_LIBRARY_PATH=../.. ./cms_ver
46