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 ===
14 # === Variables set by configure ===
30 # Machine-dependent subdirectories
33 # Install prefix for architecture-independent files
36 # Install prefix for architecture-dependent files
37 exec_prefix= @exec_prefix@
39 # Symbols used for using shared libraries
43 LINKFORSHARED= @LINKFORSHARED@
44 DESTSHARED= $(exec_prefix)/lib/python/$(MACHDEP)
46 # Portable install script (configure doesn't always guess right)
47 INSTALL= @srcdir@/../install-sh -c
48 INSTALL_PROGRAM=${INSTALL}
49 INSTALL_DATA= ${INSTALL} -m 644
51 # === Variables that are customizable by hand or by inclusion in Setup ===
54 INCLDIR= $(srcdir)/../Include
55 CFLAGS= $(OPT) -I$(INCLDIR) -I.. $(DEFS)
60 MAKESETUP= $(srcdir)/makesetup
62 # (The makesetup script inserts all variable definitions found
63 # found in the Setup file just below the following line.
64 # This means that the Setup file can override any of the definitions
65 # given before this point, but not any given below.
66 # The script insert the definitions in reverse order,
67 # for the benefits of independent extensions.)
68 # === Definitions added by makesetup ===
70 # === Fixed definitions ===
74 ADDOBJS= main.o config.o getpath.o
79 ../Python/libPython.a \
80 ../Objects/libObjects.a \
83 SYSLIBS= $(LIBM) $(LIBC)
88 all: $(LIB) ../python sharedmods
90 $(LIB): $& $(OBJS) Makefile
92 $(AR) cr $(LIB) $(OBJS)
95 ../python: $(MYLIBS) $(ADDOBJS) Makefile
96 $(LINKCC) $(OPT) $(LINKFORSHARED) $(ADDOBJS) \
97 $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python
101 -rm -f *.o python core *~ [@,#]* *.old *.orig *.rej
104 -rm -f *.a tags TAGS config.c glmodule.c Makefile.pre
105 -rm -f *.so so_locations
107 getpath.o: getpath.c Makefile
108 $(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
111 config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup
112 $(SHELL) $(MAKESETUP) Setup
115 cp $(srcdir)/Setup.in Setup
117 Makefile.pre: Makefile.pre.in ../config.status
118 (cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \
119 $(SHELL) config.status)
122 $(MKDEP) $(CFLAGS) `echo $(OBJS) | tr ' ' '\012' | \
123 sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`
127 glmodule.c: $(srcdir)/cgen.py $(srcdir)/cstubs
128 python $(srcdir)/cgen.py <$(srcdir)/cstubs >glmodule.c
130 almodule.o: almodule.c
131 arraymodule.o: arraymodule.c
133 cdmodule.o: cdmodule.c
134 clmodule.o: clmodule.c
135 dbmmodule.o: dbmmodule.c
136 fcntlmodule.o: fcntlmodule.c
137 flmodule.o: flmodule.c
138 fmmodule.o: fmmodule.c
139 glmodule.o: glmodule.c
143 mathmodule.o: mathmodule.c
145 md5module.o: md5module.c
146 mpzmodule.o: mpzmodule.c
147 nismodule.o: nismodule.c
148 parsermodule.o: parsermodule.c
149 posixmodule.o: posixmodule.c
150 pwdmodule.o: pwdmodule.c
151 regexmodule.o: regexmodule.c
153 rgbimgmodule.o: rgbimgmodule.c
154 rotormodule.o: rotormodule.c
155 selectmodule.o: selectmodule.c
156 sgimodule.o: sgimodule.c
157 socketmodule.o: socketmodule.c
158 stdwinmodule.o: stdwinmodule.c
159 stropmodule.o: stropmodule.c
160 structmodule.o: structmodule.c
161 sunaudiodev.o: sunaudiodev.c
162 svmodule.o: svmodule.c
163 threadmodule.o: threadmodule.c
164 timemodule.o: timemodule.c
165 timingmodule.o: timingmodule.c
166 xxmodule.o: xxmodule.c
167 yuvconvert.o: yuvconvert.c
169 # Rules to build and install all shared modules
170 sharedmods: $(SHAREDMODS)
171 sharedinstall: $(DESTSHARED) $(SHAREDMODS)
172 -for i in X $(SHAREDMODS); do \
174 then $(INSTALL_DATA) $$i $(DESTSHARED)/$$i; \
179 mkdir $(DESTSHARED); chmod 755 $(DESTSHARED)
181 # Stuff is appended here by makesetup and make depend