#
# Makefile for dynamically linked SOCKS module for Python
#
# $Id: Makefile,v 1.1 1994/07/07 23:16:23 connolly Exp $
#
# Author:
#   Daniel W. Connolly <connolly@hal.com>
#
# Successfully built on:
#  SunOS ulua 4.1.3 3 sun4c (from uname -a), gcc version 2.5.8
#

# === Variables that you just *have* to customize manually ===

# The prefix used by "make inclinstall libainstall" of core python
installdir=	/u/connolly/contrib/

# The exec_prefix used by the same
exec_installdir=$(installdir)

# SOCKS installation
SOCKS_INSTALL = /usr/tools/socks/0
SOCKSLIB      = $(SOCKS_INSTALL)/lib/libsocks.a

# libresolve on your system
LIBRESOLV     = /usr/lib/libresolv.a

LIBS = $(SOCKSLIB) $(LIBRESOLV)

CC=gcc

#
# You shouldn't have to mess with anything below...
# (but I have only built this on one platform...)
#

MODULE = SOCKS

OBJS = socksmodule.o

INCLUDEPY=	$(installdir)/include/Py
LIBP=		$(exec_installdir)/lib/python
LIBPL=		$(LIBP)/lib

# You may want to change this to -O
OPT=		-g

DEFS=		-DHAVE_CONFIG_H

# Add more -I and -D options here
CFLAGS=		$(OPT) -I$(INCLUDEPY) -I$(LIBPL) $(DEFS)


$(MODULE)module.so: $(OBJS)
	ld -o $@ $(OBJS) $(LIBS)


clean:
	rm -rf *.o *~
	rm *.so
