# Generated automatically from Makefile.pre by makesetup.
# Generated automatically from Makefile.pre.in by configure.
# META-NOTE: this note is different from the note in the other Makefiles!
# NOTE: Makefile.pre.in is converted into Makefile.pre by the configure
# script in the toplevel directory or by ../config.status.
# Makefile.pre is converted into Makefile by running the makesetup
# script in the source directory.  Once Makefile exists, it can be
# brought up to date by running "make Makefile".  (The makesetup also
# creates config.c from config.c.in in the source directory.)

# === Variables set by makesetup ===

MODOBJS=	  posixmodule.o  signalmodule.o  arraymodule.o  mathmodule.o  regexmodule.o regexpr.o  stropmodule.o  structmodule.o  timemodule.o  fcntlmodule.o  pwdmodule.o  grpmodule.o  cryptmodule.o  selectmodule.o  socketmodule.o  dbmmodule.o  audioop.o  imageop.o  rgbimgmodule.o  md5module.o md5c.o  timingmodule.o  tkintermodule.o  rotormodule.o  gdbmmodule.o  binascii.o
MODLIBS=	$(LOCALMODLIBS) $(BASEMODLIBS)

# === Variables set by configure ===

srcdir=		.

CC=		cc
RANLIB=		ranlib
AR=		ar

OPT=		-O

DEFS=		-DHAVE_CONFIG_H
LIBS=		-ldld 
LIBM=		-lm
LIBC=		

# Machine-dependent subdirectories
MACHDEP=	hp-uxA

# Install prefix for architecture-independent files
prefix=		/usr/local

# Install prefix for architecture-dependent files
exec_prefix=	${prefix}

# Symbols used for using shared libraries
SO=		.sl
LDSHARED=	ld -b
CCSHARED=	+z
LINKFORSHARED=	-Wl,-E
DESTSHARED=	$(exec_prefix)/lib/python/$(MACHDEP)

# === Variables that are customizable by hand or by inclusion in Setup ===

LINKCC=		$(CC)
INCLDIR=	$(srcdir)/../Include
CFLAGS=		$(OPT) -I$(INCLDIR) -I.. $(DEFS)

MKDEP=		mkdep
SHELL=		/bin/sh

MAKESETUP=	$(srcdir)/makesetup

# (The makesetup script inserts all variable definitions found
# found in the Setup file just below the following line.
# This means that the Setup file can override any of the definitions
# given before this point, but not any given below.
# The script insert the definitions in reverse order,
# for the benefits of independent extensions.)
# === Definitions added by makesetup ===

LOCALMODLIBS=     -lm                  -L/usr/local/lib -ltk4.0 -ltcl7.4 -L/usr/lib/X11R5 -lX11   -L/usr/local/lib -lgdbm 
BASEMODLIBS=
TKPATH=:$(DESTLIB)/tkinter
PYTHONPATH=$(COREPYTHONPATH)
COREPYTHONPATH=.$(SITEPATH)$(DESTPATH)$(TESTPATH)$(MACHDEPPATH)$(STDWINPATH)$(TKPATH)
MACHDEPPATH=:$(DESTLIB)/$(MACHDEP)
TESTPATH=:$(DESTLIB)/test
DESTPATH=:$(DESTLIB)
SITEPATH=
DESTLIB=$(prefix)/lib/python


# === Fixed definitions ===

OBJS=		$(MODOBJS)

ADDOBJS=	main.o config.o getpath.o

LIB=		libModules.a

MYLIBS=		$(LIB) \
		../Python/libPython.a \
		../Objects/libObjects.a \
		../Parser/libParser.a

SYSLIBS=	$(LIBM) $(LIBC)


# === Rules ===

all:		$(LIB) ../python sharedmods

$(LIB):		$& $(OBJS) Makefile
		-rm -f $(LIB)
		$(AR) cr $(LIB) $(OBJS)
		$(RANLIB) $(LIB)

../python:	$(MYLIBS) $(ADDOBJS) Makefile
		$(LINKCC) $(OPT) $(LINKFORSHARED) $(ADDOBJS) \
		      $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python
		mv python ../python

