summaryrefslogtreecommitdiffstats
path: root/Modules/Makefile.pre.in
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-09-12 10:42:20 (GMT)
committerGuido van Rossum <guido@python.org>1994-09-12 10:42:20 (GMT)
commit7cc5abd4548629cc41d3951576f41ff2ddd7b5f7 (patch)
tree8b201dcbb5fb93275f2013675751f25a9ab5289f /Modules/Makefile.pre.in
parent9adae8e182452da538f8f97199f39c942293f220 (diff)
downloadcpython-7cc5abd4548629cc41d3951576f41ff2ddd7b5f7.zip
cpython-7cc5abd4548629cc41d3951576f41ff2ddd7b5f7.tar.gz
cpython-7cc5abd4548629cc41d3951576f41ff2ddd7b5f7.tar.bz2
Support shared library creation.
Diffstat (limited to 'Modules/Makefile.pre.in')
-rw-r--r--Modules/Makefile.pre.in25
1 files changed, 18 insertions, 7 deletions
diff --git a/Modules/Makefile.pre.in b/Modules/Makefile.pre.in
index 7afa0b9..39c3b7c 100644
--- a/Modules/Makefile.pre.in
+++ b/Modules/Makefile.pre.in
@@ -27,9 +27,19 @@ LIBS= @LIBS@
LIBM= @LIBM@
LIBC= @LIBC@
+# Machine-dependent subdirectories
+MACHDEP= @MACHDEP@
+
# Install prefix, may be changed by configure
prefix= /usr/local
+# Symbols used for using shared libraries
+SO= @SO@
+LDSHARED= @LDSHARED@
+CCSHARED= @CCSHARED@
+LINKFORSHARED= @LINKFORSHARED@
+DESTSHARED= $(prefix)/lib/python/$(MACHDEP)
+
# === Variables that are customizable by hand ===
@@ -60,13 +70,13 @@ SYSLIBS= $(LIBM) $(LIBC)
all: $(LIB) ../python
-$(LIB): $(OBJS)
+$(LIB): $(OBJS) Makefile
-rm -f $(LIB)
$(AR) cr $(LIB) $(OBJS)
$(RANLIB) $(LIB)
-../python: config.o $(MYLIBS)
- $(CC) $(OPT) config.o \
+../python: config.o $(MYLIBS) Makefile
+ $(CC) $(OPT) config.o $(LINKFORSHARED) \
$(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python
mv python ../python
@@ -136,8 +146,9 @@ timingmodule.o: timingmodule.c
xxmodule.o: xxmodule.c
yuvconvert.o: yuvconvert.c
-# === Rules added by makesetup ===
+# Rules to build and install all shared modules
+sharedmods: $(SHAREDMODS)
+sharedinstall: $(SHAREDMODS)
+ mv $(SHAREDMODS) $(DESTSHARED)
-# DO NOT DELETE THIS LINE -- mkdep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
+# Stuff is appended here by makesetup and make depend