code:
#
# For conditions of distribution and use, see copyright notice in libmng.h
#
# makefile for libmng - THE MNG library
# this makefile is suitable for Linux ELF with gcc
#
# (this file is heavily copied from makefile.linux in the libpng package)

# compiler
CC=gcc

# default build options (this forces shared library compatibility!!)
#OPTIONS = -DMNG_BUILD_SO
OPTIONS = -DMNG_BUILD_SO -DMNG_FULL_CMS

# where "make install" puts libmng.a,libmng.so*,libmng.h,libmng_conf.h,libmng_types.h
prefix=/usr/local

ALIGN=
# for i386:
#ALIGN=-malign-loops=2 -malign-functions=2

WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
	-Wmissing-declarations -Wtraditional -Wcast-align \
	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion

# for pgcc version 2.95.1, -O3 is buggy; don't use it.

#CFLAGS=-I$(ZLIBINC) -I$(JPEGINC) -I$(LCMSINC) -Wall -O3 -funroll-loops \
#	$(OPTIONS) $(ALIGN) # $(WARNMORE) -g
CFLAGS=-I$(ZLIBINC) -I$(JPEGINC) -I$(LCMSINC) -Wall -O2 -fPIC \
	$(OPTIONS) $(ALIGN) # $(WARNMORE) -g
LDFLAGS=-L. -Wl,-rpath,. \
	-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
	-L$(JPEGLIB) -Wl,-rpath,$(JPEGLIB) \
	-L$(LCMSLIB) -Wl,-rpath,$(LCMSLIB) \
	-lmng -lz -ljpeg -llcms -lm

RANLIB=ranlib
#RANLIB=echo

-include config.mak

# current version numbers
MNGMAJ = 1
MNGMIN = 1.0.9
MNGVER = $(MNGMAJ).$(MNGMIN)

INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib

OBJS = \
	libmng_callback_xs.o \
	libmng_chunk_io.o \
	libmng_chunk_descr.o \
	libmng_chunk_prc.o \
	libmng_chunk_xs.o \
	libmng_cms.o \
	libmng_display.o \
	libmng_dither.o \
	libmng_error.o \
	libmng_filter.o \
	libmng_hlapi.o \
	libmng_jpeg.o \
	libmng_object_prc.o \
	libmng_pixels.o \
	libmng_prop_xs.o \
	libmng_read.o \
	libmng_trace.o \
	libmng_write.o \
	libmng_zlib.o

OBJSDLL = $(OBJS:.0=.pic.o)

.SUFFIXES:      .c .o .pic.o

#.c.pic.o:
#	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c

all: libmng.a libmng.so

libmng.a: $(OBJS)
	ar rc $@ $(OBJS)
	$(RANLIB) $@

libmng.so: libmng.so.$(MNGMAJ)
	ln -sf libmng.so.$(MNGMAJ) libmng.so

libmng.so.$(MNGMAJ): libmng.so.$(MNGVER)
	ln -sf libmng.so.$(MNGVER) libmng.so.$(MNGMAJ)

#libmng.so.$(MNGVER): $(OBJSDLL)
libmng.so.$(MNGVER): $(OBJS)
#	$(CC) -shared -Wl,-soname,libmng.so.$(MNGMAJ) -o libmng.so.$(MNGVER) \
#	$(OBJSDLL) -L$(ZLIBLIB) -L$(JPEGLIB) -L$(LCMSLIB) -lz -lm -lc
	$(CC) -shared -Wl,-soname,libmng.so.$(MNGMAJ) -o libmng.so.$(MNGVER) \
	$(OBJSDLL) -L$(ZLIBLIB) -L$(JPEGLIB) -ljpeg -L$(LCMSLIB) -llcms \
    -lz -lm -lc

