# 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.) # Interpreter version number, for library destination pathnames VERSION= 1.4 # === Variables set by makesetup === MODOBJS= posixmodule.o signalmodule.o MODLIBS= $(LOCALMODLIBS) $(BASEMODLIBS) # === Variables set by configure === srcdir= . CC= gcc RANLIB= ranlib AR= ar OPT= -O LDFLAGS= -L/usr/include/readline DEFS= -DHAVE_CONFIG_H LIBS= -lieee -ldl -lreadline /usr/lib/libtermcap.a LIBM= -lm LIBC= # Machine-dependent subdirectories MACHDEP= linux-alpha # Install prefix for architecture-independent files prefix= /usr # Install prefix for architecture-dependent files exec_prefix= ${prefix} # Expanded directories BINDIR= $(exec_prefix)/bin LIBDIR= $(exec_prefix)/lib MANDIR= $(prefix)/man INCLUDEDIR= $(prefix)/include SCRIPTDIR= $(prefix)/lib # Detailed destination directories BINLIBDEST= $(LIBDIR)/python$(VERSION) LIBDEST= $(SCRIPTDIR)/python$(VERSION) INCLUDEPY= $(INCLUDEDIR)/python$(VERSION) LIBP= $(LIBDIR)/python$(VERSION) # Symbols used for using shared libraries SO= .so LDSHARED= gcc -shared CCSHARED= -fPIC LINKFORSHARED= -rdynamic DESTSHARED= $(BINLIBDEST)/sharedmodules # Portable install script (configure doesn't always guess right) INSTALL= ./../install-sh -c INSTALL_PROGRAM=${INSTALL} -m 755 INSTALL_DATA= ${INSTALL} -m 644 # Shared libraries must be installed with executable mode on some systems; # rather than figuring out exactly which, we always give them executable mode. # Also, making them read-only seems to be a good idea... INSTALL_SHARED= ${INSTALL} -m 555 # === Variables that are customizable by hand or by inclusion in Setup === LINKCC= $(CC) INCLDIR= $(srcdir)/../Include CONFIGINCLDIR= .. CFLAGS= $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(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= BASEMODLIBS= SHAREDMODS= arraymodule$(SO) cmathmodule$(SO) mathmodule$(SO) regexmodule$(SO) stropmodule$(SO) structmodule$(SO) timemodule$(SO) operator$(SO) fcntlmodule$(SO) pwdmodule$(SO) grpmodule$(SO) cryptmodule$(SO) selectmodule$(SO) socketmodule$(SO) errnomodule$(SO) dbmmodule$(SO) termios$(SO) audioop$(SO) imageop$(SO) rgbimgmodule$(SO) md5module$(SO) timingmodule$(SO) _tkinter$(SO) rotormodule$(SO) syslogmodule$(SO) cursesmodule$(SO) gdbmmodule$(SO) bsddbmodule$(SO) soundex$(SO) binascii$(SO) parsermodule$(SO) TKPATH=:$(DESTLIB)/tkinter PYTHONPATH=$(COREPYTHONPATH) COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(STDWINPATH)$(TKPATH) MACHDEPPATH=:$(DESTLIB)/$(MACHDEP):$(MACHDESTLIB)/sharedmodules TESTPATH=:$(DESTLIB)/test SITEPATH= DESTPATH=$(DESTLIB) MACHDESTLIB=$(BINLIBDEST) DESTLIB=$(LIBDEST) # === 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 asharedmodule: $(ASHAREDMODULE)$(SO) $(ASHAREDMODULE)$(SO): $(ASHAREDMODULESOBS) $(LDSHARED) $(LDFLAGS) -o $(ASHAREDMODULE)$(SO) $(ASHAREDMODULESOBS) \ $(ASHAREDMODULESEXTRA) $(LIB): $& $(OBJS) Makefile -rm -f $(LIB) $(AR) cr $(LIB) $(OBJS) $(RANLIB) $(LIB) ../python: $(MYLIBS) $(ADDOBJS) Makefile $(LINKCC) $(LDFLAGS) $(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 *.sl so_locations getpath.o: getpath.c Makefile $(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ -DPREFIX='"$(prefix)"' \ -DEXEC_PREFIX='"$(exec_prefix)"' \ $(srcdir)/getpath.c config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup Setup.local $(SHELL) $(MAKESETUP) Setup Setup.local Setup: cp $(srcdir)/Setup.in Setup Setup.local: echo "# Edit this file for local setup changes" >Setup.local 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 errnomodule.o: errnomodule.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 operator.o: operator.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 X $(SHAREDMODS); do \ if test $$i != X; \ then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \ fi; \ done # Install a shared module from outside of setup asharedinstall: $(DESTSHARED) $(ASHAREDMODULE)$(SO) -for i in dummy $(ASHAREDMODULE)$(SO); do \ if test -f $$i; then mv $$i $(DESTSHARED)/$$i; fi; done # This is handy when modules need to know where the destination directory is: echodestshared: $(DESTSHARED) echo $(DESTSHARED) DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED) $(DESTSHARED): @for i in $(DESTDIRS); \ do \ if test ! -d $$i; then \ echo "Creating directory $$i"; \ mkdir $$i; \ chmod 755 $$i; \ else true; \ fi; \ done # Stuff is appended here by makesetup and make depend # Rules appended by makedepend posixmodule.o: $(srcdir)/posixmodule.c; $(CC) $(CFLAGS) -c $(srcdir)/posixmodule.c posixmodule$(SO): posixmodule.o; $(LDSHARED) posixmodule.o -o posixmodule$(SO) signalmodule.o: $(srcdir)/signalmodule.c; $(CC) $(CFLAGS) -c $(srcdir)/signalmodule.c signalmodule$(SO): signalmodule.o; $(LDSHARED) signalmodule.o -o signalmodule$(SO) arraymodule.o: $(srcdir)/arraymodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/arraymodule.c arraymodule$(SO): arraymodule.o; $(LDSHARED) arraymodule.o -o arraymodule$(SO) cmathmodule.o: $(srcdir)/cmathmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/cmathmodule.c cmathmodule$(SO): cmathmodule.o; $(LDSHARED) cmathmodule.o -o cmathmodule$(SO) mathmodule.o: $(srcdir)/mathmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/mathmodule.c mathmodule$(SO): mathmodule.o; $(LDSHARED) mathmodule.o -o mathmodule$(SO) regexmodule.o: $(srcdir)/regexmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/regexmodule.c regexpr.o: $(srcdir)/regexpr.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/regexpr.c regexmodule$(SO): regexmodule.o regexpr.o; $(LDSHARED) regexmodule.o regexpr.o -o regexmodule$(SO) stropmodule.o: $(srcdir)/stropmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/stropmodule.c stropmodule$(SO): stropmodule.o; $(LDSHARED) stropmodule.o -o stropmodule$(SO) structmodule.o: $(srcdir)/structmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/structmodule.c structmodule$(SO): structmodule.o; $(LDSHARED) structmodule.o -o structmodule$(SO) timemodule.o: $(srcdir)/timemodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/timemodule.c timemodule$(SO): timemodule.o; $(LDSHARED) timemodule.o -o timemodule$(SO) operator.o: $(srcdir)/operator.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/operator.c operator$(SO): operator.o; $(LDSHARED) operator.o -o operator$(SO) fcntlmodule.o: $(srcdir)/fcntlmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/fcntlmodule.c fcntlmodule$(SO): fcntlmodule.o; $(LDSHARED) fcntlmodule.o -o fcntlmodule$(SO) pwdmodule.o: $(srcdir)/pwdmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/pwdmodule.c pwdmodule$(SO): pwdmodule.o; $(LDSHARED) pwdmodule.o -o pwdmodule$(SO) grpmodule.o: $(srcdir)/grpmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/grpmodule.c grpmodule$(SO): grpmodule.o; $(LDSHARED) grpmodule.o -o grpmodule$(SO) cryptmodule.o: $(srcdir)/cryptmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/cryptmodule.c cryptmodule$(SO): cryptmodule.o; $(LDSHARED) cryptmodule.o -lcrypt -o cryptmodule$(SO) selectmodule.o: $(srcdir)/selectmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/selectmodule.c selectmodule$(SO): selectmodule.o; $(LDSHARED) selectmodule.o -o selectmodule$(SO) socketmodule.o: $(srcdir)/socketmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/socketmodule.c socketmodule$(SO): socketmodule.o; $(LDSHARED) socketmodule.o -o socketmodule$(SO) errnomodule.o: $(srcdir)/errnomodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/errnomodule.c errnomodule$(SO): errnomodule.o; $(LDSHARED) errnomodule.o -o errnomodule$(SO) dbmmodule.o: $(srcdir)/dbmmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/dbmmodule.c dbmmodule$(SO): dbmmodule.o; $(LDSHARED) dbmmodule.o -ldb -o dbmmodule$(SO) termios.o: $(srcdir)/termios.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/termios.c termios$(SO): termios.o; $(LDSHARED) termios.o -o termios$(SO) audioop.o: $(srcdir)/audioop.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/audioop.c audioop$(SO): audioop.o; $(LDSHARED) audioop.o -o audioop$(SO) imageop.o: $(srcdir)/imageop.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/imageop.c imageop$(SO): imageop.o; $(LDSHARED) imageop.o -o imageop$(SO) rgbimgmodule.o: $(srcdir)/rgbimgmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/rgbimgmodule.c rgbimgmodule$(SO): rgbimgmodule.o; $(LDSHARED) rgbimgmodule.o -o rgbimgmodule$(SO) md5module.o: $(srcdir)/md5module.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/md5module.c md5c.o: $(srcdir)/md5c.c; $(CC) $(CCSHARED) $(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) $(CCSHARED) $(CFLAGS) -c $(srcdir)/timingmodule.c timingmodule$(SO): timingmodule.o; $(LDSHARED) timingmodule.o -o timingmodule$(SO) _tkinter.o: $(srcdir)/_tkinter.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/_tkinter.c _tkinter$(SO): _tkinter.o; $(LDSHARED) _tkinter.o -ltk4.2 -ltcl7.6 -L/usr/X11R6/lib -lX11 -o _tkinter$(SO) rotormodule.o: $(srcdir)/rotormodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/rotormodule.c rotormodule$(SO): rotormodule.o; $(LDSHARED) rotormodule.o -o rotormodule$(SO) syslogmodule.o: $(srcdir)/syslogmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/syslogmodule.c syslogmodule$(SO): syslogmodule.o; $(LDSHARED) syslogmodule.o -o syslogmodule$(SO) cursesmodule.o: $(srcdir)/cursesmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -I/usr/include/ncurses -c $(srcdir)/cursesmodule.c cursesmodule$(SO): cursesmodule.o; $(LDSHARED) cursesmodule.o -lncurses -o cursesmodule$(SO) gdbmmodule.o: $(srcdir)/gdbmmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -I/usr/local/include -c $(srcdir)/gdbmmodule.c gdbmmodule$(SO): gdbmmodule.o; $(LDSHARED) gdbmmodule.o -L/usr/local/lib -lgdbm -o gdbmmodule$(SO) bsddbmodule.o: $(srcdir)/bsddbmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/bsddbmodule.c bsddbmodule$(SO): bsddbmodule.o; $(LDSHARED) bsddbmodule.o -ldb -o bsddbmodule$(SO) soundex.o: $(srcdir)/soundex.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/soundex.c soundex$(SO): soundex.o; $(LDSHARED) soundex.o -o soundex$(SO) binascii.o: $(srcdir)/binascii.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/binascii.c binascii$(SO): binascii.o; $(LDSHARED) binascii.o -o binascii$(SO) parsermodule.o: $(srcdir)/parsermodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/parsermodule.c parsermodule$(SO): parsermodule.o; $(LDSHARED) parsermodule.o -o parsermodule$(SO)