Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 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.) |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 8 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 9 | # === Variables set by makesetup === |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 10 | |
| 11 | MODOBJS= @MODOBJS@ |
| 12 | MODLIBS= @MODLIBS@ |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 13 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 14 | # === Definitions added by makesetup === |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 15 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 16 | # === Variables set by configure === |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 17 | |
| 18 | srcdir= @srcdir@ |
| 19 | VPATH= @srcdir@ |
| 20 | |
| 21 | CC= @CC@ |
| 22 | RANLIB= @RANLIB@ |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 23 | AR= @AR@ |
| 24 | |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 25 | DEFS= @DEFS@ |
| 26 | LIBS= @LIBS@ |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 27 | LIBM= @LIBM@ |
| 28 | LIBC= @LIBC@ |
| 29 | |
| 30 | # Install prefix, may be changed by configure |
| 31 | prefix= /usr/local |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 32 | |
| 33 | |
| 34 | # === Variables that are customizable by hand === |
| 35 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 36 | INCLDIR= $(srcdir)/../Include |
| 37 | OPT= -O |
| 38 | CFLAGS= $(OPT) -I$(INCLDIR) -I.. $(DEFS) |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 39 | |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 40 | MKDEP= mkdep |
| 41 | SHELL= /bin/sh |
| 42 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 43 | MAKESETUP= $(srcdir)/makesetup |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 44 | |
| 45 | # === Fixed definitions === |
| 46 | |
| 47 | OBJS= $(MODOBJS) |
| 48 | |
| 49 | LIB= libModules.a |
| 50 | |
| 51 | MYLIBS= $(LIB) \ |
| 52 | ../Python/libPython.a \ |
| 53 | ../Objects/libObjects.a \ |
| 54 | ../Parser/libParser.a |
| 55 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 56 | SYSLIBS= $(LIBM) $(LIBC) |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 57 | |
| 58 | |
| 59 | # === Rules === |
| 60 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 61 | all: $(LIB) ../python |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 62 | |
| 63 | $(LIB): $(OBJS) |
| 64 | $(AR) cr $(LIB) $(OBJS) |
| 65 | $(RANLIB) $(LIB) |
| 66 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 67 | ../python: config.o $(MYLIBS) |
Guido van Rossum | 72824ba | 1994-08-19 12:03:04 +0000 | [diff] [blame^] | 68 | $(CC) config.o \ |
| 69 | $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 70 | mv python ../python |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 71 | |
Guido van Rossum | 72824ba | 1994-08-19 12:03:04 +0000 | [diff] [blame^] | 72 | config.o: config.c Makefile $(MYLIBS) |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 73 | $(CC) $(CFLAGS) -DPYTHONPATH=\"$(PYTHONPATH)\" -c config.c |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 74 | |
| 75 | clean: |
| 76 | -rm -f *.o python core *~ [@,#]* *.old *.orig *.rej |
| 77 | |
| 78 | clobber: clean |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 79 | -rm -f *.a tags TAGS config.c glmodule.c Makefile.pre |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 80 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 81 | config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup |
| 82 | $(SHELL) $(MAKESETUP) Setup |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 83 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 84 | Setup: |
| 85 | cp $(srcdir)/Setup.in Setup |
| 86 | |
| 87 | Makefile.pre: Makefile.pre.in ../config.status |
| 88 | (cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \ |
| 89 | $(SHELL) config.status) |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 90 | |
| 91 | depend: |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 92 | $(MKDEP) $(CFLAGS) `echo $(OBJS) | tr ' ' '\012' | \ |
| 93 | sed 's|\(.*\)\.o|$(srcdir)/\1.c|'` |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 94 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 95 | .PRECIOUS: ../python |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 96 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 97 | glmodule.c: $(srcdir)/cgen.py $(srcdir)/cstubs |
| 98 | python $(srcdir)/cgen.py <$(srcdir)/cstubs >glmodule.c |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 99 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 100 | almodule.o: almodule.c |
| 101 | arraymodule.o: arraymodule.c |
Guido van Rossum | c65a525 | 1994-08-05 13:44:50 +0000 | [diff] [blame] | 102 | audioop.o: audioop.c |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 103 | cdmodule.o: cdmodule.c |
| 104 | clmodule.o: clmodule.c |
| 105 | dbmmodule.o: dbmmodule.c |
| 106 | fcntlmodule.o: fcntlmodule.c |
| 107 | flmodule.o: flmodule.c |
| 108 | fmmodule.o: fmmodule.c |
| 109 | glmodule.o: glmodule.c |
Guido van Rossum | c65a525 | 1994-08-05 13:44:50 +0000 | [diff] [blame] | 110 | imageop.o: imageop.c |
| 111 | imgfile.o: imgfile.c |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 112 | mathmodule.o: mathmodule.c |
| 113 | md5c.o: md5c.c |
| 114 | md5module.o: md5module.c |
| 115 | mpzmodule.o: mpzmodule.c |
| 116 | nismodule.o: nismodule.c |
| 117 | parsermodule.o: parsermodule.c |
| 118 | posixmodule.o: posixmodule.c |
| 119 | pwdmodule.o: pwdmodule.c |
| 120 | regexmodule.o: regexmodule.c |
| 121 | regexpr.o: regexpr.c |
| 122 | rgbimgmodule.o: rgbimgmodule.c |
| 123 | rotormodule.o: rotormodule.c |
| 124 | selectmodule.o: selectmodule.c |
| 125 | sgimodule.o: sgimodule.c |
| 126 | socketmodule.o: socketmodule.c |
| 127 | stdwinmodule.o: stdwinmodule.c |
| 128 | stropmodule.o: stropmodule.c |
| 129 | structmodule.o: structmodule.c |
Guido van Rossum | c65a525 | 1994-08-05 13:44:50 +0000 | [diff] [blame] | 130 | sunaudiodev.o: sunaudiodev.c |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 131 | svmodule.o: svmodule.c |
| 132 | threadmodule.o: threadmodule.c |
| 133 | timemodule.o: timemodule.c |
| 134 | timingmodule.o: timingmodule.c |
| 135 | xxmodule.o: xxmodule.c |
| 136 | yuvconvert.o: yuvconvert.c |
| 137 | |
| 138 | # === Rules added by makesetup === |
Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 139 | |
| 140 | # DO NOT DELETE THIS LINE -- mkdep uses it. |
| 141 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. |
| 142 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |