diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-31 05:51:10 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-31 06:29:16 -0700 |
commit | b57dddb1a14cf0a7abb1b4cd2f01f3dd6cb84509 (patch) | |
tree | 58f3e7f676e8009235bfaa29786385df85c803d4 /crawl-ref/source | |
parent | f3e85be18aeba71bb43cd2291faffcee188e141d (diff) | |
download | crawl-ref-b57dddb1a14cf0a7abb1b4cd2f01f3dd6cb84509.tar.gz crawl-ref-b57dddb1a14cf0a7abb1b4cd2f01f3dd6cb84509.zip |
version.cc: combine CFLAGS_L and CFLAGS
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/makefile | 15 | ||||
-rwxr-xr-x | crawl-ref/source/util/gen-cflg.pl | 7 | ||||
-rw-r--r-- | crawl-ref/source/version.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/version.h | 6 |
4 files changed, 9 insertions, 25 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index 1cbe2789a5..f9bf3e20f5 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -490,7 +490,8 @@ endif CFLAGS := $(CFOPTIMIZE) $(CFOTHERS) $(CFWARN) CFLAGS_L := $(CFOPTIMIZE_L) $(DEFINES_L) $(CFWARN_L) $(INCLUDES_L) $(CFOTHERS_L) -YCFLAGS := -w -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 +ALL_CFLAGS := $(CFLAGS) $(CFLAGS_L) +YACC_CFLAGS := $(ALL_CFLAGS) -w -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 UTIL = util/ @@ -595,7 +596,7 @@ test: ifeq ($(shell which fastdep 2> /dev/null),) %.d: %.cc - $(QUIET_DEPEND)$(CXX) -MM $(CFLAGS) $(CFLAGS_L) $< > $@ + $(QUIET_DEPEND)$(CXX) -MM $(ALL_CFLAGS) $< > $@ depend: $(OBJECTS:.o=.d) @@ -626,7 +627,7 @@ endif # This information is included in crash reports, and is printed with # "crawl -version" compflag.h: $(OBJECTS:.o=.cc) - $(QUIET_GEN)util/gen-cflg.pl compflag.h "$(CFLAGS)" "$(CFLAGS_L)" "$(LDFLAGS)" + $(QUIET_GEN)util/gen-cflg.pl compflag.h "$(ALL_CFLAGS)" "$(LDFLAGS)" build.h: $(OBJECTS:.o=.cc) $(QUIET_GEN)util/gen_ver.pl $@ $(MERGE_BASE) @@ -726,11 +727,11 @@ wizard: $(GAME) # test. $(UTIL)%.o: $(UTIL)%.cc - $(QUIET_CXX)$(CXX) $(CFLAGS) $(CFLAGS_L) $(YCFLAGS) -o $@ -c $< + $(QUIET_CXX)$(CXX) $(YACC_CFLAGS) -o $@ -c $< ifdef PCH %.h.gch: %.h - $(QUIET_PCH)$(CXX) $(CFLAGS) $(CFLAGS_L) -c $< -o $@ + $(QUIET_PCH)$(CXX) $(ALL_CFLAGS) -c $< -o $@ CC_DEP := AppHdr.h.gch endif @@ -738,10 +739,10 @@ endif $(OBJECTS:%.o=%.cc): $(CC_DEP) $(TILEDEFHDRS) $(CONTRIB_LIBS) %.o: %.m - $(QUIET_CXX)$(CC) $(CFLAGS) $(CFLAGS_L) -c $< -o $@ + $(QUIET_CXX)$(CC) $(ALL_CFLAGS) -c $< -o $@ %.o: %.cc - $(QUIET_CXX)$(CXX) $(CFLAGS) $(CFLAGS_L) -c $< -o $@ + $(QUIET_CXX)$(CXX) $(ALL_CFLAGS) -c $< -o $@ # # Contribs diff --git a/crawl-ref/source/util/gen-cflg.pl b/crawl-ref/source/util/gen-cflg.pl index 2f5e8983e2..d7d0cce39d 100755 --- a/crawl-ref/source/util/gen-cflg.pl +++ b/crawl-ref/source/util/gen-cflg.pl @@ -5,19 +5,15 @@ use warnings; my $outfile = $ARGV[0]; my $cflags = $ARGV[1]; -my $cflags_l = $ARGV[2]; -my $ldflags = $ARGV[3]; +my $ldflags = $ARGV[2]; $cflags =~ s/\"/\\"/g; -$cflags_l =~ s/\"/\\"/g; $ldflags =~ s/\"/\\"/g; while ($cflags =~ s/[ \t]{2,}/ /g) {} -while ($cflags_l =~ s/[ \t]{2,}/ /g) {} while ($ldflags =~ s/[ \t]{2,}/ /g) {} $cflags =~ s/^[ \t]+|[ \t]$//; -$cflags_l =~ s/^[ \t]+|[ \t]$//; $ldflags =~ s/^[ \t]+|[ \t]$//; my $prefix = "CRAWL"; @@ -29,7 +25,6 @@ print OUT <<__eof__; #define __included_${smprefix}_compile_flags_h #define ${prefix}_CFLAGS "${cflags}" -#define ${prefix}_CFLAGS_L "${cflags_l}" #define ${prefix}_LDFLAGS "${ldflags}" #endif diff --git a/crawl-ref/source/version.cc b/crawl-ref/source/version.cc index e37deb60f5..3997d1aa2a 100644 --- a/crawl-ref/source/version.cc +++ b/crawl-ref/source/version.cc @@ -95,11 +95,6 @@ namespace Version return CRAWL_CFLAGS; } - std::string CFLAGS_L() - { - return CRAWL_CFLAGS_L; - } - std::string LDFLAGS() { return CRAWL_LDFLAGS; @@ -121,7 +116,6 @@ std::string compilation_info() Version::BuildProcessor().c_str()); out += make_stringf("CLFAGS: %s" EOL, Version::CFLAGS().c_str()); - out += make_stringf("CFLAGS_L: %s" EOL, Version::CFLAGS_L().c_str()); out += make_stringf("LDFLAGS: %s" EOL, Version::LDFLAGS().c_str()); return (out); diff --git a/crawl-ref/source/version.h b/crawl-ref/source/version.h index 08c4ed6100..172a1c54cd 100644 --- a/crawl-ref/source/version.h +++ b/crawl-ref/source/version.h @@ -122,12 +122,6 @@ namespace Version */ std::string CFLAGS(); - //! The CFLAGS_L. - /*! - * Returns the CFLAGS_L the executable was compiled with. - */ - std::string CFLAGS_L(); - //! The LDFLAGS. /*! * Returns the flags the executable was linked with. |