summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/Makefile.pre.in18
1 files changed, 17 insertions, 1 deletions
diff --git a/Modules/Makefile.pre.in b/Modules/Makefile.pre.in
index a21af23..b0517d3 100644
--- a/Modules/Makefile.pre.in
+++ b/Modules/Makefile.pre.in
@@ -52,7 +52,8 @@ INSTALL_DATA= ${INSTALL} -m 644
LINKCC= $(CC)
INCLDIR= $(srcdir)/../Include
-CFLAGS= $(OPT) -I$(INCLDIR) -I.. $(DEFS)
+CONFIGINCLDIR= ..
+CFLAGS= $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS)
MKDEP= mkdep
SHELL= /bin/sh
@@ -87,6 +88,12 @@ SYSLIBS= $(LIBM) $(LIBC)
all: $(LIB) ../python sharedmods
+asharedmodule: $(ASHAREDMODULE)$(SO)
+
+$(ASHAREDMODULE)$(SO): $(ASHAREDMODULESOBS)
+ $(LDSHARED) -o $(ASHAREDMODULE)$(SO) $(ASHAREDMODULESOBS) \
+ $(ASHAREDMODULESEXTRA)
+
$(LIB): $& $(OBJS) Makefile
-rm -f $(LIB)
$(AR) cr $(LIB) $(OBJS)
@@ -177,6 +184,15 @@ sharedinstall: $(DESTSHARED) $(SHAREDMODS)
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)
+
DIRMODE=755
$(DESTSHARED): $(exec_prefix)/lib/python $(exec_prefix)/lib $(exec_prefix)