Changeset 600

Show
Ignore:
Timestamp:
08/26/08 15:41:00
Author:
rachel
Message:

Take CUnit build out of the openpgpsdk make process.
Other makefile changes to get this working on SunOS.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openpgpsdk/trunk/Makefile

    r593 r600  
    1212default: 
    1313        set -e; for d in $(SUBDIRS); do \ 
    14         $(MAKE) -w -C $$d || exit 1;
     14        cd $$d; $(MAKE) -w || exit 1; cd ..;
    1515        done 
    1616 
     
    3030        rm -rf oink-links 
    3131        -rm lib/* 
    32         # reinstall the CUnit libs 
    33         (cd CUnit-2.1-0; make install) 
    3432 
    3533Makefiles: 
     
    4846        cd doc && $(MAKE) 
    4947 
    50 cunit: 
    51       if [ ! -d CUnit-2.1-0 ]; then \ 
    52               gunzip CUnit-2.1-0-src.tar.gz; \ 
    53               tar xvf CUnit-2.1-0-src.tar; \ 
    54               (cd CUnit-2.1-0 && ./configure --prefix $(PWD) && make && make install); \ 
    55       fi 
     48#cunit: 
     49#     if [ ! -d CUnit-2.1-0 ]; then \ 
     50#             gunzip CUnit-2.1-0-src.tar.gz; \ 
     51#             tar xvf CUnit-2.1-0-src.tar; \ 
     52#             (cd CUnit-2.1-0 && ./configure --prefix $(PWD) && make && make install); \ 
     53#     fi 
    5654 
    5755 
  • openpgpsdk/trunk/configure

    r595 r600  
    4848              $Subst{INCLUDES}.=" -I $loc"; 
    4949              $Subst{ZLIB}="$loc/libz.a"; 
     50          }, 
     51          '--with-cunit=' => sub { 
     52              my $loc=shift; 
     53              $Subst{INCLUDES}.=" -I $loc/include"; 
     54              $Subst{CUNITLIB}="$loc/lib/libcunit.a"; 
     55          }, 
     56          '--with-otherlibs=' => sub { 
     57              my $loc=shift; 
     58              $Subst{OTHERLIBS}="$loc"; 
    5059          }, 
    5160          '--log=' => sub { 
     
    138147fileSubst('include/openpgpsdk/configure.h','/*','*/'); 
    139148 
    140 print "make cunit\n"; 
    141 system('make cunit') == 0 || exit; 
    142149print "make packet-show-cast.h\n"; 
    143150system('cd include/openpgpsdk; make packet-show-cast.h') == 0 || exit; 
  • openpgpsdk/trunk/include/openpgpsdk/Makefile

    r579 r600  
    22 
    33top: 
    4         $(MAKE) -C ../..  
     4        cd ../..; $(MAKE) 
    55 
    66headers: packet-show-cast.h 
  • openpgpsdk/trunk/src/app/Makefile.template

    r579 r600  
    44 
    55CFLAGS=-Wall -Werror -g $(DM_FLAGS) -I../../include %INCLUDES% %CFLAGS% -fPIC 
    6 # pickup _local.h headers from advanced directory 
    7 CFLAGS+=-I../advanced 
    86 
    9 LDFLAGS=-g 
     7LDFLAGS=-g  
    108LIBDEPS=../../lib/libops.a 
    11 LIBS=$(LIBDEPS) %CRYPTO_LIBS% -lz -lbz2 $(DM_LIB) 
     9LIBS=$(LIBDEPS) %CRYPTO_LIBS% %ZLIB% %OTHERLIBS% $(DM_LIB) 
    1210EXES=openpgp 
    1311 
     
    1513 
    1614headers: 
    17         $(MAKE) -w -S -C ../../include/openpgpsdk headers 
     15        (cd ../../include/openpgpsdk; $(MAKE) -w headers) 
    1816 
    1917$(LIBDEPS): 
    20         $(MAKE) -w -S -C ../ lib 
     18        (cd ..; $(MAKE) -w lib) 
    2119 
    2220openpgp: openpgp.o $(LIBDEPS) 
  • openpgpsdk/trunk/tests/Makefile.template

    r567 r600  
    33CC=%CC% 
    44 
    5 CUNIT_LIB=../lib/libcunit.a 
    6 CUNIT_INC=../include/CUnit 
    7  
    8  
    95CFLAGS=-Wall -Werror -g $(DM_FLAGS) -I../include %INCLUDES% %CFLAGS% 
    106LDFLAGS=-g %CFLAGS% 
    117LIBDEPS=../lib/libops.a 
    12 LIBS=$(LIBDEPS) %CRYPTO_LIBS% %ZLIB% $(DM_LIB) $(CUNIT_LIB) 
     8LIBS=$(LIBDEPS) %CRYPTO_LIBS% %ZLIB% %CUNITLIB% %OTHERLIBS% $(DM_LIB)  
    139 
    1410COMMONTESTSRC= test_packet_types.c \ 
     
    2521all: Makefile .depend tests 
    2622 
    27 tests: $(CUNIT_LIB) $(TESTOBJ) $(COMMONTESTOBJ) $(LIBDEPS) 
     23tests: $(TESTOBJ) $(COMMONTESTOBJ) $(LIBDEPS) 
    2824        $(CC) $(LDFLAGS) -o tests $(TESTOBJ) $(COMMONTESTOBJ) $(LIBS) 
    2925 
     
    3329        rm -f TAGS 
    3430 
    35 .depend: *.[ch] ../include/openpgpsdk/*.h $(CUNIT_INC) 
     31.depend: *.[ch] ../include/openpgpsdk/*.h 
    3632        $(CC) $(CFLAGS) -E -M *.c > .depend 
    3733 
  • openpgpsdk/trunk/tests/tests.c

    r573 r600  
    4646        } 
    4747 
    48     //#ifdef XXX 
    4948    if (NULL == suite_crypto()) 
    5049        { 
     
    7372        return CU_get_error(); 
    7473        } 
    75     //#endif 
    7674 
    7775    if (NULL == suite_rsa_signature())  
     
    8179        return CU_get_error(); 
    8280        } 
    83     //#ifdef XXX 
     81 
    8482    if (NULL == suite_rsa_verify())  
    8583        { 
     
    102100        return CU_get_error(); 
    103101        } 
    104     //#endif 
    105102 
    106103    // Run tests