clean:
		-rm -f *.o python core *~ [@,#]* *.old *.orig *.rej

clobber:	clean
		-rm -f *.a tags TAGS config.c glmodule.c Makefile.pre
		-rm -f *.so so_locations

getpath.o:	getpath.c Makefile
		$(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
		      $(srcdir)/getpath.c

config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup
		$(SHELL) $(MAKESETUP) Setup

Setup:
		cp $(srcdir)/Setup.in Setup

Makefile.pre:	Makefile.pre.in ../config.status
		(cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \
		$(SHELL) config.status)

depend:
		$(MKDEP) $(CFLAGS) `echo $(OBJS) | tr ' ' '\012' | \
					sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`

.PRECIOUS:	../python

glmodule.c:	$(srcdir)/cgen.py $(srcdir)/cstubs
		python $(srcdir)/cgen.py <$(srcdir)/cstubs >glmodule.c

almodule.o: almodule.c
arraymodule.o: arraymodule.c
audioop.o: audioop.c
cdmodule.o: cdmodule.c
clmodule.o: clmodule.c
dbmmodule.o: dbmmodule.c
fcntlmodule.o: fcntlmodule.c
flmodule.o: flmodule.c
fmmodule.o: fmmodule.c
glmodule.o: glmodule.c
imageop.o: imageop.c
imgfile.o: imgfile.c
main.o: main.c
mathmodule.o: mathmodule.c
md5c.o: md5c.c
md5module.o: md5module.c
mpzmodule.o: mpzmodule.c
nismodule.o: nismodule.c
parsermodule.o: parsermodule.c
posixmodule.o: posixmodule.c
pwdmodule.o: pwdmodule.c
regexmodule.o: regexmodule.c
regexpr.o: regexpr.c
rgbimgmodule.o: rgbimgmodule.c
rotormodule.o: rotormodule.c
selectmodule.o: selectmodule.c
sgimodule.o: sgimodule.c
socketmodule.o: socketmodule.c
stdwinmodule.o: stdwinmodule.c
stropmodule.o: stropmodule.c
structmodule.o: structmodule.c
sunaudiodev.o: sunaudiodev.c
svmodule.o: svmodule.c
threadmodule.o: threadmodule.c
timemodule.o: timemodule.c
timingmodule.o: timingmodule.c
xxmodule.o: xxmodule.c
yuvconvert.o: yuvconvert.c

# Rules to build and install all shared modules
sharedmods:	$(SHAREDMODS)
sharedinstall:	$(DESTSHARED) $(SHAREDMODS)
		-for i in dummy $(SHAREDMODS); do \
		    if test -f $$i; then mv $$i $(DESTSHARED)/$$i; fi; done

$(DESTSHARED):
		mkdir $(DESTSHARED)

# Stuff is appended here by makesetup and make depend
socketmodule.o: $(srcdir)/socketmodule.c; $(CC) $(CFLAGS)  -c $(srcdir)/socketmodule.c
socketmodule$(SO):  .o; $(LDSHARED)  .o  -o socketmodule$(SO)
dbmmodule.o: $(srcdir)/dbmmodule.c; $(CC) $(CFLAGS)  -c $(srcdir)/dbmmodule.c
dbmmodule$(SO):  dbmmodule.o; $(LDSHARED)  dbmmodule.o  -o dbmmodule$(SO)
audioop.o: $(srcdir)/audioop.c; $(CC) $(CFLAGS)  -c $(srcdir)/audioop.c
audioop$(SO):  audioop.o; $(LDSHARED)  audioop.o  -o audioop$(SO)
imageop.o: $(srcdir)/imageop.c; $(CC) $(CFLAGS)  -c $(srcdir)/imageop.c
imageop$(SO):  imageop.o; $(LDSHARED)  imageop.o  -o imageop$(SO)
rgbimgmodule.o: $(srcdir)/rgbimgmodule.c; $(CC) $(CFLAGS)  -c $(srcdir)/rgbimgmodule.c
rgbimgmodule$(SO):  rgbimgmodule.o; $(LDSHARED)  rgbimgmodule.o  -o rgbimgmodule$(SO)
md5module.o: $(srcdir)/md5module.c; $(CC) $(CFLAGS)  -c $(srcdir)/md5module.c
md5c.o: $(srcdir)/md5c.c; $(CC) $(CFLAGS)  -c $(srcdir)/md5c.c
md5module$(SO):  md5module.o md5c.o; $(LDSHARED)  md5module.o md5c.o  -o md5module$(SO)
timingmodule.o: $(srcdir)/timingmodule.c; $(CC) $(CFLAGS)  -c $(srcdir)/timingmodule.c
timingmodule$(SO):  timingmodule.o; $(LDSHARED)  timingmodule.o  -o timingmodule$(SO)
tkintermodule.o: $(srcdir)/tkintermodule.c; $(CC) $(CFLAGS)  -I/share/bins/incl -I/usr/include/X11R5 -c $(srcdir)/tkintermodule.c
tkintermodule$(SO):  tkintermodule.o; $(LDSHARED)  tkintermodule.o  -L/usr/local/lib -ltk4.0 -ltcl7.4 -lX11 -o tkintermodule$(SO)
rotormodule.o: $(srcdir)/rotormodule.c; $(CC) $(CFLAGS)  -c $(srcdir)/rotormodule.c
rotormodule$(SO):  rotormodule.o; $(LDSHARED)  rotormodule.o  -o rotormodule$(SO)
gdbmmodule.o: $(srcdir)/gdbmmodule.c; $(CC) $(CFLAGS)  -I/usr/local/include -c $(srcdir)/gdbmmodule.c
gdbmmodule$(SO):  gdbmmodule.o; $(LDSHARED)  gdbmmodule.o  -L/usr/local/lib -lgdbm -o gdbmmodule$(SO)
binascii.o: $(srcdir)/binascii.c; $(CC) $(CFLAGS)  -c $(srcdir)/binascii.c
binascii$(SO):  binascii.o; $(LDSHARED)  binascii.o  -o binascii$(SO)
