Guido van Rossum | fba715a | 1994-01-02 00:26:09 +0000 | [diff] [blame] | 1 | # 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 | |
| 9 | MODOBJS= @MODOBJS@ |
| 10 | MODLIBS= @MODLIBS@ |
| 11 | MODCPPS= @MODCPPS@ |
| 12 | |
| 13 | # === Definitions added by ./makesetup === |
| 14 | |
| 15 | # === Variables set by $(TOP)/configure === |
| 16 | |
| 17 | srcdir= @srcdir@ |
| 18 | VPATH= @srcdir@ |
| 19 | |
| 20 | CC= @CC@ |
| 21 | RANLIB= @RANLIB@ |
| 22 | DEFS= @DEFS@ |
| 23 | LIBS= @LIBS@ |
| 24 | |
| 25 | |
| 26 | # === Variables that are customizable by hand === |
| 27 | |
| 28 | TOP= .. |
| 29 | INCLDIR= $(TOP)/Include |
| 30 | OPT= -g |
| 31 | CFLAGS= $(OPT) -I$(INCLDIR) $(DEFS) |
| 32 | |
| 33 | AR= ar |
| 34 | MKDEP= mkdep |
| 35 | SHELL= /bin/sh |
| 36 | |
| 37 | |
| 38 | # === Fixed definitions === |
| 39 | |
| 40 | OBJS= $(MODOBJS) |
| 41 | |
| 42 | LIB= libModules.a |
| 43 | |
| 44 | MYLIBS= $(LIB) \ |
| 45 | ../Python/libPython.a \ |
| 46 | ../Objects/libObjects.a \ |
| 47 | ../Parser/libParser.a |
| 48 | |
| 49 | SYSLIBS= $(MODLIBS) -lm |
| 50 | |
| 51 | |
| 52 | # === Rules === |
| 53 | |
| 54 | all: $(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 | |
| 64 | config.o: Makefile |
| 65 | |
| 66 | clean: |
| 67 | -rm -f *.o python core *~ [@,#]* *.old *.orig *.rej |
| 68 | |
| 69 | clobber: clean |
| 70 | -rm -f *.a tags TAGS |
| 71 | |
| 72 | Makefile: Makefile.in $(TOP)/config.status |
| 73 | CONFIG_FILES=Makefile CONFIG_HEADERS= \ |
| 74 | $(SHELL) $(TOP)/config.status |
| 75 | |
| 76 | config.c Makefile.in: Makefile.in.in config.c.in Setup makesetup |
| 77 | $(SHELL) ./makesetup Setup |
| 78 | |
| 79 | depend: |
| 80 | $(MKDEP) $(CFLAGS) \ |
| 81 | `echo $(OBJS) | tr ' ' '\012' | sed 's/\.o/.c/'` |
| 82 | |
| 83 | .PRECIOUS: Makefile.in Makefile config.c |
| 84 | |
| 85 | glmodule.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 |