blob: db61255e2c987ca8e52e024641becda651f7ad48 [file] [log] [blame]
Guido van Rossumbadac731993-12-20 10:52:46 +00001# 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 Rossumf6ca6aa1997-07-19 19:39:57 +00007VERSION= @VERSION@
8
Guido van Rossumbadac731993-12-20 10:52:46 +00009srcdir= @srcdir@
10VPATH= @srcdir@
11
12CC= @CC@
13RANLIB= @RANLIB@
Guido van Rossumb6775db1994-08-01 11:34:53 +000014AR= @AR@
15
Guido van Rossum6fa63431993-12-24 10:36:57 +000016DEFS= @DEFS@
Guido van Rossumf2da4ed1998-04-09 19:10:38 +000017LIBS= @LIBS@
Guido van Rossumbadac731993-12-20 10:52:46 +000018
19
20# === Other things that are customizable but not by configure ===
21
Guido van Rossumb6775db1994-08-01 11:34:53 +000022INCLDIR= $(srcdir)/../Include
Guido van Rossumd250ee21994-08-23 13:38:57 +000023OPT= @OPT@
Guido van Rossumb6775db1994-08-01 11:34:53 +000024CFLAGS= $(OPT) -I$(INCLDIR) -I.. $(DEFS)
Guido van Rossum6fa63431993-12-24 10:36:57 +000025
Guido van Rossumbadac731993-12-20 10:52:46 +000026MKDEP= mkdep
27SHELL= /bin/sh
28
Guido van Rossumbadac731993-12-20 10:52:46 +000029
30# === Fixed definitions ===
31
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000032POBJS= acceler.o grammar1.o \
33 listnode.o node.o parser.o \
Guido van Rossumbadac731993-12-20 10:52:46 +000034 parsetok.o tokenizer.o bitset.o \
35 firstsets.o grammar.o metagrammar.o pgen.o \
36 printgrammar.o
37
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000038OBJS= $(POBJS) intrcheck.o myreadline.o
Guido van Rossumbadac731993-12-20 10:52:46 +000039
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000040PGENMAIN= pgenmain.o
41
42PGENOBJS= $(PGENMAIN) $(POBJS)
43
44DOBJS= $(PGENMAIN) $(OBJS)
Guido van Rossumbadac731993-12-20 10:52:46 +000045
46PGEN= pgen
47
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000048LIBRARY= ../libpython$(VERSION).a
Guido van Rossumbadac731993-12-20 10:52:46 +000049
50# === Rules ===
51
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000052all: $(PGEN) $(OBJS)
Guido van Rossumbadac731993-12-20 10:52:46 +000053
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000054# This target is used by the master Makefile to add the objects to the library
55add2lib: $(OBJS)
56 $(AR) cr $(LIBRARY) $(OBJS)
57 touch add2lib
Guido van Rossumbadac731993-12-20 10:52:46 +000058
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000059$(PGEN): $(PGENOBJS)
Guido van Rossumf2da4ed1998-04-09 19:10:38 +000060 $(CC) $(OPT) $(PGENOBJS) $(LIBS) -o $(PGEN)
Guido van Rossumbadac731993-12-20 10:52:46 +000061
62clean:
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000063 -rm -f *.o core *~ [@,#]* *.old *.orig *.rej add2lib
Guido van Rossumbadac731993-12-20 10:52:46 +000064
65clobber: clean
Guido van Rossum6fa63431993-12-24 10:36:57 +000066 -rm -f $(PGEN) *.a tags TAGS
Guido van Rossumbadac731993-12-20 10:52:46 +000067
Guido van Rossumb6775db1994-08-01 11:34:53 +000068Makefile: $(srcdir)/Makefile.in ../config.status
69 (cd ..; CONFIG_FILES=Parser/Makefile CONFIG_HEADERS= \
70 $(SHELL) config.status)
Guido van Rossumbadac731993-12-20 10:52:46 +000071
Guido van Rossumb6775db1994-08-01 11:34:53 +000072depend:
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000073 $(MKDEP) $(CFLAGS) `echo $(DOBJS) | tr ' ' '\012' | \
Guido van Rossumb6775db1994-08-01 11:34:53 +000074 sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`
75
76.PRECIOUS: Makefile
77
78acceler.o: acceler.c
79grammar1.o: grammar1.c
80intrcheck.o: intrcheck.c
81listnode.o: listnode.c
82myreadline.o: myreadline.c
83node.o: node.c
84parser.o: parser.c
85parsetok.o: parsetok.c
86tokenizer.o: tokenizer.c
87bitset.o: bitset.c
88firstsets.o: firstsets.c
89grammar.o: grammar.c
90metagrammar.o: metagrammar.c
91pgen.o: pgen.c
92printgrammar.o: printgrammar.c
93pgenmain.o: pgenmain.c
Guido van Rossumbadac731993-12-20 10:52:46 +000094
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