Added all documentation.
[python/dscho.git] / Modules / Makefile.pre.in
blobf25f2049eba676f60d5e1723bcacce0ce0df74a8
1 # META-NOTE: this note is different from the note in the other Makefiles!
2 # NOTE: Makefile.pre.in is converted into Makefile.pre by the configure
3 # script in the toplevel directory or by ../config.status.
4 # Makefile.pre is converted into Makefile by running the makesetup
5 # script in the source directory.  Once Makefile exists, it can be
6 # brought up to date by running "make Makefile".  (The makesetup also
7 # creates config.c from config.c.in in the source directory.)
9 # === Variables set by makesetup ===
11 MODOBJS=        _MODOBJS_
12 MODLIBS=        _MODLIBS_
14 # === Variables set by configure ===
16 VERSION=        @VERSION@
17 srcdir=         @srcdir@
18 VPATH=          @srcdir@
20 @SET_CCC@
21 CC=             @CC@
22 RANLIB=         @RANLIB@
23 AR=             @AR@
25 OPT=            @OPT@
26 LDFLAGS=        @LDFLAGS@
27 LDLAST=         @LDLAST@
28 SGI_ABI=        @SGI_ABI@
30 DEFS=           @DEFS@
31 LIBS=           @LIBS@
32 LIBM=           @LIBM@
33 LIBC=           @LIBC@
35 # Machine-dependent subdirectories
36 MACHDEP=        @MACHDEP@
38 # Install prefix for architecture-independent files
39 prefix=         @prefix@
41 # Install prefix for architecture-dependent files
42 exec_prefix=    @exec_prefix@
44 # Expanded directories
45 BINDIR=         $(exec_prefix)/bin
46 LIBDIR=         $(exec_prefix)/lib
47 MANDIR=         $(prefix)/man
48 INCLUDEDIR=     $(prefix)/include
49 SCRIPTDIR=      $(prefix)/lib
51 # Detailed destination directories
52 BINLIBDEST=     $(LIBDIR)/python$(VERSION)
53 LIBDEST=        $(SCRIPTDIR)/python$(VERSION)
54 INCLUDEPY=      $(INCLUDEDIR)/python$(VERSION)
55 LIBP=           $(LIBDIR)/python$(VERSION)
57 # Symbols used for using shared libraries
58 SO=             @SO@
59 LDSHARED=       @LDSHARED@
60 CCSHARED=       @CCSHARED@
61 LINKFORSHARED=  @LINKFORSHARED@
62 DESTSHARED=     $(BINLIBDEST)/lib-dynload
64 # Portable install script (configure doesn't always guess right)
65 INSTALL=        @srcdir@/../install-sh -c
66 INSTALL_PROGRAM=${INSTALL} -m 755
67 INSTALL_DATA=   ${INSTALL} -m 644
68 # Shared libraries must be installed with executable mode on some systems;
69 # rather than figuring out exactly which, we always give them executable mode.
70 # Also, making them read-only seems to be a good idea...
71 INSTALL_SHARED= ${INSTALL} -m 555
73 # === Variables that are customizable by hand or by inclusion in Setup ===
75 LINKCC=         @LINKCC@
76 INCLDIR=        $(srcdir)/../Include
77 CONFIGINCLDIR=  ..
78 CFLAGS=         $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS)
80 MKDEP=          mkdep
81 SHELL=          /bin/sh
83 MAKESETUP=      $(srcdir)/makesetup
85 # (The makesetup script inserts all variable definitions
86 # found in the Setup file just below the following line.
87 # This means that the Setup file can override any of the definitions
88 # given before this point, but not any given below.
89 # The script insert the definitions in reverse order,
90 # for the benefits of independent extensions.)
91 # === Definitions added by makesetup ===
93 # === Fixed definitions ===
95 FIXOBJS=        config.o getpath.o main.o getbuildinfo.o
96 OBJS=           $(MODOBJS) $(FIXOBJS)
98 MAINOBJ=        python.o
100 SYSLIBS=        $(LIBM) $(LIBC)
102 LIBRARY=        ../libpython$(VERSION).a
103 LDLIBRARY=      ../@LDLIBRARY@
105 # === Rules ===
107 all:            $(OBJS)
109 # This target is used by the master Makefile to add the objects to the library.
110 # To deal with the conflict between signalmodule.o and
111 # sigcheck.o+intrcheck.o, we remove the latter two if we have the former.
112 add2lib:        $(OBJS)
113                 -if test -f hassignal; \
114                 then echo removing sigcheck.o intrcheck.o; \
115                      $(AR) d $(LIBRARY) sigcheck.o intrcheck.o 2>/dev/null; \
116                 else echo leaving sigcheck.o intrcheck.o in; fi
117                 $(AR) cr $(LIBRARY) $(OBJS)
118                 touch add2lib
120 # Use ``EXE=.exe'' for Unix emulations on DOS/Windows
121 EXE=
123 # This target is used by the master Makefile to link the final binary.
124 link:           $(MAINOBJ)
125                 $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) $(MAINOBJ) \
126                   $(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python $(LDLAST)
127                 mv python$(EXE) ../python$(EXE)
129 clean:
130                 -rm -f *.o python$(EXE) core *~ [@,#]* *.old *.orig *.rej
131                 -rm -f add2lib hassignal
133 clobber:        clean
134                 -rm -f *.a tags TAGS config.c Makefile.pre
135                 -rm -f *.so *.sl so_locations
137 getpath.o:      getpath.c Makefile
138                 $(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
139                       -DPREFIX='"$(prefix)"' \
140                       -DEXEC_PREFIX='"$(exec_prefix)"' \
141                       -DVERSION='"$(VERSION)"' \
142                       -DVPATH='"$(VPATH)"' \
143                       $(srcdir)/getpath.c
145 # When the configuration changes, we remove the library, so that it
146 # gets remade from scratch; this ensures to remove modules that are no
147 # longer pertinent (but that were in a previous configuration).
148 config.c Makefile: Makefile.pre config.c.in $(MAKESETUP)
149 config.c Makefile: Setup.thread Setup Setup.local
150 config.c Makefile:
151                 -rm -f $(LIBRARY)
152                 $(SHELL) $(MAKESETUP) Setup.thread Setup.local Setup
154 hassignal:
155                 -rm -f hassignal
156                 -for i in $(OBJS); do \
157                     if test "$$i" = "signalmodule.o"; then \
158                        echo yes >hassignal; break; \
159                     fi; \
160                 done
162 Setup:
163                 cp $(srcdir)/Setup.in Setup
165 Setup.local:
166                 echo "# Edit this file for local setup changes" >Setup.local
168 Makefile.pre:   Makefile.pre.in ../config.status
169                 (cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \
170                 $(SHELL) config.status)
172 depend:
173                 $(MKDEP) $(CFLAGS) `echo $(OBJS) | tr ' ' '\012' | \
174                                         sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`
176 .PRECIOUS:      ../python$(EXE)
178 glmodule.c:     $(srcdir)/cgen.py $(srcdir)/cstubs
179                 python $(srcdir)/cgen.py <$(srcdir)/cstubs >glmodule.c
181 almodule.o: almodule.c
182 arraymodule.o: arraymodule.c
183 audioop.o: audioop.c
184 cdmodule.o: cdmodule.c
185 cgensupport.o: cgensupport.c
186 clmodule.o: clmodule.c
187 dbmmodule.o: dbmmodule.c
188 errnomodule.o: errnomodule.c
189 fcntlmodule.o: fcntlmodule.c
190 flmodule.o: flmodule.c
191 fmmodule.o: fmmodule.c
192 glmodule.o: glmodule.c
193 imageop.o: imageop.c
194 imgfile.o: imgfile.c
195 main.o: main.c
196 mathmodule.o: mathmodule.c
197 md5c.o: md5c.c
198 md5module.o: md5module.c
199 mpzmodule.o: mpzmodule.c
200 nismodule.o: nismodule.c
201 operator.o: operator.c
202 parsermodule.o: parsermodule.c
203 posixmodule.o: posixmodule.c
204 pwdmodule.o: pwdmodule.c
205 regexmodule.o: regexmodule.c
206 regexpr.o: regexpr.c
207 resource.o: resource.c
208 rgbimgmodule.o: rgbimgmodule.c
209 rotormodule.o: rotormodule.c
210 selectmodule.o: selectmodule.c
211 sgimodule.o: sgimodule.c
212 socketmodule.o: socketmodule.c
213 stdwinmodule.o: stdwinmodule.c
214 stropmodule.o: stropmodule.c
215 structmodule.o: structmodule.c
216 sunaudiodev.o: sunaudiodev.c
217 svmodule.o: svmodule.c
218 threadmodule.o: threadmodule.c
219 timemodule.o: timemodule.c
220 timingmodule.o: timingmodule.c
221 xxmodule.o: xxmodule.c
222 yuvconvert.o: yuvconvert.c
224 # Rules to build and install all shared modules
225 sharedmods:     $(SHAREDMODS)
226 sharedinstall:  $(DESTSHARED) $(SHAREDMODS)
227                 -for i in X $(SHAREDMODS); do \
228                         if test $$i != X; \
229                         then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
230                         fi; \
231                 done
233 DESTDIRS=       $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
235 $(DESTSHARED): 
236                 @for i in $(DESTDIRS); \
237                 do \
238                         if test ! -d $$i; then \
239                                 echo "Creating directory $$i"; \
240                                 mkdir $$i; \
241                                 chmod 755 $$i; \
242                         else    true; \
243                         fi; \
244                 done
246 # Stuff is appended here by makesetup and make depend