root/openpgpsdk/trunk/tests/Makefile.template

Revision 473 (checked in by rachel, 6 years ago)

Implemented write of Symmetric-Key Encrypted Session Key Packet
Implemented write of Literal Data packet
These packet types are needed for encryption.

Line 
1 DM_FLAGS=%DM_FLAGS%
2 DM_LIB=%DM_LIB%
3 CC=%CC%
4
5 CUNIT_LIB=../lib/libcunit.a
6 CUNIT_INC=../include/CUnit
7
8
9 CFLAGS=-Wall -Werror -g $(DM_FLAGS) -I../include %INCLUDES% %CFLAGS%
10 LDFLAGS=-g %CFLAGS%
11 LIBDEPS=../src/standard/libops_std.a ../src/advanced/libops_adv.a
12 LIBS=$(LIBDEPS) %CRYPTO_LIBS% %ZLIB% $(DM_LIB) $(CUNIT_LIB)
13
14 TESTSRC=tests.c \
15                 test_packet_types.c \
16                 test_crypt_mpi.c test_rsa_decrypt.c test_rsa_encrypt.c
17 TESTOBJ=$(TESTSRC:.c=.o)
18
19 all: Makefile $(CUNIT_LIB) .depend tests
20
21 tests: $(CUNIT_LIB) $(TESTOBJ) $(LIBDEPS)
22         $(CC) $(LDFLAGS) -o tests $(TESTOBJ) $(LIBS)
23         make runtests
24
25 runtests:
26         ./tests
27
28 $(CUNIT_LIB):
29         tar xvfz CUnit-2.1-0-src.tar.gz
30         (cd CUnit-2.1-0 && ./configure --prefix $(PWD)/../ && make && make install)
31
32 clean:
33         rm -f $(EXES) *.o *.i
34         rm -rf testdir.*
35         rm -f TAGS
36
37 .depend: *.[ch] ../include/openpgpsdk/*.h $(CUNIT_INC)
38
39         $(CC) $(CFLAGS) -E -M *.c > .depend
40
41 force_depend:
42         $(CC) $(CFLAGS) -E -M *.c > .depend
43
44 Makefile: Makefile.template ../configure
45         echo Makefile is older than templates, rerun configure
46         exit 1
47
Note: See TracBrowser for help on using the browser.