diff options
author | Peter Johnson <peter@tortall.net> | 2009-10-31 21:52:42 +0000 |
---|---|---|
committer | Peter Johnson <peter@tortall.net> | 2009-10-31 21:52:42 +0000 |
commit | 4e15ef1cc9e83edf0709b78e9e70f09901adab32 (patch) | |
tree | 005470f7cebc681ca02096418ca3fa0fe00ed435 /tools | |
parent | e15ad1b94b458419b75b1430e1a4a0e8cd596b18 (diff) | |
download | yasm-4e15ef1cc9e83edf0709b78e9e70f09901adab32.tar.gz |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/genmacro/Makefile.inc | 3 | ||||
-rw-r--r-- | tools/genperf/Makefile.inc | 15 | ||||
-rw-r--r-- | tools/re2c/Makefile.inc | 27 |
3 files changed, 30 insertions, 15 deletions
diff --git a/tools/genmacro/Makefile.inc b/tools/genmacro/Makefile.inc index 6232b9c4..c81edd14 100644 --- a/tools/genmacro/Makefile.inc +++ b/tools/genmacro/Makefile.inc @@ -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 diff --git a/tools/genperf/Makefile.inc b/tools/genperf/Makefile.inc index b7e80ed8..d9f24afa 100644 --- a/tools/genperf/Makefile.inc +++ b/tools/genperf/Makefile.inc @@ -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 diff --git a/tools/re2c/Makefile.inc b/tools/re2c/Makefile.inc index abd2db87..ceff9087 100644 --- a/tools/re2c/Makefile.inc +++ b/tools/re2c/Makefile.inc @@ -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 |