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.)
10 # === Variables set by makesetup ===
15 # === Definitions added by makesetup ===
17 # === Variables set by configure ===
31 # Machine-dependent subdirectories
34 # Install prefix for architecture-independent files
37 # Install prefix for architecture-dependent files
38 exec_prefix= @exec_prefix@
40 # Symbols used for using shared libraries
44 LINKFORSHARED= @LINKFORSHARED@
45 DESTSHARED= $(exec_prefix)/lib/python/$(MACHDEP)
48 # === Variables that are customizable by hand ===
50 INCLDIR= $(srcdir)/../Include
52 CFLAGS= $(OPT) -I$(INCLDIR) -I.. $(DEFS)
57 MAKESETUP= $(srcdir)/makesetup
59 # === Fixed definitions ===
66 ../Python/libPython.a \
67 ../Objects/libObjects.a \
70 SYSLIBS= $(LIBM) $(LIBC)
75 all: $(LIB) ../python sharedmods
77 $(LIB): $& $(OBJS) Makefile
79 $(AR) cr $(LIB) $(OBJS)
82 ../python: config.o $(MYLIBS) Makefile
83 $(LINKCC) $(OPT) config.o $(LINKFORSHARED) \
84 $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python
87 config.o: config.c Makefile $(MYLIBS)
88 $(LINKCC) $(CFLAGS) -DPYTHONPATH=\"$(PYTHONPATH)\" -c config.c
91 -rm -f *.o python core *~ [@,#]* *.old *.orig *.rej
94 -rm -f *.a tags TAGS config.c glmodule.c Makefile.pre
95 -rm -f *.so so_locations
97 config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup
98 $(SHELL) $(MAKESETUP) Setup
101 cp $(srcdir)/Setup.in Setup
103 Makefile.pre: Makefile.pre.in ../config.status
104 (cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \
105 $(SHELL) config.status)
108 $(MKDEP) $(CFLAGS) `echo $(OBJS) | tr ' ' '\012' | \
109 sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`
113 glmodule.c: $(srcdir)/cgen.py $(srcdir)/cstubs
114 python $(srcdir)/cgen.py <$(srcdir)/cstubs >glmodule.c
116 almodule.o: almodule.c
117 arraymodule.o: arraymodule.c
119 cdmodule.o: cdmodule.c
120 clmodule.o: clmodule.c
121 dbmmodule.o: dbmmodule.c
122 fcntlmodule.o: fcntlmodule.c
123 flmodule.o: flmodule.c
124 fmmodule.o: fmmodule.c
125 glmodule.o: glmodule.c
128 mathmodule.o: mathmodule.c
130 md5module.o: md5module.c
131 mpzmodule.o: mpzmodule.c
132 nismodule.o: nismodule.c
133 parsermodule.o: parsermodule.c
134 posixmodule.o: posixmodule.c
135 pwdmodule.o: pwdmodule.c
136 regexmodule.o: regexmodule.c
138 rgbimgmodule.o: rgbimgmodule.c
139 rotormodule.o: rotormodule.c
140 selectmodule.o: selectmodule.c
141 sgimodule.o: sgimodule.c
142 socketmodule.o: socketmodule.c
143 stdwinmodule.o: stdwinmodule.c
144 stropmodule.o: stropmodule.c
145 structmodule.o: structmodule.c
146 sunaudiodev.o: sunaudiodev.c
147 svmodule.o: svmodule.c
148 threadmodule.o: threadmodule.c
149 timemodule.o: timemodule.c
150 timingmodule.o: timingmodule.c
151 xxmodule.o: xxmodule.c
152 yuvconvert.o: yuvconvert.c
154 # Rules to build and install all shared modules
155 sharedmods: $(SHAREDMODS)
156 sharedinstall: $(DESTSHARED) $(SHAREDMODS)
157 -for i in dummy $(SHAREDMODS); do \
158 if test -f $$i; then mv $$i $(DESTSHARED)/$$i; fi; done
163 # Stuff is appended here by makesetup and make depend