diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 640b961a3..a58257a60 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -447,23 +447,27 @@ QUIETCC=0 # NB: This is not used for all .c files (see explicit rules in # dependencies). -ifndef NOSTATICCORE - # A normal or cross compile. +# if NOSTATICCORE +# A normal or cross compile. +# else +# NOSTATICCORE: A compile that makes all functions non-static. +# Rule /=/ allows 2 definitions of char array brief_feeling +# fi $(TARGETPFX)%.o : %.c - $(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ $< -else - # NOSTATICCORE: A compile that makes all functions non-static. - # Rule /=/ allows 2 definitions of char array brief_feeling -$(TARGETPFX)%.o : %.c - awk ' \ - BEGIN{print "#line 1 \"$<\""} \ - /=/{print;next} \ - sub(/^static inline/, "") \ - sub(/^static( |$$)/, "") \ - ' < $< > .$< - $(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ .$< -endif - + if [ x$(NOSTATICCORE) = 'x' ]; then \ + $(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ $< ; \ + else \ + ( \ + $(AWK) ' \ + BEGIN{print "#line 1 \"$<\""}; \ + /=/{print;next}; \ + sub(/^static inline/, ""){print;next}; \ + sub(/^static( |$$)/, ""){print;next}; \ + {print}; \ + ' < $< > .$< && \ + $(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ .$< ; \ + ) \ + fi # Verbosity definitions, begin # Set QUIETCC=1 above to output less feedback while building.