#Makefile autogenerated by rofl0rs makefilegen

prefix = /
includedir = $(prefix)/include
libdir = $(prefix)/lib

-include config.mak

all: examples src tests 

tests:
	${CC} -c ./tests/benchmarks/bench_raw.c ${CFLAGS} -o ./tests/benchmarks/bench_raw.o
	${CC} -c ./tests/benchmarks/bench_scp.c ${CFLAGS} -o ./tests/benchmarks/bench_scp.o
	${CC} -c ./tests/benchmarks/benchmarks.c ${CFLAGS} -o ./tests/benchmarks/benchmarks.o
	${CC} -c ./tests/benchmarks/latency.c ${CFLAGS} -o ./tests/benchmarks/latency.o
	${CC} -c ./tests/client/torture_algorithms.c ${CFLAGS} -o ./tests/client/torture_algorithms.o
	${CC} -c ./tests/client/torture_auth.c ${CFLAGS} -o ./tests/client/torture_auth.o
	${CC} -c ./tests/client/torture_connect.c ${CFLAGS} -o ./tests/client/torture_connect.o
	${CC} -c ./tests/client/torture_knownhosts.c ${CFLAGS} -o ./tests/client/torture_knownhosts.o
	${CC} -c ./tests/client/torture_proxycommand.c ${CFLAGS} -o ./tests/client/torture_proxycommand.o
	${CC} -c ./tests/client/torture_sftp_dir.c ${CFLAGS} -o ./tests/client/torture_sftp_dir.o
	${CC} -c ./tests/client/torture_sftp_static.c ${CFLAGS} -o ./tests/client/torture_sftp_static.o
	${CC} -c ./tests/sftp_stress/main.c ${CFLAGS} -o ./tests/sftp_stress/main.o
	${CC} -c ./tests/unittests/torture_buffer.c ${CFLAGS} -o ./tests/unittests/torture_buffer.o
	${CC} -c ./tests/unittests/torture_callbacks.c ${CFLAGS} -o ./tests/unittests/torture_callbacks.o
	${CC} -c ./tests/unittests/torture_init.c ${CFLAGS} -o ./tests/unittests/torture_init.o
	${CC} -c ./tests/unittests/torture_isipaddr.c ${CFLAGS} -o ./tests/unittests/torture_isipaddr.o
	${CC} -c ./tests/unittests/torture_keyfiles.c ${CFLAGS} -o ./tests/unittests/torture_keyfiles.o
	${CC} -c ./tests/unittests/torture_list.c ${CFLAGS} -o ./tests/unittests/torture_list.o
	${CC} -c ./tests/unittests/torture_misc.c ${CFLAGS} -o ./tests/unittests/torture_misc.o
	${CC} -c ./tests/unittests/torture_options.c ${CFLAGS} -o ./tests/unittests/torture_options.o
	${CC} -c ./tests/unittests/torture_rand.c ${CFLAGS} -o ./tests/unittests/torture_rand.o
	${CC} -c ./tests/authentication.c ${CFLAGS} -o ./tests/authentication.o
	${CC} -c ./tests/chmodtest.c ${CFLAGS} -o ./tests/chmodtest.o
	${CC} -c ./tests/cmdline.c ${CFLAGS} -o ./tests/cmdline.o
	${CC} -c ./tests/connection.c ${CFLAGS} -o ./tests/connection.o
	${CC} -c ./tests/test_exec.c ${CFLAGS} -o ./tests/test_exec.o
	${CC} -c ./tests/test_pcap.c ${CFLAGS} -o ./tests/test_pcap.o
	${CC} -c ./tests/test_socket.c ${CFLAGS} -o ./tests/test_socket.o
	${CC} -c ./tests/test_tunnel.c ${CFLAGS} -o ./tests/test_tunnel.o
	${CC} -c ./tests/torture.c ${CFLAGS} -o ./tests/torture.o
	${CC} ./tests/benchmarks/bench_raw.o ./tests/benchmarks/bench_scp.o ./tests/benchmarks/benchmarks.o ./tests/benchmarks/latency.o ./tests/client/torture_algorithms.o ./tests/client/torture_auth.o ./tests/client/torture_connect.o ./tests/client/torture_knownhosts.o ./tests/client/torture_proxycommand.o ./tests/client/torture_sftp_dir.o ./tests/client/torture_sftp_static.o ./tests/sftp_stress/main.o ./tests/unittests/torture_buffer.o ./tests/unittests/torture_callbacks.o ./tests/unittests/torture_init.o ./tests/unittests/torture_isipaddr.o ./tests/unittests/torture_keyfiles.o ./tests/unittests/torture_list.o ./tests/unittests/torture_misc.o ./tests/unittests/torture_options.o ./tests/unittests/torture_rand.o ./tests/authentication.o ./tests/chmodtest.o ./tests/cmdline.o ./tests/connection.o ./tests/test_exec.o ./tests/test_pcap.o ./tests/test_socket.o ./tests/test_tunnel.o ./tests/torture.o  ${CFLAGS} -o ./tests/benchmarks/benchmarks.out
	${CC} ./tests/benchmarks/bench_raw.o ./tests/benchmarks/bench_scp.o ./tests/benchmarks/benchmarks.o ./tests/benchmarks/latency.o ./tests/client/torture_algorithms.o ./tests/client/torture_auth.o ./tests/client/torture_connect.o ./tests/client/torture_knownhosts.o ./tests/client/torture_proxycommand.o ./tests/client/torture_sftp_dir.o ./tests/client/torture_sftp_static.o ./tests/sftp_stress/main.o ./tests/unittests/torture_buffer.o ./tests/unittests/torture_callbacks.o ./tests/unittests/torture_init.o ./tests/unittests/torture_isipaddr.o ./tests/unittests/torture_keyfiles.o ./tests/unittests/torture_list.o ./tests/unittests/torture_misc.o ./tests/unittests/torture_options.o ./tests/unittests/torture_rand.o ./tests/authentication.o ./tests/chmodtest.o ./tests/cmdline.o ./tests/connection.o ./tests/test_exec.o ./tests/test_pcap.o ./tests/test_socket.o ./tests/test_tunnel.o ./tests/torture.o  ${CFLAGS} -o ./tests/sftp_stress/main.out
	${CC} ./tests/benchmarks/bench_raw.o ./tests/benchmarks/bench_scp.o ./tests/benchmarks/benchmarks.o ./tests/benchmarks/latency.o ./tests/client/torture_algorithms.o ./tests/client/torture_auth.o ./tests/client/torture_connect.o ./tests/client/torture_knownhosts.o ./tests/client/torture_proxycommand.o ./tests/client/torture_sftp_dir.o ./tests/client/torture_sftp_static.o ./tests/sftp_stress/main.o ./tests/unittests/torture_buffer.o ./tests/unittests/torture_callbacks.o ./tests/unittests/torture_init.o ./tests/unittests/torture_isipaddr.o ./tests/unittests/torture_keyfiles.o ./tests/unittests/torture_list.o ./tests/unittests/torture_misc.o ./tests/unittests/torture_options.o ./tests/unittests/torture_rand.o ./tests/authentication.o ./tests/chmodtest.o ./tests/cmdline.o ./tests/connection.o ./tests/test_exec.o ./tests/test_pcap.o ./tests/test_socket.o ./tests/test_tunnel.o ./tests/torture.o  ${CFLAGS} -o ./tests/chmodtest.out
	${CC} ./tests/benchmarks/bench_raw.o ./tests/benchmarks/bench_scp.o ./tests/benchmarks/benchmarks.o ./tests/benchmarks/latency.o ./tests/client/torture_algorithms.o ./tests/client/torture_auth.o ./tests/client/torture_connect.o ./tests/client/torture_knownhosts.o ./tests/client/torture_proxycommand.o ./tests/client/torture_sftp_dir.o ./tests/client/torture_sftp_static.o ./tests/sftp_stress/main.o ./tests/unittests/torture_buffer.o ./tests/unittests/torture_callbacks.o ./tests/unittests/torture_init.o ./tests/unittests/torture_isipaddr.o ./tests/unittests/torture_keyfiles.o ./tests/unittests/torture_list.o ./tests/unittests/torture_misc.o ./tests/unittests/torture_options.o ./tests/unittests/torture_rand.o ./tests/authentication.o ./tests/chmodtest.o ./tests/cmdline.o ./tests/connection.o ./tests/test_exec.o ./tests/test_pcap.o ./tests/test_socket.o ./tests/test_tunnel.o ./tests/torture.o  ${CFLAGS} -o ./tests/test_exec.out
	${CC} ./tests/benchmarks/bench_raw.o ./tests/benchmarks/bench_scp.o ./tests/benchmarks/benchmarks.o ./tests/benchmarks/latency.o ./tests/client/torture_algorithms.o ./tests/client/torture_auth.o ./tests/client/torture_connect.o ./tests/client/torture_knownhosts.o ./tests/client/torture_proxycommand.o ./tests/client/torture_sftp_dir.o ./tests/client/torture_sftp_static.o ./tests/sftp_stress/main.o ./tests/unittests/torture_buffer.o ./tests/unittests/torture_callbacks.o ./tests/unittests/torture_init.o ./tests/unittests/torture_isipaddr.o ./tests/unittests/torture_keyfiles.o ./tests/unittests/torture_list.o ./tests/unittests/torture_misc.o ./tests/unittests/torture_options.o ./tests/unittests/torture_rand.o ./tests/authentication.o ./tests/chmodtest.o ./tests/cmdline.o ./tests/connection.o ./tests/test_exec.o ./tests/test_pcap.o ./tests/test_socket.o ./tests/test_tunnel.o ./tests/torture.o  ${CFLAGS} -o ./tests/test_pcap.out
	${CC} ./tests/benchmarks/bench_raw.o ./tests/benchmarks/bench_scp.o ./tests/benchmarks/benchmarks.o ./tests/benchmarks/latency.o ./tests/client/torture_algorithms.o ./tests/client/torture_auth.o ./tests/client/torture_connect.o ./tests/client/torture_knownhosts.o ./tests/client/torture_proxycommand.o ./tests/client/torture_sftp_dir.o ./tests/client/torture_sftp_static.o ./tests/sftp_stress/main.o ./tests/unittests/torture_buffer.o ./tests/unittests/torture_callbacks.o ./tests/unittests/torture_init.o ./tests/unittests/torture_isipaddr.o ./tests/unittests/torture_keyfiles.o ./tests/unittests/torture_list.o ./tests/unittests/torture_misc.o ./tests/unittests/torture_options.o ./tests/unittests/torture_rand.o ./tests/authentication.o ./tests/chmodtest.o ./tests/cmdline.o ./tests/connection.o ./tests/test_exec.o ./tests/test_pcap.o ./tests/test_socket.o ./tests/test_tunnel.o ./tests/torture.o  ${CFLAGS} -o ./tests/test_socket.out
	${CC} ./tests/benchmarks/bench_raw.o ./tests/benchmarks/bench_scp.o ./tests/benchmarks/benchmarks.o ./tests/benchmarks/latency.o ./tests/client/torture_algorithms.o ./tests/client/torture_auth.o ./tests/client/torture_connect.o ./tests/client/torture_knownhosts.o ./tests/client/torture_proxycommand.o ./tests/client/torture_sftp_dir.o ./tests/client/torture_sftp_static.o ./tests/sftp_stress/main.o ./tests/unittests/torture_buffer.o ./tests/unittests/torture_callbacks.o ./tests/unittests/torture_init.o ./tests/unittests/torture_isipaddr.o ./tests/unittests/torture_keyfiles.o ./tests/unittests/torture_list.o ./tests/unittests/torture_misc.o ./tests/unittests/torture_options.o ./tests/unittests/torture_rand.o ./tests/authentication.o ./tests/chmodtest.o ./tests/cmdline.o ./tests/connection.o ./tests/test_exec.o ./tests/test_pcap.o ./tests/test_socket.o ./tests/test_tunnel.o ./tests/torture.o  ${CFLAGS} -o ./tests/test_tunnel.out
	${CC} ./tests/benchmarks/bench_raw.o ./tests/benchmarks/bench_scp.o ./tests/benchmarks/benchmarks.o ./tests/benchmarks/latency.o ./tests/client/torture_algorithms.o ./tests/client/torture_auth.o ./tests/client/torture_connect.o ./tests/client/torture_knownhosts.o ./tests/client/torture_proxycommand.o ./tests/client/torture_sftp_dir.o ./tests/client/torture_sftp_static.o ./tests/sftp_stress/main.o ./tests/unittests/torture_buffer.o ./tests/unittests/torture_callbacks.o ./tests/unittests/torture_init.o ./tests/unittests/torture_isipaddr.o ./tests/unittests/torture_keyfiles.o ./tests/unittests/torture_list.o ./tests/unittests/torture_misc.o ./tests/unittests/torture_options.o ./tests/unittests/torture_rand.o ./tests/authentication.o ./tests/chmodtest.o ./tests/cmdline.o ./tests/connection.o ./tests/test_exec.o ./tests/test_pcap.o ./tests/test_socket.o ./tests/test_tunnel.o ./tests/torture.o  ${CFLAGS} -o ./tests/torture.out

