|
Revision 485
(checked in by rachel, 6 years ago)
|
RSA encryption produces packets which can be decrypted by GPG.
MDC error still to fix.
Some refactoring to re-use common code in tests.
|
| 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 |
test_crypto.c |
|---|
| 18 |
|
|---|
| 19 |
TESTOBJ=$(TESTSRC:.c=.o) |
|---|
| 20 |
|
|---|
| 21 |
all: Makefile $(CUNIT_LIB) .depend tests |
|---|
| 22 |
|
|---|
| 23 |
tests: $(CUNIT_LIB) $(TESTOBJ) $(LIBDEPS) |
|---|
| 24 |
$(CC) $(LDFLAGS) -o tests $(TESTOBJ) $(LIBS) |
|---|
| 25 |
|
|---|
| 26 |
$(CUNIT_LIB): |
|---|
| 27 |
tar xvfz CUnit-2.1-0-src.tar.gz |
|---|
| 28 |
(cd CUnit-2.1-0 && ./configure --prefix $(PWD)/../ && make && make install) |
|---|
| 29 |
|
|---|
| 30 |
clean: |
|---|
| 31 |
rm -f $(EXES) *.o *.i |
|---|
| 32 |
rm -rf testdir.* |
|---|
| 33 |
rm -f TAGS |
|---|
| 34 |
|
|---|
| 35 |
.depend: *.[ch] ../include/openpgpsdk/*.h $(CUNIT_INC) |
|---|
| 36 |
|
|---|
| 37 |
$(CC) $(CFLAGS) -E -M *.c > .depend |
|---|
| 38 |
|
|---|
| 39 |
force_depend: |
|---|
| 40 |
$(CC) $(CFLAGS) -E -M *.c > .depend |
|---|
| 41 |
|
|---|
| 42 |
Makefile: Makefile.template ../configure |
|---|
| 43 |
echo Makefile is older than templates, rerun configure |
|---|
| 44 |
exit 1 |
|---|
| 45 |
|
|---|