install: libmng.a libmng.so.$(MNGVER)
	-@mkdir $(DESTDIR)$(INCPATH) $(DESTDIR)$(LIBPATH)
	cp libmng.h libmng_conf.h libmng_types.h $(DESTDIR)$(INCPATH)
	chmod 644 $(DESTDIR)$(INCPATH)/libmng.h $(DESTDIR)$(INCPATH)/libmng_conf.h $(DESTDIR)$(INCPATH)/libmng_types.h
	cp libmng.a libmng.so.$(MNGVER) $(DESTDIR)$(LIBPATH)
	chmod 755 $(DESTDIR)$(LIBPATH)/libmng.so.$(MNGVER)
	-@/bin/rm -f $(DESTDIR)$(LIBPATH)/libmng.so.$(MNGMAJ) $(DESTDIR)$(LIBPATH)/libmng.so
	(cd $(DESTDIR)$(LIBPATH); ln -sf libmng.so.$(MNGVER) libmng.so.$(MNGMAJ); \
	 ln -sf libmng.so.$(MNGMAJ) libmng.so)

clean:
	/bin/rm -f *.o libmng.a libmng.so*

# DO NOT DELETE THIS LINE -- make depend depends on it.

libmng_hlapi.o libmng_hlapi.pic.o: libmng_hlapi.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_objects.h libmng_object_prc.h \
	libmng_chunks.h libmng_memory.h libmng_error.h libmng_trace.h libmng_read.h \
        libmng_write.h libmng_display.h libmng_zlib.h libmng_cms.h libmng_zlib.h
libmng_callback_xs.o libmng_callback_xs.pic.o: libmng_callback_xs.c libmng.h \
        libmng_conf.h libmng_types.h libmng_data.h libmng_error.h libmng_trace.h
libmng_prop_xs.o libmng_prop_xs.pic.o: libmng_prop_xs.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_error.h libmng_trace.h libmng_cms.h
libmng_chunk_xs.o libmng_chunk_xs.pic.o: libmng_chunk_xs.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h \
        libmng_error.h libmng_trace.h
libmng_read.o libmng_read.pic.o: libmng_read.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_objects.h libmng_object_prc.h \
	libmng_chunks.h libmng_chunk_prc.h libmng_chunk_io.h libmng_memory.h \
        libmng_error.h libmng_trace.h libmng_read.h libmng_display.h
libmng_write.o libmng_write.pic.o: libmng_write.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h libmng_write.h
libmng_display.o libmng_display.pic.o: libmng_display.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \
	libmng_error.h libmng_trace.h libmng_zlib.h libmng_cms.h libmng_pixels.h \
        libmng_display.h
libmng_object_prc.o libmng_object_prc.pic.o: libmng_object_prc.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \
        libmng_error.h libmng_trace.h libmng_display.h libmng_pixels.h
libmng_chunk_descr.o libmng_chunk_descr.pic.o: libmng_chunk_descr.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_descr.h libmng_memory.h \
        libmng_chunk_prc.h libmng_error.h libmng_trace.h
libmng_chunk_prc.o libmng_chunk_prc.pic.o: libmng_chunk_prc.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h libmng_memory.h \
        libmng_error.h libmng_trace.h
libmng_chunk_io.o libmng_chunk_io.pic.o: libmng_chunk_io.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h \
        libmng_chunks.h libmng_chunk_io.h libmng_chunk_prc.h libmng_memory.h libmng_error.h \
        libmng_trace.h libmng_display.h libmng_zlib.h libmng_pixels.h
libmng_error.o libmng_error.pic.o: libmng_error.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h
libmng_trace.o libmng_trace.pic.o: libmng_trace.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h
libmng_pixels.o libmng_pixels.pic.o: libmng_pixels.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_objects.h libmng_memory.h libmng_error.h libmng_trace.h \
        libmng_cms.h libmng_filter.h libmng_pixels.h
libmng_filter.o libmng_filter.pic.o: libmng_filter.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h libmng_filter.h
libmng_dither.o libmng_dither.pic.o: libmng_dither.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h libmng_dither.h
libmng_zlib.o libmng_zlib.pic.o: libmng_zlib.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_memory.h libmng_error.h libmng_trace.h libmng_pixels.h \
        libmng_filter.h libmng_zlib.h
libmng_jpeg.o libmng_jpeg.pic.o: libmng_jpeg.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_memory.h libmng_error.h libmng_trace.h libmng_pixels.h libmng_jpeg.h
libmng_cms.o libmng_cms.pic.o: libmng_cms.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_objects.h libmng_error.h libmng_trace.h libmng_cms.h


