1994-08-01 11:34:53 +00:00
|
|
|
# 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.)
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1994-08-01 11:34:53 +00:00
|
|
|
# === Variables set by makesetup ===
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1995-01-02 19:30:30 +00:00
|
|
|
MODOBJS= _MODOBJS_
|
|
|
|
MODLIBS= _MODLIBS_
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1994-08-01 11:34:53 +00:00
|
|
|
# === Variables set by configure ===
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1997-07-19 19:39:57 +00:00
|
|
|
VERSION= @VERSION@
|
1994-01-02 00:26:09 +00:00
|
|
|
srcdir= @srcdir@
|
|
|
|
VPATH= @srcdir@
|
|
|
|
|
1999-12-16 17:52:08 +00:00
|
|
|
@SET_CXX@
|
1994-01-02 00:26:09 +00:00
|
|
|
CC= @CC@
|
|
|
|
RANLIB= @RANLIB@
|
1994-08-01 11:34:53 +00:00
|
|
|
AR= @AR@
|
|
|
|
|
1995-04-10 11:37:18 +00:00
|
|
|
OPT= @OPT@
|
1996-08-19 21:59:32 +00:00
|
|
|
LDFLAGS= @LDFLAGS@
|
1997-01-28 02:21:24 +00:00
|
|
|
LDLAST= @LDLAST@
|
1997-10-09 20:24:13 +00:00
|
|
|
SGI_ABI= @SGI_ABI@
|
1995-04-10 11:37:18 +00:00
|
|
|
|
1994-01-02 00:26:09 +00:00
|
|
|
DEFS= @DEFS@
|
|
|
|
LIBS= @LIBS@
|
1994-08-01 11:34:53 +00:00
|
|
|
LIBM= @LIBM@
|
|
|
|
LIBC= @LIBC@
|
|
|
|
|
1995-08-08 14:18:12 +00:00
|
|
|
# Machine-dependent subdirectories
|
|
|
|
MACHDEP= @MACHDEP@
|
|
|
|
|
1995-01-02 19:30:30 +00:00
|
|
|
# Install prefix for architecture-independent files
|
|
|
|
prefix= @prefix@
|
|
|
|
|
|
|
|
# Install prefix for architecture-dependent files
|
|
|
|
exec_prefix= @exec_prefix@
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1996-07-31 17:37:07 +00:00
|
|
|
# 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)
|
|
|
|
|
1994-09-12 10:42:20 +00:00
|
|
|
# Symbols used for using shared libraries
|
|
|
|
SO= @SO@
|
|
|
|
LDSHARED= @LDSHARED@
|
|
|
|
CCSHARED= @CCSHARED@
|
|
|
|
LINKFORSHARED= @LINKFORSHARED@
|
1997-10-20 23:20:32 +00:00
|
|
|
DESTSHARED= $(BINLIBDEST)/lib-dynload
|
1994-09-12 10:42:20 +00:00
|
|
|
|
1996-05-24 21:14:44 +00:00
|
|
|
# Portable install script (configure doesn't always guess right)
|
|
|
|
INSTALL= @srcdir@/../install-sh -c
|
1996-07-30 16:53:14 +00:00
|
|
|
INSTALL_PROGRAM=${INSTALL} -m 755
|
1996-05-24 21:14:44 +00:00
|
|
|
INSTALL_DATA= ${INSTALL} -m 644
|
1996-08-20 19:46:35 +00:00
|
|
|
# Shared libraries must be installed with executable mode on some systems;
|
|
|
|
# rather than figuring out exactly which, we always give them executable mode.
|
1996-09-11 23:13:07 +00:00
|
|
|
# Also, making them read-only seems to be a good idea...
|
|
|
|
INSTALL_SHARED= ${INSTALL} -m 555
|
1996-05-24 21:14:44 +00:00
|
|
|
|
1995-09-30 17:01:49 +00:00
|
|
|
# === Variables that are customizable by hand or by inclusion in Setup ===
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1997-08-18 16:00:04 +00:00
|
|
|
LINKCC= @LINKCC@
|
1994-08-01 11:34:53 +00:00
|
|
|
INCLDIR= $(srcdir)/../Include
|
1996-07-21 02:35:58 +00:00
|
|
|
CONFIGINCLDIR= ..
|
|
|
|
CFLAGS= $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS)
|
1994-01-02 00:26:09 +00:00
|
|
|
|
|
|
|
MKDEP= mkdep
|
|
|
|
SHELL= /bin/sh
|
|
|
|
|
1994-08-01 11:34:53 +00:00
|
|
|
MAKESETUP= $(srcdir)/makesetup
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1998-08-04 22:53:56 +00:00
|
|
|
# (The makesetup script inserts all variable definitions
|
1995-09-30 17:01:49 +00:00
|
|
|
# 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 ===
|
|
|
|
|
1994-01-02 00:26:09 +00:00
|
|
|
# === Fixed definitions ===
|
|
|
|
|
1997-07-19 19:39:57 +00:00
|
|
|
FIXOBJS= config.o getpath.o main.o getbuildinfo.o
|
|
|
|
OBJS= $(MODOBJS) $(FIXOBJS)
|
1995-08-04 04:20:45 +00:00
|
|
|
|
1999-12-16 17:52:08 +00:00
|
|
|
#MAINOBJ= python.o
|
|
|
|
MAINOBJ= @MAINOBJ@
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1994-08-01 11:34:53 +00:00
|
|
|
SYSLIBS= $(LIBM) $(LIBC)
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1997-07-19 19:39:57 +00:00
|
|
|
LIBRARY= ../libpython$(VERSION).a
|
1999-01-27 17:53:11 +00:00
|
|
|
LDLIBRARY= ../@LDLIBRARY@
|
1994-01-02 00:26:09 +00:00
|
|
|
|
|
|
|
# === Rules ===
|
|
|
|
|
1997-08-18 14:23:13 +00:00
|
|
|
all: $(OBJS)
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1997-07-19 19:39:57 +00:00
|
|
|
# This target is used by the master Makefile to add the objects to the library.
|
1997-08-20 22:45:52 +00:00
|
|
|
# To deal with the conflict between signalmodule.o and
|
|
|
|
# sigcheck.o+intrcheck.o, we remove the latter two if we have the former.
|
1997-07-25 22:35:24 +00:00
|
|
|
add2lib: $(OBJS)
|
1998-10-07 22:51:56 +00:00
|
|
|
-if test -f hassignal; \
|
|
|
|
then echo removing sigcheck.o intrcheck.o; \
|
|
|
|
$(AR) d $(LIBRARY) sigcheck.o intrcheck.o 2>/dev/null; \
|
|
|
|
else echo leaving sigcheck.o intrcheck.o in; fi
|
1997-07-19 19:39:57 +00:00
|
|
|
$(AR) cr $(LIBRARY) $(OBJS)
|
|
|
|
touch add2lib
|
|
|
|
|
1997-08-22 20:53:47 +00:00
|
|
|
# Use ``EXE=.exe'' for Unix emulations on DOS/Windows
|
|
|
|
EXE=
|
|
|
|
|
1997-07-19 19:39:57 +00:00
|
|
|
# This target is used by the master Makefile to link the final binary.
|
|
|
|
link: $(MAINOBJ)
|
1997-12-18 23:55:32 +00:00
|
|
|
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) $(MAINOBJ) \
|
1999-01-27 17:53:11 +00:00
|
|
|
$(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python $(LDLAST)
|
1997-08-22 20:53:47 +00:00
|
|
|
mv python$(EXE) ../python$(EXE)
|
1994-01-02 00:26:09 +00:00
|
|
|
|
|
|
|
clean:
|
1999-04-12 16:42:13 +00:00
|
|
|
-rm -f *.o python$(EXE) core *~ [@,#]* *.old *.orig *.rej
|
|
|
|
-rm -f add2lib hassignal
|
1994-01-02 00:26:09 +00:00
|
|
|
|
|
|
|
clobber: clean
|
1998-05-14 02:33:57 +00:00
|
|
|
-rm -f *.a tags TAGS config.c Makefile.pre
|
1996-08-08 19:07:46 +00:00
|
|
|
-rm -f *.so *.sl so_locations
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1995-08-04 04:20:45 +00:00
|
|
|
getpath.o: getpath.c Makefile
|
|
|
|
$(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
|
1996-06-12 04:20:27 +00:00
|
|
|
-DPREFIX='"$(prefix)"' \
|
|
|
|
-DEXEC_PREFIX='"$(exec_prefix)"' \
|
1997-04-11 17:04:49 +00:00
|
|
|
-DVERSION='"$(VERSION)"' \
|
|
|
|
-DVPATH='"$(VPATH)"' \
|
1995-08-04 04:20:45 +00:00
|
|
|
$(srcdir)/getpath.c
|
|
|
|
|
1997-07-19 19:39:57 +00:00
|
|
|
# When the configuration changes, we remove the library, so that it
|
|
|
|
# gets remade from scratch; this ensures to remove modules that are no
|
|
|
|
# longer pertinent (but that were in a previous configuration).
|
1997-12-04 00:48:27 +00:00
|
|
|
config.c Makefile: Makefile.pre config.c.in $(MAKESETUP)
|
2000-06-30 16:04:18 +00:00
|
|
|
config.c Makefile: Setup.config Setup Setup.local
|
1997-12-04 00:48:27 +00:00
|
|
|
config.c Makefile:
|
1997-07-19 19:39:57 +00:00
|
|
|
-rm -f $(LIBRARY)
|
2000-06-30 16:04:18 +00:00
|
|
|
$(SHELL) $(MAKESETUP) Setup.config Setup.local Setup
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1998-10-07 22:51:56 +00:00
|
|
|
hassignal:
|
|
|
|
-rm -f hassignal
|
|
|
|
-for i in $(OBJS); do \
|
|
|
|
if test "$$i" = "signalmodule.o"; then \
|
|
|
|
echo yes >hassignal; break; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
2000-08-31 16:56:15 +00:00
|
|
|
Setup: $(srcdir)/Setup.in
|
|
|
|
@if [ -f Setup ] ; then \
|
2000-08-31 21:53:03 +00:00
|
|
|
echo; \
|
|
|
|
echo "----------------------------------------------"; \
|
2000-09-01 02:40:11 +00:00
|
|
|
echo "Modules/Setup.in is newer than Modules/Setup;"; \
|
2000-08-31 21:53:03 +00:00
|
|
|
echo "check to make sure you have all the updates"; \
|
|
|
|
echo "you need in your Setup file."; \
|
|
|
|
echo "----------------------------------------------"; \
|
|
|
|
echo; \
|
2000-08-31 16:56:15 +00:00
|
|
|
else (set -x; cp $(srcdir)/Setup.in Setup); fi
|
|
|
|
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1996-09-11 23:13:07 +00:00
|
|
|
Setup.local:
|
|
|
|
echo "# Edit this file for local setup changes" >Setup.local
|
|
|
|
|
1994-08-01 11:34:53 +00:00
|
|
|
Makefile.pre: Makefile.pre.in ../config.status
|
|
|
|
(cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \
|
|
|
|
$(SHELL) config.status)
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1994-08-01 11:34:53 +00:00
|
|
|
depend:
|
|
|
|
$(MKDEP) $(CFLAGS) `echo $(OBJS) | tr ' ' '\012' | \
|
|
|
|
sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`
|
|
|
|
|
1999-03-23 19:00:55 +00:00
|
|
|
.PRECIOUS: ../python$(EXE)
|
1994-08-01 11:34:53 +00:00
|
|
|
|
|
|
|
glmodule.c: $(srcdir)/cgen.py $(srcdir)/cstubs
|
|
|
|
python $(srcdir)/cgen.py <$(srcdir)/cstubs >glmodule.c
|
|
|
|
|
|
|
|
almodule.o: almodule.c
|
|
|
|
arraymodule.o: arraymodule.c
|
1994-08-05 13:44:50 +00:00
|
|
|
audioop.o: audioop.c
|
1994-08-01 11:34:53 +00:00
|
|
|
cdmodule.o: cdmodule.c
|
1997-04-29 15:41:53 +00:00
|
|
|
cgensupport.o: cgensupport.c
|
1994-08-01 11:34:53 +00:00
|
|
|
clmodule.o: clmodule.c
|
2000-03-10 23:12:33 +00:00
|
|
|
_codecsmodule.o: _codecsmodule.c
|
1994-08-01 11:34:53 +00:00
|
|
|
dbmmodule.o: dbmmodule.c
|
1996-07-31 22:43:38 +00:00
|
|
|
errnomodule.o: errnomodule.c
|
1994-08-01 11:34:53 +00:00
|
|
|
fcntlmodule.o: fcntlmodule.c
|
|
|
|
flmodule.o: flmodule.c
|
|
|
|
fmmodule.o: fmmodule.c
|
|
|
|
glmodule.o: glmodule.c
|
1994-08-05 13:44:50 +00:00
|
|
|
imageop.o: imageop.c
|
|
|
|
imgfile.o: imgfile.c
|
1995-08-04 04:20:45 +00:00
|
|
|
main.o: main.c
|
1994-08-01 11:34:53 +00:00
|
|
|
mathmodule.o: mathmodule.c
|
|
|
|
md5c.o: md5c.c
|
|
|
|
md5module.o: md5module.c
|
|
|
|
mpzmodule.o: mpzmodule.c
|
|
|
|
nismodule.o: nismodule.c
|
1996-07-31 22:43:38 +00:00
|
|
|
operator.o: operator.c
|
1994-08-01 11:34:53 +00:00
|
|
|
parsermodule.o: parsermodule.c
|
|
|
|
posixmodule.o: posixmodule.c
|
|
|
|
pwdmodule.o: pwdmodule.c
|
|
|
|
regexmodule.o: regexmodule.c
|
|
|
|
regexpr.o: regexpr.c
|
1996-12-18 18:37:27 +00:00
|
|
|
resource.o: resource.c
|
1994-08-01 11:34:53 +00:00
|
|
|
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
|
1994-08-05 13:44:50 +00:00
|
|
|
sunaudiodev.o: sunaudiodev.c
|
1994-08-01 11:34:53 +00:00
|
|
|
svmodule.o: svmodule.c
|
|
|
|
threadmodule.o: threadmodule.c
|
|
|
|
timemodule.o: timemodule.c
|
|
|
|
timingmodule.o: timingmodule.c
|
2000-03-10 23:12:33 +00:00
|
|
|
unicodedata.o: unicodedata.c unicodedatabase.o
|
|
|
|
unicodedatabase.o: unicodedatabase.c unicodedatabase.h
|
2000-06-28 16:42:14 +00:00
|
|
|
ucnhash.o: ucnhash.c
|
1994-08-01 11:34:53 +00:00
|
|
|
xxmodule.o: xxmodule.c
|
|
|
|
yuvconvert.o: yuvconvert.c
|
|
|
|
|
1994-09-12 10:42:20 +00:00
|
|
|
# Rules to build and install all shared modules
|
|
|
|
sharedmods: $(SHAREDMODS)
|
1995-01-22 00:47:59 +00:00
|
|
|
sharedinstall: $(DESTSHARED) $(SHAREDMODS)
|
1996-05-24 21:14:44 +00:00
|
|
|
-for i in X $(SHAREDMODS); do \
|
|
|
|
if test $$i != X; \
|
1996-08-20 19:46:35 +00:00
|
|
|
then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
|
1996-05-24 21:14:44 +00:00
|
|
|
fi; \
|
|
|
|
done
|
1994-01-02 00:26:09 +00:00
|
|
|
|
1996-07-30 16:53:14 +00:00
|
|
|
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
|
1996-06-17 17:33:11 +00:00
|
|
|
|
1996-07-24 02:33:33 +00:00
|
|
|
$(DESTSHARED):
|
|
|
|
@for i in $(DESTDIRS); \
|
|
|
|
do \
|
|
|
|
if test ! -d $$i; then \
|
|
|
|
echo "Creating directory $$i"; \
|
|
|
|
mkdir $$i; \
|
|
|
|
chmod 755 $$i; \
|
|
|
|
else true; \
|
|
|
|
fi; \
|
|
|
|
done
|
1995-01-22 00:47:59 +00:00
|
|
|
|
1999-12-16 17:52:08 +00:00
|
|
|
ccpython.o: ccpython.cc
|
|
|
|
$(CXX) $(CFLAGS) -c $*.cc
|
|
|
|
|
1994-09-12 10:42:20 +00:00
|
|
|
# Stuff is appended here by makesetup and make depend
|