blob: e8e4a207b65b528bdd8b0be13a3758302d99c62d [file] [log] [blame]
Guido van Rossumfba715a1994-01-02 00:26:09 +00001# NOTE: Makefile.in.in is converted into Makefile.in by running the
2# makesetup script in the current directory. Makefile.in is converted
3# into Makefile by the configure script in the toplevel directory.
4# Once Makefile exists, it can be brought up to date by running
5# "make Makefile".
6
7# === Variables set by ./makesetup ===
8
9MODOBJS= @MODOBJS@
10MODLIBS= @MODLIBS@
11MODCPPS= @MODCPPS@
12
13# === Definitions added by ./makesetup ===
14
15# === Variables set by $(TOP)/configure ===
16
17srcdir= @srcdir@
18VPATH= @srcdir@
19
20CC= @CC@
21RANLIB= @RANLIB@
22DEFS= @DEFS@
23LIBS= @LIBS@
24
25
26# === Variables that are customizable by hand ===
27
28TOP= ..
29INCLDIR= $(TOP)/Include
30OPT= -g
31CFLAGS= $(OPT) -I$(INCLDIR) $(DEFS)
32
33AR= ar
34MKDEP= mkdep
35SHELL= /bin/sh
36
37
38# === Fixed definitions ===
39
40OBJS= $(MODOBJS)
41
42LIB= libModules.a
43
44MYLIBS= $(LIB) \
45 ../Python/libPython.a \
46 ../Objects/libObjects.a \
47 ../Parser/libParser.a
48
49SYSLIBS= $(MODLIBS) -lm
50
51
52# === Rules ===
53
54all: $(LIB) $(TOP)/python
55
56$(LIB): $(OBJS)
57 $(AR) cr $(LIB) $(OBJS)
58 $(RANLIB) $(LIB)
59
60$(TOP)/python: config.o $(MYLIBS)
61 $(CC) config.o $(MYLIBS) $(LIBS) $(SYSLIBS) -o python
62 mv python $(TOP)/python
63
64config.o: Makefile
65
66clean:
67 -rm -f *.o python core *~ [@,#]* *.old *.orig *.rej
68
69clobber: clean
70 -rm -f *.a tags TAGS
71
72Makefile: Makefile.in $(TOP)/config.status
73 CONFIG_FILES=Makefile CONFIG_HEADERS= \
74 $(SHELL) $(TOP)/config.status
75
76config.c Makefile.in: Makefile.in.in config.c.in Setup makesetup
77 $(SHELL) ./makesetup Setup
78
79depend:
80 $(MKDEP) $(CFLAGS) \
81 `echo $(OBJS) | tr ' ' '\012' | sed 's/\.o/.c/'`
82
83.PRECIOUS: Makefile.in Makefile config.c
84
85glmodule.c: cgen.py cstubs
86 python cgen.py <cstubs >glmodule.c
87
88# === Rules added by ./makesetup ===
89
90# DO NOT DELETE THIS LINE -- mkdep uses it.
91# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
92# IF YOU PUT ANYTHING HERE IT WILL GO AWAY