Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 1 | # NOTE: Makefile.in is converted into Makefile by the configure script |
| 2 | # in the parent directory. Once configure has run, you can recreate |
| 3 | # the Makefile by running just config.status. |
| 4 | |
| 5 | # === Variables set by config.stat === |
| 6 | |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 7 | VERSION= @VERSION@ |
| 8 | |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 9 | srcdir= @srcdir@ |
| 10 | VPATH= @srcdir@ |
| 11 | |
| 12 | CC= @CC@ |
| 13 | RANLIB= @RANLIB@ |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 14 | AR= @AR@ |
| 15 | |
Guido van Rossum | 6fa6343 | 1993-12-24 10:36:57 +0000 | [diff] [blame] | 16 | DEFS= @DEFS@ |
Guido van Rossum | f2da4ed | 1998-04-09 19:10:38 +0000 | [diff] [blame] | 17 | LIBS= @LIBS@ |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 18 | |
| 19 | |
| 20 | # === Other things that are customizable but not by configure === |
| 21 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 22 | INCLDIR= $(srcdir)/../Include |
Guido van Rossum | d250ee2 | 1994-08-23 13:38:57 +0000 | [diff] [blame] | 23 | OPT= @OPT@ |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 24 | CFLAGS= $(OPT) -I$(INCLDIR) -I.. $(DEFS) |
Guido van Rossum | 6fa6343 | 1993-12-24 10:36:57 +0000 | [diff] [blame] | 25 | |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 26 | MKDEP= mkdep |
| 27 | SHELL= /bin/sh |
| 28 | |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 29 | |
| 30 | # === Fixed definitions === |
| 31 | |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 32 | POBJS= acceler.o grammar1.o \ |
| 33 | listnode.o node.o parser.o \ |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 34 | parsetok.o tokenizer.o bitset.o \ |
| 35 | firstsets.o grammar.o metagrammar.o pgen.o \ |
| 36 | printgrammar.o |
| 37 | |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 38 | OBJS= $(POBJS) intrcheck.o myreadline.o |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 39 | |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 40 | PGENMAIN= pgenmain.o |
| 41 | |
| 42 | PGENOBJS= $(PGENMAIN) $(POBJS) |
| 43 | |
| 44 | DOBJS= $(PGENMAIN) $(OBJS) |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 45 | |
| 46 | PGEN= pgen |
| 47 | |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 48 | LIBRARY= ../libpython$(VERSION).a |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 49 | |
| 50 | # === Rules === |
| 51 | |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 52 | all: $(PGEN) $(OBJS) |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 53 | |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 54 | # This target is used by the master Makefile to add the objects to the library |
| 55 | add2lib: $(OBJS) |
| 56 | $(AR) cr $(LIBRARY) $(OBJS) |
| 57 | touch add2lib |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 58 | |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 59 | $(PGEN): $(PGENOBJS) |
Guido van Rossum | f2da4ed | 1998-04-09 19:10:38 +0000 | [diff] [blame] | 60 | $(CC) $(OPT) $(PGENOBJS) $(LIBS) -o $(PGEN) |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 61 | |
| 62 | clean: |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 63 | -rm -f *.o core *~ [@,#]* *.old *.orig *.rej add2lib |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 64 | |
| 65 | clobber: clean |
Guido van Rossum | 6fa6343 | 1993-12-24 10:36:57 +0000 | [diff] [blame] | 66 | -rm -f $(PGEN) *.a tags TAGS |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 67 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 68 | Makefile: $(srcdir)/Makefile.in ../config.status |
| 69 | (cd ..; CONFIG_FILES=Parser/Makefile CONFIG_HEADERS= \ |
| 70 | $(SHELL) config.status) |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 71 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 72 | depend: |
Guido van Rossum | f6ca6aa | 1997-07-19 19:39:57 +0000 | [diff] [blame] | 73 | $(MKDEP) $(CFLAGS) `echo $(DOBJS) | tr ' ' '\012' | \ |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 74 | sed 's|\(.*\)\.o|$(srcdir)/\1.c|'` |
| 75 | |
| 76 | .PRECIOUS: Makefile |
| 77 | |
| 78 | acceler.o: acceler.c |
| 79 | grammar1.o: grammar1.c |
| 80 | intrcheck.o: intrcheck.c |
| 81 | listnode.o: listnode.c |
| 82 | myreadline.o: myreadline.c |
| 83 | node.o: node.c |
| 84 | parser.o: parser.c |
| 85 | parsetok.o: parsetok.c |
| 86 | tokenizer.o: tokenizer.c |
| 87 | bitset.o: bitset.c |
| 88 | firstsets.o: firstsets.c |
| 89 | grammar.o: grammar.c |
| 90 | metagrammar.o: metagrammar.c |
| 91 | pgen.o: pgen.c |
| 92 | printgrammar.o: printgrammar.c |
| 93 | pgenmain.o: pgenmain.c |
Guido van Rossum | badac73 | 1993-12-20 10:52:46 +0000 | [diff] [blame] | 94 | |
| 95 | # DO NOT DELETE THIS LINE -- mkdep uses it. |
| 96 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. |
| 97 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |