diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e97a28e --- /dev/null +++ b/Makefile @@ -0,0 +1,139 @@ +DIR=. + +include Makefile_base + +aes.o : compile aes.c aes.h uint.h + @./compile aes.c + +blowfish.o : compile blowfish.c blowfish.h uint.h + @./compile blowfish.c + +cryptot : load cryptot.o crypto_buffer.a ipv4_scan.o scan_ulong.o \ + socket_accept.o socket_bind.o socket_conn.o socket_listen.o socket_local.o socket_remote.o socket_tcp.o \ + rt.lib uint16_pack.o uint16_unpack.o + @./load c cryptot ipv4_scan.o scan_ulong.o \ + socket_accept.o socket_bind.o socket_conn.o socket_listen.o socket_local.o socket_remote.o socket_tcp.o \ + `cat rt.lib` uint16_pack.o uint16_unpack.o crypto_buffer.a + +cryptot.o : compile cryptot.c cryptot.h crypto_buffer.h ipv4.h scan.h socket.h + @./compile cryptot.c + +crypto_api.a : load aes.o des.o blowfish.o twofish.o md4.o md5.o sha1.o sha256.o sha512.o + @./load s crypto_api.a aes.o des.o blowfish.o twofish.o md4.o md5.o sha1.o sha256.o sha512.o + +crypto_buffer.a : load crypto_buffer.o crypto_buffer_put.o crypto_buffer_get.o u8_read.o u8_write.o \ +aes.o des.o blowfish.o twofish.o + @./load s crypto_buffer.a crypto_buffer.o crypto_buffer_get.o crypto_buffer_put.o \ + u8_read.o u8_write.o aes.o des.o blowfish.o twofish.o + +crypto_buffer.o : compile crypto_buffer.c crypto_buffer.h + @./compile crypto_buffer.c + +crypto_buffer_get.o : compile crypto_buffer_get.c crypto_buffer.h + @./compile crypto_buffer_get.c + +crypto_buffer_put.o : compile crypto_buffer_put.c crypto_buffer.h + @./compile crypto_buffer_put.c + +des.o : compile des.c des.h uint.h + @./compile des.c + +ipv4_scan.o : compile ipv4_scan.c ipv4.h + @./compile ipv4_scan.c + +md4.o : compile md4.c md4.h uint.h + @./compile md4.c + +md5.o : compile md5.c md5.h uint.h + @./compile md5.c + +rt.lib : compile load try_clock_gettime.c + @( ( ./compile try_clock_gettime.c && ./load c try_clock_gettime ) \ + >/dev/null 2>&1 && exit 0 || echo "-lrt" ) > rt.lib + +scan_ulong.o : compile scan_ulong.c scan.h + @./compile scan_ulong.c + +sha1.o : compile sha1.c sha1.h uint.h + @./compile sha1.c + +sha256.o : compile sha256.c sha256.h uint.h + @./compile sha256.c + +sha512.o : compile sha512.c sha512.h uint.h + @./compile sha512.c + +socket_accept.o : compile socket_accept.c socket.h + @./compile socket_accept.c + +socket_bind.o : compile socket_bind.c socket.h + @./compile socket_bind.c + +socket_conn.o : compile socket_conn.c socket.h + @./compile socket_conn.c + +socket_listen.o : compile socket_listen.c socket.h + @./compile socket_listen.c + +socket_local.o : compile socket_local.c socket.h + @./compile socket_local.c + +socket_remote.o : compile socket_remote.c socket.h + @./compile socket_remote.c + +socket_tcp.o : compile socket_tcp.c socket.h + @./compile socket_tcp.c + +test_crypto_api.o : compile test_crypto_api.c + @./compile test_crypto_api.c + +test_crypto_api : load test_crypto_api.o crypto_api.a + @./load c test_crypto_api crypto_api.a + +test_crypto_buffer.o : compile test_crypto_buffer.c + @./compile test_crypto_buffer.c + +test_crypto_buffer : load test_crypto_buffer.o crypto_buffer.a + @./load c test_crypto_buffer crypto_buffer.a + +twofish.o : compile twofish.c twofish.h uint.h + @./compile twofish.c + +uint.h : compile load douint.c + @./compile douint.c + @./load c douint + @./douint > uint.h + +uint16_pack.o : compile uint16_pack.c uint.h + @./compile uint16_pack.c + +uint16_unpack.o : compile uint16_unpack.c uint.h + @./compile uint16_unpack.c + +u8_read.o : compile u8_read.c uint.h + @./compile u8_read.c + +u8_write.o : compile u8_write.c uint.h + @./compile u8_write.c + + + +# HIGH LEVEL SPECIFIC TARGETS + +clean : cleanstd + @if [ -f cryptot ]; then rm cryptot; fi + @if [ -f crypto_file ]; then rm crypto_file; fi + @if [ -f douint ]; then rm douint; fi + @if [ -f rt.lib ]; then rm rt.lib; fi + @if [ -f test_crypto_api ]; then rm test_crypto_api; fi + @if [ -f test_crypto_buffer ]; then rm test_crypto_buffer; fi + @if [ -f try_clock_gettime ]; then rm try_clock_gettime; fi + @if [ -f uint.h ]; then rm uint.h; fi + +arch: buildarch + -@./buildarch test.sh mypass + +build : crypto_api.a test_crypto_api crypto_buffer.a test_crypto_buffer cryptot + +install : build + cp cryptot /home/jeyzu/bin |