code:
--- libnet-1.2-rc3.org/src/libnet_link_linux.c	2014-08-12 21:39:18.936276146 +0200
+++ libnet-1.2-rc3/src/libnet_link_linux.c	2014-08-12 21:41:46.569276380 +0200
@@ -30,26 +30,15 @@
 #include <sys/time.h>

 #include <net/if.h>
-#if (__GLIBC__)
 #include <netinet/if_ether.h>
 #include <net/if_arp.h>
-#else
-#include <linux/if_arp.h>
-#include <linux/if_ether.h>
-#endif

 #if (HAVE_PACKET_SOCKET)
 #ifndef SOL_PACKET
 #define SOL_PACKET 263
 #endif  /* SOL_PACKET */
-#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1
 #include <netpacket/packet.h>
 #include <net/ethernet.h>     /* the L2 protocols */
-#else
-#include <asm/types.h>
-#include <linux/if_packet.h>
-#include <linux/if_ether.h>   /* The L2 protocols */
-#endif
 #endif  /* HAVE_PACKET_SOCKET */

 #include "../include/libnet.h"

repo_name: aarf/bkauler

license: unknown


code:
--- libnids-1.24.org/src/Makefile.in	2014-08-12 22:24:04.064280392 +0200
+++ libnids-1.24/src/Makefile.in	2014-08-12 23:08:01.444284562 +0200
@@ -6,7 +6,7 @@
 srcdir		= @srcdir@
 VPATH		= @srcdir@

-install_prefix	=
+install_prefix	= $(DESTDIR)
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
 includedir	= @includedir@


code:
--- libnids-1.24.org/configure	2014-08-12 22:24:04.065280392 +0200
+++ libnids-1.24/configure	2014-08-12 22:25:10.544280497 +0200
@@ -3932,11 +3932,7 @@
      ;;
   esac
 else
-   if test -f ${prefix}/include/pcap.h; then
-     PCAP_CFLAGS="-I${prefix}/include"
-     PCAPLIB="-L${exec_prefix}/lib -lpcap"
-  elif test -f /usr/include/pcap/pcap.h; then
-     PCAP_CFLAGS="-I/usr/include/pcap"
+  if true ; then
      PCAPLIB="-lpcap"
   else
 	TMP=$LIBS


code:
diff --git a/Makefile b/Makefile
index 9359585..0e1a11b 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@ libdir=$(prefix)/lib
 includedir=$(prefix)/include

 CC=gcc
+AR=ar
+RANLIB=ranlib
 WFLAGS=-Wall
 CFLAGS?=-O2
 INCLUDES=-Iinclude
@@ -40,8 +42,8 @@ $(SHAREDLIB): $(OBJS)

 $(STATICLIB): $(OBJS)
 	rm -f $@
-	ar rc $@ $^
-	ranlib $@
+	$(AR) rc $@ $^
+	$(RANLIB) $@

 $(PCFILE): $(PCFILE).in
 	sed s,@prefix@,$(prefix),g $< > $@


code:
--- libpciaccess-0.13.2.orig/src/linux_sysfs.c
+++ libpciaccess-0.13.2/src/linux_sysfs.c
@@ -46,7 +46,7 @@
 #include <errno.h>
 #include <limits.h>

-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
+#if defined(__i386__) || defined(__x86_64__)
 #include <sys/io.h>
 #else
 #define inb(x) -1


code:
#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

path: KEEP/libssh-Makefile


