use a single Makefile, no recursion

This commit is contained in:
Todd A Ouska 2011-04-26 17:45:41 -07:00
parent 575dc32780
commit 8846b8cad5
26 changed files with 168 additions and 121 deletions

2
.gitignore vendored
View File

@ -5,6 +5,7 @@
*.libs
*sh
*.cache
.dirstamp
config*
stamp*
libtool.m4
@ -31,6 +32,7 @@ sslSniffer/sslSnifferTest/tracefile.txt
*.zip
*.bak
*.dummy
compile
NTRU_algorithm/
build-test/
build/

View File

@ -1,4 +1,3 @@
SUBDIRS = src ctaocrypt examples testsuite sslSniffer
EXTRA_DIST = certs/*.pem certs/*.der certs/*.txt certs/*.raw \
lib/dummy *.sln *.vcproj cyassl-iphone.xcodeproj/project.pbxproj \
doc/*.txt swig/README swig/*.i swig/cyassl_adds.c swig/*.sh swig/runme.* \
@ -6,6 +5,16 @@ EXTRA_DIST = certs/*.pem certs/*.der certs/*.txt certs/*.raw \
ACLOCAL_AMFLAGS = -I m4
include src/include.am
include ctaocrypt/test/include.am
include ctaocrypt/benchmark/include.am
include examples/client/include.am
include examples/server/include.am
include examples/echoclient/include.am
include examples/echoserver/include.am
include testsuite/include.am
include sslSniffer/sslSnifferTest/include.am
# !!!! first line of rule has to start with a hard (real) tab, not spaces
basic:
cd src; $(MAKE); cd ../testsuite; $(MAKE); cd ../

View File

@ -14,6 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
CFLAGS="$CFLAGS $C_EXTRA_FLAGS"
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CC_C_O
AM_PROG_AS
AC_PROG_INSTALL

View File

@ -1,3 +0,0 @@
SUBDIRS = src test benchmark
EXTRA_DIST = ctaocrypt.sln ctaocrypt.vcproj

View File

@ -1,7 +0,0 @@
INCLUDES = -I../include
bin_PROGRAMS = benchmark
benchmark_SOURCES = benchmark.c
benchmark_LDFLAGS = -L../src
benchmark_LDADD = ../../src/libcyassl.la
benchmark_DEPENDENCIES = ../../src/libcyassl.la
EXTRA_DIST = *.der benchmark.sln benchmark.vcproj

View File

@ -0,0 +1,12 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
bin_PROGRAMS += ctaocrypt/benchmark/benchmark
ctaocrypt_benchmark_benchmark_SOURCES = ctaocrypt/benchmark/benchmark.c
ctaocrypt_benchmark_benchmark_LDFLAGS = -Lsrc
ctaocrypt_benchmark_benchmark_LDADD = src/libcyassl.la
ctaocrypt_benchmark_benchmark_DEPENDENCIES = src/libcyassl.la
EXTRA_DIST += ctaocrypt/benchmark/*.der \
ctaocrypt/benchmark/benchmark.sln ctaocrypt/benchmark/benchmark.vcproj

View File

@ -1,2 +0,0 @@
EXTRA_DIST = ../include/*.h *.c *.i

View File

@ -1,7 +0,0 @@
INCLUDES = -I../include -I../../include -I../../include/openssl
bin_PROGRAMS = test
test_SOURCES = test.c
test_LDFLAGS = -L../src
test_LDADD = ../../src/libcyassl.la
test_DEPENDENCIES = ../../src/libcyassl.la
EXTRA_DIST = test.sln test.vcproj

11
ctaocrypt/test/include.am Normal file
View File

@ -0,0 +1,11 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
bin_PROGRAMS = ctaocrypt/test/test
ctaocrypt_test_test_SOURCES = ctaocrypt/test/test.c
ctaocrypt_test_test_LDFLAGS = -Lsrc
ctaocrypt_test_test_LDADD = src/libcyassl.la
ctaocrypt_test_test_DEPENDENCIES = src/libcyassl.la
EXTRA_DIST += ctaocrypt/test/test.sln ctaocrypt/test/test.vcproj

View File

@ -1,2 +0,0 @@
SUBDIRS = client server echoclient echoserver

View File

@ -1,7 +0,0 @@
INCLUDES = -I../../include -I../../include/openssl
bin_PROGRAMS = client
client_SOURCES = client.c
client_LDFLAGS = -L../../src
client_LDADD = ../../src/libcyassl.la
client_DEPENDENCIES = ../../src/libcyassl.la
EXTRA_DIST = client.sln *.vcproj

View File

@ -0,0 +1,11 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
bin_PROGRAMS += examples/client/client
examples_client_client_SOURCES = examples/client/client.c
examples_client_client_LDFLAGS = -Lsrc
examples_client_client_LDADD = src/libcyassl.la
examples_client_client_DEPENDENCIES = src/libcyassl.la
EXTRA_DIST += examples/client/client.sln examples/client/*.vcproj

View File

@ -1,7 +0,0 @@
INCLUDES = -I../../include -I../../include/openssl
bin_PROGRAMS = echoclient
echoclient_SOURCES = echoclient.c
echoclient_LDFLAGS = -L../../src
echoclient_LDADD = ../../src/libcyassl.la
echoclient_DEPENDENCIES= ../../src/libcyassl.la
EXTRA_DIST = input quit echoclient.sln *.vcproj

View File

@ -0,0 +1,12 @@
vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
bin_PROGRAMS += examples/echoclient/echoclient
examples_echoclient_echoclient_SOURCES = examples/echoclient/echoclient.c
examples_echoclient_echoclient_LDFLAGS = -Lsrc
examples_echoclient_echoclient_LDADD = src/libcyassl.la
examples_echoclient_echoclient_DEPENDENCIES = src/libcyassl.la
EXTRA_DIST += examples/echoclient/echoclient.sln examples/echoclient/*.vcproj \
examples/echoclient/input examples/echoclient/quit

View File

@ -1,7 +0,0 @@
INCLUDES = -I../../include -I../../include/openssl
bin_PROGRAMS = echoserver
echoserver_SOURCES = echoserver.c
echoserver_LDFLAGS = -L../../src
echoserver_LDADD = ../../src/libcyassl.la
echoserver_DEPENDENCIES= ../../src/libcyassl.la
EXTRA_DIST = echoserver.sln *.vcproj

View File

@ -0,0 +1,11 @@
vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
bin_PROGRAMS += examples/echoserver/echoserver
examples_echoserver_echoserver_SOURCES = examples/echoserver/echoserver.c
examples_echoserver_echoserver_LDFLAGS = -Lsrc
examples_echoserver_echoserver_LDADD = src/libcyassl.la
examples_echoserver_echoserver_DEPENDENCIES = src/libcyassl.la
EXTRA_DIST += examples/echoserver/echoserver.sln examples/echoserver/*.vcproj

View File

@ -1,7 +0,0 @@
INCLUDES = -I../../include -I../../include/openssl
bin_PROGRAMS = server
server_SOURCES = server.c
server_LDFLAGS = -L../../src
server_LDADD = ../../src/libcyassl.la
server_DEPENDENCIES = ../../src/libcyassl.la
EXTRA_DIST = server.sln *.vcproj

View File

@ -0,0 +1,11 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
bin_PROGRAMS += examples/server/server
examples_server_server_SOURCES = examples/server/server.c
examples_server_server_LDFLAGS = -Lsrc
examples_server_server_LDADD = src/libcyassl.la
examples_server_server_DEPENDENCIES = src/libcyassl.la
EXTRA_DIST += examples/server/server.sln examples/server/*.vcproj

View File

@ -24,6 +24,7 @@
#ifndef CYASSL_SNIFFER_H
#define CYASSL_SNIFFER_H
#include "os_settings.h"
#ifdef _WIN32
#ifdef SSL_SNIFFER_EXPORTS
@ -42,19 +43,22 @@
CYASSL_API
SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port,
const char* keyFile, int keyType,
const char* password, char* error);
CYASSL_API
SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length,
unsigned char* data, char* error);
CYASSL_API
SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error);
void ssl_InitSniffer(void);
CYASSL_API void ssl_InitSniffer(void);
void ssl_FreeSniffer(void);
CYASSL_API void ssl_FreeSniffer(void);
/* ssl_SetPrivateKey keyTypes */

View File

@ -1,45 +0,0 @@
INCLUDES = -I../include -I../ctaocrypt/include -I../include/openssl
lib_LTLIBRARIES = libcyassl.la
libcyassl_la_SOURCES = \
cyassl_int.c cyassl_io.c keys.c ssl.c tls.c \
../ctaocrypt/src/asn.c ../ctaocrypt/src/coding.c ../ctaocrypt/src/des3.c \
../ctaocrypt/src/hmac.c ../ctaocrypt/src/md5.c ../ctaocrypt/src/md4.c \
../ctaocrypt/src/random.c ../ctaocrypt/src/rsa.c ../ctaocrypt/src/sha.c \
../ctaocrypt/src/aes.c ../ctaocrypt/src/sha256.c ../ctaocrypt/src/dh.c \
../ctaocrypt/src/dsa.c ../ctaocrypt/src/arc4.c ../ctaocrypt/src/rabbit.c \
../ctaocrypt/src/pwdbased.c ../ctaocrypt/src/logging.c \
../ctaocrypt/src/cyassl_memory.c
libcyassl_la_LDFLAGS = -no-undefined -version-info 1:0:0
libcyassl_la_CFLAGS = -DBUILDING_CYASSL
EXTRA_DIST = ../include/*.h ../include/openssl/*.h ../include/*.rc
if BUILD_AESNI
libcyassl_la_SOURCES += ../ctaocrypt/src/aes_asm.s
endif
if BUILD_RIPEMD
libcyassl_la_SOURCES += ../ctaocrypt/src/ripemd.c
endif
if BUILD_SHA512
libcyassl_la_SOURCES += ../ctaocrypt/src/sha512.c
endif
if BUILD_SNIFFER
libcyassl_la_SOURCES += sniffer.c
endif
if BUILD_HC128
libcyassl_la_SOURCES += ../ctaocrypt/src/hc128.c
endif
if BUILD_FASTMATH
libcyassl_la_SOURCES += ../ctaocrypt/src/tfm.c
else
libcyassl_la_SOURCES += ../ctaocrypt/src/integer.c
endif
if BUILD_ECC
libcyassl_la_SOURCES += ../ctaocrypt/src/ecc.c
endif

52
src/include.am Normal file
View File

@ -0,0 +1,52 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
INCLUDES = -Iinclude -Ictaocrypt/include -Iinclude/openssl
lib_LTLIBRARIES = src/libcyassl.la
src_libcyassl_la_SOURCES = \
src/cyassl_int.c src/cyassl_io.c src/keys.c src/ssl.c src/tls.c \
ctaocrypt/src/asn.c ctaocrypt/src/coding.c ctaocrypt/src/des3.c \
ctaocrypt/src/hmac.c ctaocrypt/src/md5.c ctaocrypt/src/md4.c \
ctaocrypt/src/random.c ctaocrypt/src/rsa.c ctaocrypt/src/sha.c \
ctaocrypt/src/aes.c ctaocrypt/src/sha256.c ctaocrypt/src/dh.c \
ctaocrypt/src/dsa.c ctaocrypt/src/arc4.c ctaocrypt/src/rabbit.c \
ctaocrypt/src/pwdbased.c ctaocrypt/src/logging.c \
ctaocrypt/src/cyassl_memory.c
src_libcyassl_la_LDFLAGS = -no-undefined -version-info 1:0:0
src_libcyassl_la_CFLAGS = -DBUILDING_CYASSL
EXTRA_DIST += ../include/*.h ../include/openssl/*.h ../include/*.rc
if BUILD_AESNI
src_libcyassl_la_SOURCES += ctaocrypt/src/aes_asm.s
endif
if BUILD_RIPEMD
src_libcyassl_la_SOURCES += ctaocrypt/src/ripemd.c
endif
if BUILD_SHA512
src_libcyassl_la_SOURCES += ctaocrypt/src/sha512.c
endif
if BUILD_SNIFFER
src_libcyassl_la_SOURCES += src/sniffer.c
endif
if BUILD_HC128
src_libcyassl_la_SOURCES += ctaocrypt/src/hc128.c
endif
if BUILD_FASTMATH
src_libcyassl_la_SOURCES += ctaocrypt/src/tfm.c
else
src_libcyassl_la_SOURCES += ctaocrypt/src/integer.c
endif
if BUILD_ECC
src_libcyassl_la_SOURCES += ctaocrypt/src/ecc.c
endif

View File

@ -1,3 +0,0 @@
SUBDIRS = sslSnifferTest
EXTRA_DIST = sslSniffer.vcproj

View File

@ -1,11 +0,0 @@
INCLUDES = -I../../include
bin_PROGRAMS = snifftest
snifftest_SOURCES = snifftest.c
snifftest_LDFLAGS = -L../../src
if BUILD_SNIFFER
snifftest_LDADD = ../../src/libcyassl.la -lpcap
snifftest_DEPENDENCIES = ../../src/libcyassl.la
endif
EXTRA_DIST = sslSniffTest.vcproj

View File

@ -0,0 +1,14 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
bin_PROGRAMS += sslSniffer/sslSnifferTest/snifftest
sslSniffer_sslSnifferTest_snifftest_SOURCES = \
sslSniffer/sslSnifferTest/snifftest.c
sslSniffer_sslSnifferTest_snifftest_LDFLAGS = -Lsrc
if BUILD_SNIFFER
sslSniffer_sslSnifferTest_snifftest_LDADD = src/libcyassl.la -lpcap
sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES = src/libcyassl.la
endif
EXTRA_DIST += sslSniffer/*.vcproj sslSniffer/sslSnifferTest/*.vcproj

View File

@ -1,10 +0,0 @@
INCLUDES = -I../include -I../ctaocrypt/include -I../include/openssl
bin_PROGRAMS = testsuite
testsuite_SOURCES = testsuite.c ../ctaocrypt/test/test.c \
../examples/client/client.c ../examples/server/server.c \
../examples/echoclient/echoclient.c ../examples/echoserver/echoserver.c
AM_CFLAGS = -DNO_MAIN_DRIVER
testsuite_LDFLAGS = -L../src
testsuite_LDADD = ../src/libcyassl.la
testsuite_DEPENDENCIES = ../src/libcyassl.la
EXTRA_DIST = input quit testsuite.sln *.vcproj

15
testsuite/include.am Normal file
View File

@ -0,0 +1,15 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
bin_PROGRAMS += testsuite/testsuite
testsuite_testsuite_SOURCES = testsuite/testsuite.c ctaocrypt/test/test.c \
examples/client/client.c examples/server/server.c \
examples/echoclient/echoclient.c examples/echoserver/echoserver.c
testsuite_testsuite_CFLAGS = -DNO_MAIN_DRIVER
testsuite_testsuite_LDFLAGS = -Lsrc
testsuite_testsuite_LDADD = src/libcyassl.la
testsuite_testsuite_DEPENDENCIES = src/libcyassl.la
EXTRA_DIST += testsuite/testsuite.sln testsuite/*.vcproj testsuite/input \
testsuite/quit