mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Fix #187: Add new variable CFLAGS_FOR_BUILD for CC_FOR_BUILD compiles.
Due to the need to support cross-building, CC_FOR_BUILD is used instead of CC for tools that will be run as part of the build process. However, it is sometimes necessary to add custom CFLAGS for these builds; CFLAGS_FOR_BUILD supports this cleanly. svn path=/trunk/yasm/; revision=2234
This commit is contained in:
parent
e15ad1b94b
commit
4e15ef1cc9
3 changed files with 30 additions and 15 deletions
|
|
@ -11,5 +11,6 @@ genmacro_LDADD = genmacro.$(OBJEXT)
|
|||
genmacro_LINK = $(CCLD_FOR_BUILD) -o $@
|
||||
|
||||
genmacro.$(OBJEXT): tools/genmacro/genmacro.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/genmacro/genmacro.c || echo '$(srcdir)/'`tools/genmacro/genmacro.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/genmacro/genmacro.c || echo '$(srcdir)/'`tools/genmacro/genmacro.c
|
||||
|
||||
|
|
|
|||
|
|
@ -23,17 +23,22 @@ genperf_LDADD += gp-xstrdup.$(OBJEXT)
|
|||
genperf_LINK = $(CCLD_FOR_BUILD) -o $@
|
||||
|
||||
genperf.$(OBJEXT): tools/genperf/genperf.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/genperf/genperf.c || echo '$(srcdir)/'`tools/genperf/genperf.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/genperf/genperf.c || echo '$(srcdir)/'`tools/genperf/genperf.c
|
||||
|
||||
gp-perfect.$(OBJEXT): tools/genperf/perfect.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/genperf/perfect.c || echo '$(srcdir)/'`tools/genperf/perfect.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/genperf/perfect.c || echo '$(srcdir)/'`tools/genperf/perfect.c
|
||||
|
||||
gp-phash.$(OBJEXT): libyasm/phash.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f libyasm/phash.c || echo '$(srcdir)/'`libyasm/phash.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f libyasm/phash.c || echo '$(srcdir)/'`libyasm/phash.c
|
||||
|
||||
gp-xmalloc.$(OBJEXT): libyasm/xmalloc.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f libyasm/xmalloc.c || echo '$(srcdir)/'`libyasm/xmalloc.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f libyasm/xmalloc.c || echo '$(srcdir)/'`libyasm/xmalloc.c
|
||||
|
||||
gp-xstrdup.$(OBJEXT): libyasm/xstrdup.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f libyasm/xstrdup.c || echo '$(srcdir)/'`libyasm/xstrdup.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f libyasm/xstrdup.c || echo '$(srcdir)/'`libyasm/xstrdup.c
|
||||
|
||||
|
|
|
|||
|
|
@ -38,31 +38,40 @@ re2c_LDADD += re2c-translate.$(OBJEXT)
|
|||
re2c_LINK = $(CCLD_FOR_BUILD) -o $@
|
||||
|
||||
re2c-main.$(OBJEXT): tools/re2c/main.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/main.c || echo '$(srcdir)/'`tools/re2c/main.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/re2c/main.c || echo '$(srcdir)/'`tools/re2c/main.c
|
||||
|
||||
re2c-code.$(OBJEXT): tools/re2c/code.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/code.c || echo '$(srcdir)/'`tools/re2c/code.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/re2c/code.c || echo '$(srcdir)/'`tools/re2c/code.c
|
||||
|
||||
re2c-dfa.$(OBJEXT): tools/re2c/dfa.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/dfa.c || echo '$(srcdir)/'`tools/re2c/dfa.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/re2c/dfa.c || echo '$(srcdir)/'`tools/re2c/dfa.c
|
||||
|
||||
re2c-parser.$(OBJEXT): tools/re2c/parser.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/parser.c || echo '$(srcdir)/'`tools/re2c/parser.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/re2c/parser.c || echo '$(srcdir)/'`tools/re2c/parser.c
|
||||
|
||||
re2c-actions.$(OBJEXT): tools/re2c/actions.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/actions.c || echo '$(srcdir)/'`tools/re2c/actions.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/re2c/actions.c || echo '$(srcdir)/'`tools/re2c/actions.c
|
||||
|
||||
re2c-scanner.$(OBJEXT): tools/re2c/scanner.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/scanner.c || echo '$(srcdir)/'`tools/re2c/scanner.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/re2c/scanner.c || echo '$(srcdir)/'`tools/re2c/scanner.c
|
||||
|
||||
re2c-mbo_getopt.$(OBJEXT): tools/re2c/mbo_getopt.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/mbo_getopt.c || echo '$(srcdir)/'`tools/re2c/mbo_getopt.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/re2c/mbo_getopt.c || echo '$(srcdir)/'`tools/re2c/mbo_getopt.c
|
||||
|
||||
re2c-substr.$(OBJEXT): tools/re2c/substr.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/substr.c || echo '$(srcdir)/'`tools/re2c/substr.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/re2c/substr.c || echo '$(srcdir)/'`tools/re2c/substr.c
|
||||
|
||||
re2c-translate.$(OBJEXT): tools/re2c/translate.c
|
||||
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/translate.c || echo '$(srcdir)/'`tools/re2c/translate.c
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
-c -o $@ `test -f tools/re2c/translate.c || echo '$(srcdir)/'`tools/re2c/translate.c
|
||||
|
||||
EXTRA_DIST += tools/re2c/CHANGELOG
|
||||
EXTRA_DIST += tools/re2c/NO_WARRANTY
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue