|
| 1 | +########## |
| 2 | +# The following should eventually go into a more central location |
| 3 | +# when a reorg is done. |
| 4 | +# |
| 5 | +# Turn on increased build verbosity by defining BUILD_VERBOSE in your main |
| 6 | +# Makefile or in your environment. You can also use V=1 on the make command |
| 7 | +# line. |
| 8 | +ifeq ("$(origin V)", "command line") |
| 9 | +BUILD_VERBOSE=$(V) |
| 10 | +endif |
| 11 | +ifndef BUILD_VERBOSE |
| 12 | +BUILD_VERBOSE = 0 |
| 13 | +endif |
| 14 | +ifeq ($(BUILD_VERBOSE),0) |
| 15 | +Q = @ |
| 16 | +else |
| 17 | +Q = |
| 18 | +endif |
| 19 | +# Since this is a new feature, advertise it |
| 20 | +ifeq ($(BUILD_VERBOSE),0) |
| 21 | +$(info Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.) |
| 22 | +endif |
| 23 | +# |
| 24 | +######### |
| 25 | + |
1 | 26 | # default settings; can be overriden in main Makefile |
2 | 27 |
|
3 | 28 | ifndef PY_SRC |
|
11 | 36 | # to create the build directory |
12 | 37 |
|
13 | 38 | $(BUILD): |
14 | | - mkdir -p $@ |
| 39 | + $(Q)mkdir -p $@ |
15 | 40 |
|
16 | 41 | # where py object files go (they have a name prefix to prevent filename clashes) |
17 | 42 |
|
@@ -80,24 +105,30 @@ PY_O_BASENAME = \ |
80 | 105 | PY_O = $(addprefix $(PY_BUILD), $(PY_O_BASENAME)) |
81 | 106 |
|
82 | 107 | $(PY_BUILD)emitnx64.o: $(PY_SRC)/emitnative.c $(PY_SRC)/emit.h mpconfigport.h |
83 | | - $(CC) $(CFLAGS) -DN_X64 -c -o $@ $< |
| 108 | + $(ECHO) "CC $<" |
| 109 | + $(Q)$(CC) $(CFLAGS) -DN_X64 -c -o $@ $< |
84 | 110 |
|
85 | 111 | $(PY_BUILD)emitnthumb.o: $(PY_SRC)/emitnative.c $(PY_SRC)/emit.h mpconfigport.h |
86 | | - $(CC) $(CFLAGS) -DN_THUMB -c -o $@ $< |
| 112 | + $(ECHO) "CC $<" |
| 113 | + $(Q)$(CC) $(CFLAGS) -DN_THUMB -c -o $@ $< |
87 | 114 |
|
88 | 115 | $(PY_BUILD)%.o: $(PY_SRC)/%.S |
89 | | - $(CC) $(CFLAGS) -c -o $@ $< |
| 116 | + $(ECHO) "CC $<" |
| 117 | + $(Q)$(CC) $(CFLAGS) -c -o $@ $< |
90 | 118 |
|
91 | 119 | $(PY_BUILD)%.o: $(PY_SRC)/%.c mpconfigport.h |
92 | | - $(CC) $(CFLAGS) -c -o $@ $< |
| 120 | + $(ECHO) "CC $<" |
| 121 | + $(Q)$(CC) $(CFLAGS) -c -o $@ $< |
93 | 122 |
|
94 | 123 | # optimising gc for speed; 5ms down to 4ms on pybv2 |
95 | 124 | $(PY_BUILD)gc.o: $(PY_SRC)/gc.c |
96 | | - $(CC) $(CFLAGS) -O3 -c -o $@ $< |
| 125 | + $(ECHO) "CC $<" |
| 126 | + $(Q)$(CC) $(CFLAGS) -O3 -c -o $@ $< |
97 | 127 |
|
98 | 128 | # optimising vm for speed, adds only a small amount to code size but makes a huge difference to speed (20% faster) |
99 | 129 | $(PY_BUILD)vm.o: $(PY_SRC)/vm.c |
100 | | - $(CC) $(CFLAGS) -O3 -c -o $@ $< |
| 130 | + $(ECHO) "CC $<" |
| 131 | + $(Q)$(CC) $(CFLAGS) -O3 -c -o $@ $< |
101 | 132 |
|
102 | 133 | # header dependencies |
103 | 134 |
|
|
0 commit comments