src:
	${CC} -c ./src/threads/pthread.c ${CFLAGS} -o ./src/threads/pthread.o
	${CC} -c ./src/agent.c ${CFLAGS} -o ./src/agent.o
	${CC} -c ./src/auth.c ${CFLAGS} -o ./src/auth.o
	${CC} -c ./src/auth1.c ${CFLAGS} -o ./src/auth1.o
	${CC} -c ./src/base64.c ${CFLAGS} -o ./src/base64.o
	${CC} -c ./src/bind.c ${CFLAGS} -o ./src/bind.o
	${CC} -c ./src/buffer.c ${CFLAGS} -o ./src/buffer.o
	${CC} -c ./src/callbacks.c ${CFLAGS} -o ./src/callbacks.o
	${CC} -c ./src/channels.c ${CFLAGS} -o ./src/channels.o
	${CC} -c ./src/channels1.c ${CFLAGS} -o ./src/channels1.o
	${CC} -c ./src/client.c ${CFLAGS} -o ./src/client.o
	${CC} -c ./src/config.c ${CFLAGS} -o ./src/config.o
	${CC} -c ./src/connect.c ${CFLAGS} -o ./src/connect.o
	${CC} -c ./src/crc32.c ${CFLAGS} -o ./src/crc32.o
	${CC} -c ./src/crypt.c ${CFLAGS} -o ./src/crypt.o
	${CC} -c ./src/dh.c ${CFLAGS} -o ./src/dh.o
	${CC} -c ./src/error.c ${CFLAGS} -o ./src/error.o
	${CC} -c ./src/gcrypt_missing.c ${CFLAGS} -o ./src/gcrypt_missing.o
	${CC} -c ./src/getpass.c ${CFLAGS} -o ./src/getpass.o
	${CC} -c ./src/gzip.c ${CFLAGS} -o ./src/gzip.o
	${CC} -c ./src/init.c ${CFLAGS} -o ./src/init.o
	${CC} -c ./src/kex.c ${CFLAGS} -o ./src/kex.o
	${CC} -c ./src/keyfiles.c ${CFLAGS} -o ./src/keyfiles.o
	${CC} -c ./src/keys.c ${CFLAGS} -o ./src/keys.o
	${CC} -c ./src/known_hosts.c ${CFLAGS} -o ./src/known_hosts.o
	${CC} -c ./src/legacy.c ${CFLAGS} -o ./src/legacy.o
	${CC} -c ./src/libcrypto.c ${CFLAGS} -o ./src/libcrypto.o
	${CC} -c ./src/libgcrypt.c ${CFLAGS} -o ./src/libgcrypt.o
	${CC} -c ./src/log.c ${CFLAGS} -o ./src/log.o
	${CC} -c ./src/match.c ${CFLAGS} -o ./src/match.o
	${CC} -c ./src/messages.c ${CFLAGS} -o ./src/messages.o
	${CC} -c ./src/misc.c ${CFLAGS} -o ./src/misc.o
	${CC} -c ./src/options.c ${CFLAGS} -o ./src/options.o
	${CC} -c ./src/packet.c ${CFLAGS} -o ./src/packet.o
	${CC} -c ./src/packet1.c ${CFLAGS} -o ./src/packet1.o
	${CC} -c ./src/pcap.c ${CFLAGS} -o ./src/pcap.o
	${CC} -c ./src/pki.c ${CFLAGS} -o ./src/pki.o
	${CC} -c ./src/poll.c ${CFLAGS} -o ./src/poll.o
	${CC} -c ./src/scp.c ${CFLAGS} -o ./src/scp.o
	${CC} -c ./src/server.c ${CFLAGS} -o ./src/server.o
	${CC} -c ./src/session.c ${CFLAGS} -o ./src/session.o
	${CC} -c ./src/sftp.c ${CFLAGS} -o ./src/sftp.o
	${CC} -c ./src/sftpserver.c ${CFLAGS} -o ./src/sftpserver.o
	${CC} -c ./src/socket.c ${CFLAGS} -o ./src/socket.o
	${CC} -c ./src/string.c ${CFLAGS} -o ./src/string.o
	${CC} -c ./src/threads.c ${CFLAGS} -o ./src/threads.o
	${CC} -c ./src/wrapper.c ${CFLAGS} -o ./src/wrapper.o
	ar rcs libssh.a ./src/threads/pthread.o ./src/agent.o ./src/auth.o ./src/auth1.o ./src/base64.o ./src/bind.o ./src/buffer.o ./src/callbacks.o ./src/channels.o ./src/channels1.o ./src/client.o ./src/config.o ./src/connect.o ./src/crc32.o ./src/crypt.o ./src/dh.o ./src/error.o ./src/gcrypt_missing.o ./src/getpass.o ./src/gzip.o ./src/init.o ./src/kex.o ./src/keyfiles.o ./src/keys.o ./src/known_hosts.o ./src/legacy.o ./src/libcrypto.o ./src/libgcrypt.o ./src/log.o ./src/match.o ./src/messages.o ./src/misc.o ./src/options.o ./src/packet.o ./src/packet1.o ./src/pcap.o ./src/pki.o ./src/poll.o ./src/scp.o ./src/server.o ./src/session.o ./src/sftp.o ./src/sftpserver.o ./src/socket.o ./src/string.o ./src/threads.o ./src/wrapper.o 

examples:
	${CC} -c ./examples/authentication.c ${CFLAGS} -o ./examples/authentication.o
	${CC} -c ./examples/connect_ssh.c ${CFLAGS} -o ./examples/connect_ssh.o
	${CC} -c ./examples/exec.c ${CFLAGS} -o ./examples/exec.o
	${CC} -c ./examples/knownhosts.c ${CFLAGS} -o ./examples/knownhosts.o
	${CC} -c ./examples/libssh_scp.c ${CFLAGS} -o ./examples/libssh_scp.o
	${CC} -c ./examples/sample.c ${CFLAGS} -o ./examples/sample.o
	${CC} -c ./examples/samplesftp.c ${CFLAGS} -o ./examples/samplesftp.o
	${CC} -c ./examples/samplesshd.c ${CFLAGS} -o ./examples/samplesshd.o
	${CC} -c ./examples/scp_download.c ${CFLAGS} -o ./examples/scp_download.o
	${CC} -c ./examples/senddata.c ${CFLAGS} -o ./examples/senddata.o
	${CC} -c ./examples/sshnetcat.c ${CFLAGS} -o ./examples/sshnetcat.o
	${CC} ./examples/authentication.o ./examples/connect_ssh.o ./examples/exec.o ./examples/knownhosts.o ./examples/libssh_scp.o ./examples/sample.o ./examples/samplesftp.o ./examples/samplesshd.o ./examples/scp_download.o ./examples/senddata.o ./examples/sshnetcat.o  ${CFLAGS} -o ./examples/exec.out
	${CC} ./examples/authentication.o ./examples/connect_ssh.o ./examples/exec.o ./examples/knownhosts.o ./examples/libssh_scp.o ./examples/sample.o ./examples/samplesftp.o ./examples/samplesshd.o ./examples/scp_download.o ./examples/senddata.o ./examples/sshnetcat.o  ${CFLAGS} -o ./examples/libssh_scp.out
	${CC} ./examples/authentication.o ./examples/connect_ssh.o ./examples/exec.o ./examples/knownhosts.o ./examples/libssh_scp.o ./examples/sample.o ./examples/samplesftp.o ./examples/samplesshd.o ./examples/scp_download.o ./examples/senddata.o ./examples/sshnetcat.o  ${CFLAGS} -o ./examples/sample.out
	${CC} ./examples/authentication.o ./examples/connect_ssh.o ./examples/exec.o ./examples/knownhosts.o ./examples/libssh_scp.o ./examples/sample.o ./examples/samplesftp.o ./examples/samplesshd.o ./examples/scp_download.o ./examples/senddata.o ./examples/sshnetcat.o  ${CFLAGS} -o ./examples/samplesftp.out
	${CC} ./examples/authentication.o ./examples/connect_ssh.o ./examples/exec.o ./examples/knownhosts.o ./examples/libssh_scp.o ./examples/sample.o ./examples/samplesftp.o ./examples/samplesshd.o ./examples/scp_download.o ./examples/senddata.o ./examples/sshnetcat.o  ${CFLAGS} -o ./examples/samplesshd.out
	${CC} ./examples/authentication.o ./examples/connect_ssh.o ./examples/exec.o ./examples/knownhosts.o ./examples/libssh_scp.o ./examples/sample.o ./examples/samplesftp.o ./examples/samplesshd.o ./examples/scp_download.o ./examples/senddata.o ./examples/sshnetcat.o  ${CFLAGS} -o ./examples/scp_download.out
	${CC} ./examples/authentication.o ./examples/connect_ssh.o ./examples/exec.o ./examples/knownhosts.o ./examples/libssh_scp.o ./examples/sample.o ./examples/samplesftp.o ./examples/samplesshd.o ./examples/scp_download.o ./examples/senddata.o ./examples/sshnetcat.o  ${CFLAGS} -o ./examples/senddata.out
	${CC} ./examples/authentication.o ./examples/connect_ssh.o ./examples/exec.o ./examples/knownhosts.o ./examples/libssh_scp.o ./examples/sample.o ./examples/samplesftp.o ./examples/samplesshd.o ./examples/scp_download.o ./examples/senddata.o ./examples/sshnetcat.o  ${CFLAGS} -o ./examples/sshnetcat.out


install:
	install -D -m 644 libssh.a $(DESTDIR)$(libdir)
	mkdir -p $(DESTDIR)$(includedir)/libssh
	find include/libssh/ -name '*.h' -exec install -D -m 644 {} $(DESTDIR)$(includedir)/libssh \;

.PHONY: tests src examples 
