1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
$NetBSD: patch-af,v 1.7 2006/11/03 07:15:41 joerg Exp $
--- Makefile.pre.in.orig 2006-03-13 13:08:41.000000000 +0000
+++ Makefile.pre.in
@@ -30,6 +30,7 @@ VPATH= @srcdir@
CC= @CC@
CXX= @CXX@
+MAINCC= @MAINCC@
LINKCC= @LINKCC@
AR= @AR@
RANLIB= @RANLIB@
@@ -56,7 +57,7 @@ MAKESETUP= $(srcdir)/Modules/makese
OPT= @OPT@
BASECFLAGS= @BASECFLAGS@
CFLAGS= $(BASECFLAGS) $(OPT)
-CPPFLAGS= -I. -I$(srcdir)/Include
+CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir)/Include
LDFLAGS= @LDFLAGS@
LDLAST= @LDLAST@
SGI_ABI= @SGI_ABI@
@@ -153,7 +154,6 @@ LIBC= @LIBC@
SYSLIBS= $(LIBM) $(LIBC)
SHLIBS= @SHLIBS@
-MAINOBJ= @MAINOBJ@
THREADOBJ= @THREADOBJ@
DLINCLDIR= @DLINCLDIR@
DYNLOADFILE= @DYNLOADFILE@
@@ -308,10 +308,10 @@ LIBRARY_OBJS= \
all: $(BUILDPYTHON) oldsharedmods sharedmods
# Build the interpreter
-$(BUILDPYTHON): Modules/$(MAINOBJ) $(LIBRARY) $(LDLIBRARY)
+$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
- Modules/$(MAINOBJ) \
- $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+ Modules/python.o \
+ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) ${LINK_ALL_LIBGCC_HACK}
platform: $(BUILDPYTHON)
$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
@@ -351,14 +351,18 @@ $(LIBRARY): $(LIBRARY_OBJS)
libpython$(VERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \
- $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
+ $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LDFLAGS) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
$(LN) -f $(INSTSONAME) $@; \
else\
- $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
+ $(LDSHARED) -o $@ $(LDFLAGS) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
fi
libpython$(VERSION).sl: $(LIBRARY_OBJS)
- $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(LIBC) $(LIBM)
+ $(LDSHARED) -o $@ $(LDFLAGS) $(LIBRARY_OBJS) $(LIBC) $(LIBM)
+
+libpython2.4.2.dylib: $(LIBRARY_OBJS)
+ $(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ -current_version 2.4.2 -compatibility_version 2.4 -o $@ -flat_namespace -undefined suppress $(LDFLAGS) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
+
# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
# minimal framework (not including the Lib directory and such) in the current
@@ -437,8 +441,8 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DVPATH='"$(VPATH)"' \
-o $@ $(srcdir)/Modules/getpath.c
-Modules/ccpython.o: $(srcdir)/Modules/ccpython.cc
- $(CXX) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/ccpython.cc
+Modules/python.o: $(srcdir)/Modules/python.c
+ $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
@@ -520,7 +524,7 @@ PYTHON_HEADERS= \
Include/weakrefobject.h \
pyconfig.h
-$(LIBRARY_OBJS) $(MODOBJS) Modules/$(MAINOBJ): $(PYTHON_HEADERS)
+$(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
######################################################################
@@ -629,7 +633,12 @@ altbininstall: $(BUILDPYTHON)
(cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
fi \
fi; \
- else true; \
+ else \
+ if test -f libpython2.4.2.dylib; then \
+ $(INSTALL_SHARED) libpython2.4.2.dylib $(DESTDIR)$(LIBDIR)/libpython2.4.2.dylib; \
+ else \
+ true; \
+ fi \
fi
# Install the manual page
@@ -747,7 +756,7 @@ $(srcdir)/Lib/$(PLATDIR):
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
export EXE; EXE="$(BUILDEXE)"; \
- cd $(srcdir)/Lib/$(PLATDIR); ./regen
+ cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
# Install the include files
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
@@ -792,7 +801,7 @@ libainstall: all
fi; \
fi
$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
- $(INSTALL_DATA) Modules/$(MAINOBJ) $(DESTDIR)$(LIBPL)/$(MAINOBJ)
+ $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
$(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
$(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
|