Skip to content

Commit 567414d

Browse files
committed
compiling the 32 bit version of stm8gal uses a temporary Makefile outside the source tree
1 parent 2370357 commit 567414d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tools/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@ install:
5454
cp -av bin/win/* ../sduino/hardware/sduino/tools/win
5555

5656
# rules for compiling stm8gal
57+
# To pass the extra CFLAGS and LDFLAGS we need a temporary (modified) Makefile
5758
stm8gal-linux32:
58-
sed '/FLAGS/ s/ = / += /' stm8gal/Makefile > stm8gal/Makefile.linux32
59-
CFLAGS=-m32 LDFLAGS=-m32 make -C stm8gal -f Makefile.linux32 clean all
59+
TMPMF=$$(mktemp); \
60+
sed '/FLAGS/ s/ = / += /' stm8gal/Makefile > $$TMPMF; \
61+
CFLAGS=-m32 LDFLAGS=-m32 make -C stm8gal -f $$TMPMF clean all; \
62+
rm -f $$TMPMF
6063
install -s -D stm8gal/stm8gal $(BINDIR)/linux32/stm8gal
61-
rm -f stm8gal/Makefile.linux32
6264

6365
stm8gal-linux64:
6466
make -C stm8gal clean all

0 commit comments

Comments
 (0)