1994-08-01 08:34:53 -03: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-01 20:26:09 -04:00
|
|
|
|
1996-07-23 23:33:33 -03:00
|
|
|
# Interpreter version number, for library destination pathnames
|
1997-01-21 23:45:38 -04:00
|
|
|
VERSION= 1.5
|
1996-07-23 23:33:33 -03:00
|
|
|
|
1994-08-01 08:34:53 -03:00
|
|
|
# === Variables set by makesetup ===
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1995-01-02 15:30:30 -04:00
|
|
|
MODOBJS= _MODOBJS_
|
|
|
|
MODLIBS= _MODLIBS_
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1994-08-01 08:34:53 -03:00
|
|
|
# === Variables set by configure ===
|
1994-01-01 20:26:09 -04:00
|
|
|
|
|
|
|
srcdir= @srcdir@
|
|
|
|
VPATH= @srcdir@
|
|
|
|
|
|
|
|
CC= @CC@
|
|
|
|
RANLIB= @RANLIB@
|
1994-08-01 08:34:53 -03:00
|
|
|
AR= @AR@
|
|
|
|
|
1995-04-10 08:37:18 -03:00
|
|
|
OPT= @OPT@
|
1996-08-19 18:59:32 -03:00
|
|
|
LDFLAGS= @LDFLAGS@
|
1997-01-27 22:21:24 -04:00
|
|
|
LDLAST= @LDLAST@
|
1995-04-10 08:37:18 -03:00
|
|
|
|
1994-01-01 20:26:09 -04:00
|
|
|
DEFS= @DEFS@
|
|
|
|
LIBS= @LIBS@
|
1994-08-01 08:34:53 -03:00
|
|
|
LIBM= @LIBM@
|
|
|
|
LIBC= @LIBC@
|
|
|
|
|
1995-08-08 11:18:12 -03:00
|
|
|
# Machine-dependent subdirectories
|
|
|
|
MACHDEP= @MACHDEP@
|
|
|
|
|
1995-01-02 15:30:30 -04:00
|
|
|
# Install prefix for architecture-independent files
|
|
|
|
prefix= @prefix@
|
|
|
|
|
|
|
|
# Install prefix for architecture-dependent files
|
|
|
|
exec_prefix= @exec_prefix@
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1996-07-31 14:37:07 -03: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 07:42:20 -03:00
|
|
|
# Symbols used for using shared libraries
|
|
|
|
SO= @SO@
|
|
|
|
LDSHARED= @LDSHARED@
|
|
|
|
CCSHARED= @CCSHARED@
|
|
|
|
LINKFORSHARED= @LINKFORSHARED@
|
1996-07-30 13:53:14 -03:00
|
|
|
DESTSHARED= $(BINLIBDEST)/sharedmodules
|
1994-09-12 07:42:20 -03:00
|
|
|
|
1996-05-24 18:14:44 -03:00
|
|
|
# Portable install script (configure doesn't always guess right)
|
|
|
|
INSTALL= @srcdir@/../install-sh -c
|
1996-07-30 13:53:14 -03:00
|
|
|
INSTALL_PROGRAM=${INSTALL} -m 755
|
1996-05-24 18:14:44 -03:00
|
|
|
INSTALL_DATA= ${INSTALL} -m 644
|
1996-08-20 16:46:35 -03: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 20:13:07 -03:00
|
|
|
# Also, making them read-only seems to be a good idea...
|
|
|
|
INSTALL_SHARED= ${INSTALL} -m 555
|
1996-05-24 18:14:44 -03:00
|
|
|
|
1995-09-30 14:01:49 -03:00
|
|
|
# === Variables that are customizable by hand or by inclusion in Setup ===
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1995-04-10 08:37:18 -03:00
|
|
|
LINKCC= $(CC)
|
1994-08-01 08:34:53 -03:00
|
|
|
INCLDIR= $(srcdir)/../Include
|
1996-07-20 23:35:58 -03:00
|
|
|
CONFIGINCLDIR= ..
|
|
|
|
CFLAGS= $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS)
|
1994-01-01 20:26:09 -04:00
|
|
|
|
|
|
|
MKDEP= mkdep
|
|
|
|
SHELL= /bin/sh
|
|
|
|
|
1994-08-01 08:34:53 -03:00
|
|
|
MAKESETUP= $(srcdir)/makesetup
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1995-09-30 14:01:49 -03:00
|
|
|
# (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 ===
|
|
|
|
|
1994-01-01 20:26:09 -04:00
|
|
|
# === Fixed definitions ===
|
|
|
|
|
|
|
|
OBJS= $(MODOBJS)
|
|
|
|
|
1997-01-20 14:34:26 -04:00
|
|
|
ADDOBJS= main.o config.o getpath.o getbuildinfo.o
|
1995-08-04 01:20:45 -03:00
|
|
|
|
1994-01-01 20:26:09 -04:00
|
|
|
LIB= libModules.a
|
|
|
|
|
|
|
|
MYLIBS= $(LIB) \
|
|
|
|
../Python/libPython.a \
|
|
|
|
../Objects/libObjects.a \
|
|
|
|
../Parser/libParser.a
|
|
|
|
|
1994-08-01 08:34:53 -03:00
|
|
|
SYSLIBS= $(LIBM) $(LIBC)
|
1994-01-01 20:26:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
# === Rules ===
|
|
|
|
|
1994-10-20 18:59:38 -03:00
|
|
|
all: $(LIB) ../python sharedmods
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1996-07-20 23:35:58 -03:00
|
|
|
asharedmodule: $(ASHAREDMODULE)$(SO)
|
|
|
|
|
|
|
|
$(ASHAREDMODULE)$(SO): $(ASHAREDMODULESOBS)
|
1996-08-19 18:59:32 -03:00
|
|
|
$(LDSHARED) $(LDFLAGS) -o $(ASHAREDMODULE)$(SO) $(ASHAREDMODULESOBS) \
|
1996-07-20 23:35:58 -03:00
|
|
|
$(ASHAREDMODULESEXTRA)
|
|
|
|
|
1995-01-17 12:11:29 -04:00
|
|
|
$(LIB): $& $(OBJS) Makefile
|
1994-08-23 10:51:25 -03:00
|
|
|
-rm -f $(LIB)
|
1994-01-01 20:26:09 -04:00
|
|
|
$(AR) cr $(LIB) $(OBJS)
|
|
|
|
$(RANLIB) $(LIB)
|
|
|
|
|
1997-01-20 14:34:26 -04:00
|
|
|
../python: $(MYLIBS) $(ADDOBJS) Makefile buildno
|
|
|
|
expr `cat buildno` + 1 >@buildno
|
|
|
|
mv @buildno buildno
|
|
|
|
$(CC) -c $(CFLAGS) -DBUILD=`cat buildno` $(srcdir)/getbuildinfo.c
|
|
|
|
$(AR) r $(LIB) getbuildinfo.o
|
1996-08-19 18:59:32 -03:00
|
|
|
$(LINKCC) $(LDFLAGS) $(OPT) $(LINKFORSHARED) $(ADDOBJS) \
|
1997-01-27 22:21:24 -04:00
|
|
|
$(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python $(LDLAST)
|
1994-08-01 08:34:53 -03:00
|
|
|
mv python ../python
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1997-01-20 14:34:26 -04:00
|
|
|
buildno:
|
|
|
|
echo 0 >buildno
|
|
|
|
|
1994-01-01 20:26:09 -04:00
|
|
|
clean:
|
|
|
|
-rm -f *.o python core *~ [@,#]* *.old *.orig *.rej
|
|
|
|
|
|
|
|
clobber: clean
|
1994-08-01 08:34:53 -03:00
|
|
|
-rm -f *.a tags TAGS config.c glmodule.c Makefile.pre
|
1996-08-08 16:07:46 -03:00
|
|
|
-rm -f *.so *.sl so_locations
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1995-08-04 01:20:45 -03:00
|
|
|
getpath.o: getpath.c Makefile
|
|
|
|
$(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
|
1996-06-12 01:20:27 -03:00
|
|
|
-DPREFIX='"$(prefix)"' \
|
|
|
|
-DEXEC_PREFIX='"$(exec_prefix)"' \
|
1995-08-04 01:20:45 -03:00
|
|
|
$(srcdir)/getpath.c
|
|
|
|
|
1996-09-11 20:13:07 -03:00
|
|
|
config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup Setup.local
|
|
|
|
$(SHELL) $(MAKESETUP) Setup Setup.local
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1994-08-01 08:34:53 -03:00
|
|
|
Setup:
|
|
|
|
cp $(srcdir)/Setup.in Setup
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1996-09-11 20:13:07 -03:00
|
|
|
Setup.local:
|
|
|
|
echo "# Edit this file for local setup changes" >Setup.local
|
|
|
|
|
1994-08-01 08:34:53 -03:00
|
|
|
Makefile.pre: Makefile.pre.in ../config.status
|
|
|
|
(cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \
|
|
|
|
$(SHELL) config.status)
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1994-08-01 08:34:53 -03:00
|
|
|
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
|
1994-08-05 10:44:50 -03:00
|
|
|
audioop.o: audioop.c
|
1994-08-01 08:34:53 -03:00
|
|
|
cdmodule.o: cdmodule.c
|
|
|
|
clmodule.o: clmodule.c
|
|
|
|
dbmmodule.o: dbmmodule.c
|
1996-07-31 19:43:38 -03:00
|
|
|
errnomodule.o: errnomodule.c
|
1994-08-01 08:34:53 -03:00
|
|
|
fcntlmodule.o: fcntlmodule.c
|
|
|
|
flmodule.o: flmodule.c
|
|
|
|
fmmodule.o: fmmodule.c
|
|
|
|
glmodule.o: glmodule.c
|
1994-08-05 10:44:50 -03:00
|
|
|
imageop.o: imageop.c
|
|
|
|
imgfile.o: imgfile.c
|
1995-08-04 01:20:45 -03:00
|
|
|
main.o: main.c
|
1994-08-01 08:34:53 -03:00
|
|
|
mathmodule.o: mathmodule.c
|
|
|
|
md5c.o: md5c.c
|
|
|
|
md5module.o: md5module.c
|
|
|
|
mpzmodule.o: mpzmodule.c
|
|
|
|
nismodule.o: nismodule.c
|
1996-07-31 19:43:38 -03:00
|
|
|
operator.o: operator.c
|
1994-08-01 08:34:53 -03:00
|
|
|
parsermodule.o: parsermodule.c
|
|
|
|
posixmodule.o: posixmodule.c
|
|
|
|
pwdmodule.o: pwdmodule.c
|
|
|
|
regexmodule.o: regexmodule.c
|
|
|
|
regexpr.o: regexpr.c
|
1996-12-18 14:37:27 -04:00
|
|
|
resource.o: resource.c
|
1994-08-01 08:34:53 -03: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 10:44:50 -03:00
|
|
|
sunaudiodev.o: sunaudiodev.c
|
1994-08-01 08:34:53 -03:00
|
|
|
svmodule.o: svmodule.c
|
|
|
|
threadmodule.o: threadmodule.c
|
|
|
|
timemodule.o: timemodule.c
|
|
|
|
timingmodule.o: timingmodule.c
|
|
|
|
xxmodule.o: xxmodule.c
|
|
|
|
yuvconvert.o: yuvconvert.c
|
|
|
|
|
1994-09-12 07:42:20 -03:00
|
|
|
# Rules to build and install all shared modules
|
|
|
|
sharedmods: $(SHAREDMODS)
|
1995-01-21 20:47:59 -04:00
|
|
|
sharedinstall: $(DESTSHARED) $(SHAREDMODS)
|
1996-05-24 18:14:44 -03:00
|
|
|
-for i in X $(SHAREDMODS); do \
|
|
|
|
if test $$i != X; \
|
1996-08-20 16:46:35 -03:00
|
|
|
then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
|
1996-05-24 18:14:44 -03:00
|
|
|
fi; \
|
|
|
|
done
|
1994-01-01 20:26:09 -04:00
|
|
|
|
1996-07-20 23:35:58 -03:00
|
|
|
# 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)
|
|
|
|
|
1996-07-30 13:53:14 -03:00
|
|
|
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
|
1996-06-17 14:33:11 -03:00
|
|
|
|
1996-07-23 23:33:33 -03: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-21 20:47:59 -04:00
|
|
|
|
1994-09-12 07:42:20 -03:00
|
|
|
# Stuff is appended here by makesetup and make depend
|