code:
#CFLAGS+=-DAI_NUMERICSERV
#CFLAGS+=-DBROKEN_AES_CTR
#CFLAGS+=-DDEBUG_BUFFER
#CFLAGS+=-DDEBUG_CALLTRACE
#CFLAGS+=-DDEBUG_CRYPTO
#CFLAGS+=-DEWOULDBLOCK
#CFLAGS+=-DHAS_AES
#CFLAGS+=-DHAS_BLOWFISH
#CFLAGS+=-DHAS_DES
#CFLAGS+=-DHAVE_ARGP_H
#CFLAGS+=-DHAVE_CFMAKERAW
#CFLAGS+=-DHAVE_CLOCK_GETTIME
#CFLAGS+=-DHAVE_ECDH
CFLAGS+=-DHAVE_GETADDRINFO
CFLAGS+=-DHAVE_LIBCRYPTO
#CFLAGS+=-DHAVE_LIBGCRYPT
#CFLAGS+=-DHAVE_NTOHLL
CFLAGS+=-DHAVE_OPENSSL_AES_H
CFLAGS+=-DHAVE_OPENSSL_BLOWFISH_H
CFLAGS+=-DHAVE_OPENSSL_DES_H
CFLAGS+=-DHAVE_OPENSSL_ECDH_H
CFLAGS+=-DHAVE_POLL
CFLAGS+=-DHAVE_PTHREAD
CFLAGS+=-DHAVE_PTY_H
CFLAGS+=-DHAVE_SYS_TIME_H
#CFLAGS+=-DHAVE_WSPIAPI_H
#CFLAGS+=-DID_VOID_MAIN
#CFLAGS+=-DKEY
#CFLAGS+=-DKEYS_FOLDER
#CFLAGS+=-DLIBSSH_EXPORTS
#CFLAGS+=-DLIBSSH_LEGACY_0_4
CFLAGS+=-DLIBSSH_STATIC
#CFLAGS+=-DMD5_DIGEST_LEN
#CFLAGS+=-DNSS_BUFLEN_PASSWD
#CFLAGS+=-DOLD_CRYPTO
CFLAGS+=-DOPENSSL_CRYPTO
#CFLAGS+=-DPOLLERR
#CFLAGS+=-DPOLLHUP
#CFLAGS+=-DPOLLIN
#CFLAGS+=-DPOLLNVAL
#CFLAGS+=-DPOLLOUT
#CFLAGS+=-DPOLLPRI
#CFLAGS+=-DPOLLRDBAND
#CFLAGS+=-DPOLLRDNORM
#CFLAGS+=-DPOLLWRBAND
#CFLAGS+=-DPOLLWRNORM
#CFLAGS+=-DSSH_POLL_CTX_CHUNK
#CFLAGS+=-DSTRICT
#CFLAGS+=-DUSE_CHANNEL_SELECT
CFLAGS+=-DWITH_LIBZ
#CFLAGS+=-DWITH_PCAP
CFLAGS+=-DWITH_SERVER
CFLAGS+=-DWITH_SFTP
CFLAGS+=-DWITH_SSH1
#CFLAGS+=-DWORDS_BIGENDIAN
CFLAGS+=-D_GNU_SOURCE
#CFLAGS+=-D_MSC_VER
#CFLAGS+=-D_POSIX_MONOTONIC_CLOCK
#CFLAGS+=-D_WIN32
#CFLAGS+=-D_WIN32_IE
#CFLAGS+=-D__CLASSIC_C__
#CFLAGS+=-D__FUNCTION__
#CFLAGS+=-D__GNUC__
#CFLAGS+=-D__cplusplus
#CFLAGS+=-Dcbc_decrypt
#CFLAGS+=-Dcbc_encrypt
#CFLAGS+=-Dgai_strerror
#CFLAGS+=-Dgid_t
#CFLAGS+=-Dsocket_t
#CFLAGS+=-Dssize_t
#CFLAGS+=-Duid_t


code:
diff -r -u libssh-0.5.0/include/libssh/libssh.h libssh-0.5.0-patched/include/libssh/libssh.h
--- libssh-0.5.0//include/libssh/libssh.h	2011-05-31 16:29:52.000000000 +0200
+++ libssh-0.5.0-patched//include/libssh/libssh.h	2011-07-20 21:54:39.026722018 +0200
@@ -22,6 +22,8 @@
 #ifndef _LIBSSH_H
 #define _LIBSSH_H

+#include <fcntl.h>
+
 #if defined _WIN32 || defined __CYGWIN__
   #ifdef LIBSSH_STATIC
     #define LIBSSH_API


code:
fixes a bug in libtool versions < 2.4/1.3293
the sysroot code returns =/lib/libfoo.so instead of $lt_sysroot/lib/libfoo.so

--- libXScrnSaver-1.2.2/libtool
+++ ../libsm/libSM-1.2.2/libtool
@@ -9684,7 +9701,8 @@
 	      *.la)
 		func_basename "$deplib"
 		name="$func_basename_result"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		func_resolve_sysroot "$deplib"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
 		test -z "$libdir" && \
 		  func_fatal_error "\`$deplib' is not a valid libtool archive"
 		newdependency_libs+=" ${lt_sysroot:+=}$libdir/$name"