blob: 539668059671ca3d41a31d1a422d21d73fc002a4 [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 \
Guido van Rossumc3e3e641998-08-09 03:55:31 +000035 metagrammar.o
Guido van Rossumbadac731993-12-20 10:52:46 +000036
Guido van Rossum2a570041998-10-07 22:51:56 +000037AROBJS= $(POBJS) myreadline.o
38OBJS= $(AROBJS) intrcheck.o
39
Guido van Rossumbadac731993-12-20 10:52:46 +000040
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000041PGENMAIN= pgenmain.o
42
Guido van Rossumc3e3e641998-08-09 03:55:31 +000043PGOBJS= firstsets.o grammar.o pgen.o printgrammar.o
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000044
Guido van Rossumc3e3e641998-08-09 03:55:31 +000045PGENOBJS= $(PGENMAIN) $(POBJS) $(PGOBJS)
46
47DOBJS= $(PGENMAIN) $(OBJS) $(PGOBJS)
Guido van Rossumbadac731993-12-20 10:52:46 +000048
49PGEN= pgen
50
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000051LIBRARY= ../libpython$(VERSION).a
Guido van Rossumbadac731993-12-20 10:52:46 +000052
53# === Rules ===
54
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000055all: $(PGEN) $(OBJS)
Guido van Rossumbadac731993-12-20 10:52:46 +000056
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000057# This target is used by the master Makefile to add the objects to the library
58add2lib: $(OBJS)
Guido van Rossum2a570041998-10-07 22:51:56 +000059 $(AR) cr $(LIBRARY) $(AROBJS)
60 if test ! -f ../Modules/hassignal; \
61 then echo adding intrcheck.o; $(AR) r $(LIBRARY) intrcheck.o; \
62 else echo leaving intrcheck.o out; fi
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000063 touch add2lib
Guido van Rossumbadac731993-12-20 10:52:46 +000064
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000065$(PGEN): $(PGENOBJS)
Guido van Rossumf2da4ed1998-04-09 19:10:38 +000066 $(CC) $(OPT) $(PGENOBJS) $(LIBS) -o $(PGEN)
Guido van Rossumbadac731993-12-20 10:52:46 +000067
68clean:
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000069 -rm -f *.o core *~ [@,#]* *.old *.orig *.rej add2lib
Guido van Rossumbadac731993-12-20 10:52:46 +000070
71clobber: clean
Guido van Rossum6fa63431993-12-24 10:36:57 +000072 -rm -f $(PGEN) *.a tags TAGS
Guido van Rossumbadac731993-12-20 10:52:46 +000073
Guido van Rossumb6775db1994-08-01 11:34:53 +000074Makefile: $(srcdir)/Makefile.in ../config.status
75 (cd ..; CONFIG_FILES=Parser/Makefile CONFIG_HEADERS= \
76 $(SHELL) config.status)
Guido van Rossumbadac731993-12-20 10:52:46 +000077
Guido van Rossumb6775db1994-08-01 11:34:53 +000078depend:
Guido van Rossumf6ca6aa1997-07-19 19:39:57 +000079 $(MKDEP) $(CFLAGS) `echo $(DOBJS) | tr ' ' '\012' | \
Guido van Rossumb6775db1994-08-01 11:34:53 +000080 sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`
81
82.PRECIOUS: Makefile
83
84acceler.o: acceler.c
85grammar1.o: grammar1.c
86intrcheck.o: intrcheck.c
87listnode.o: listnode.c
88myreadline.o: myreadline.c
89node.o: node.c
90parser.o: parser.c
91parsetok.o: parsetok.c
92tokenizer.o: tokenizer.c
93bitset.o: bitset.c
94firstsets.o: firstsets.c
95grammar.o: grammar.c
96metagrammar.o: metagrammar.c
97pgen.o: pgen.c
98printgrammar.o: printgrammar.c
99pgenmain.o: pgenmain.c
Guido van Rossumbadac731993-12-20 10:52:46 +0000100
101# DO NOT DELETE THIS LINE -- mkdep uses it.
102# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
103# IF YOU PUT ANYTHING HERE IT WILL GO AWAY