diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2015-10-11 00:47:37 +0200 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2015-10-11 00:47:37 +0200 |
commit | 2792b00792e4f78ee2e0e23627bb20f0e2669593 (patch) | |
tree | 97851020976ab68345326f6c5e282188e776f850 | |
parent | ba4cce9f19cf7a8eab78b52ca1aaa4d040eb8e7c (diff) | |
download | yosys-2792b00792e4f78ee2e0e23627bb20f0e2669593.tar.gz yosys-2792b00792e4f78ee2e0e23627bb20f0e2669593.tar.bz2 yosys-2792b00792e4f78ee2e0e23627bb20f0e2669593.zip |
Use LDFLAGS, CXXFLAGS and CPPFLAGS from the environment when building
-rw-r--r-- | Makefile | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -39,8 +39,8 @@ all: top-all YOSYS_SRC := $(dir $(firstword $(MAKEFILE_LIST))) VPATH := $(YOSYS_SRC) -CXXFLAGS = -Wall -Wextra -ggdb -I. -I"$(YOSYS_SRC)" -MD -D_YOSYS_ -fPIC -I$(DESTDIR)/include -LDFLAGS = -L$(DESTDIR)/lib +CXXFLAGS += -Wall -Wextra -ggdb -I. -I"$(YOSYS_SRC)" -MD -D_YOSYS_ -fPIC -I$(DESTDIR)/include +LDFLAGS += -L$(DESTDIR)/lib LDLIBS = -lstdc++ -lm SED = sed BISON = bison @@ -307,11 +307,11 @@ libyosys.so: $(filter-out kernel/driver.o,$(OBJS)) %.o: %.cc $(Q) mkdir -p $(dir $@) - $(P) $(CXX) -o $@ -c $(CXXFLAGS) $< + $(P) $(CXX) -o $@ -c $(CPPFLAGS) $(CXXFLAGS) $< %.o: %.cpp $(Q) mkdir -p $(dir $@) - $(P) $(CXX) -o $@ -c $(CXXFLAGS) $< + $(P) $(CXX) -o $@ -c $(CPPFLAGS) $(CXXFLAGS) $< kernel/version_$(GIT_REV).cc: $(YOSYS_SRC)/Makefile $(P) rm -f kernel/version_*.o kernel/version_*.d kernel/version_*.cc @@ -319,9 +319,9 @@ kernel/version_$(GIT_REV).cc: $(YOSYS_SRC)/Makefile $(CXX) --version | tr ' ()' '\n' | grep '^[0-9]' | head -n1` $(filter -f% -m% -O% -DNDEBUG,$(CXXFLAGS)))\"; }" > kernel/version_$(GIT_REV).cc yosys-config: misc/yosys-config.in - $(P) $(SED) -e 's,@CXXFLAGS@,$(subst -I. -I"$(YOSYS_SRC)",-I"$(TARGET_DATDIR)/include",$(CXXFLAGS)),;' \ - -e 's,@CXX@,$(CXX),;' -e 's,@LDFLAGS@,$(LDFLAGS),;' -e 's,@LDLIBS@,$(LDLIBS),;' \ - -e 's,@BINDIR@,$(TARGET_BINDIR),;' -e 's,@DATDIR@,$(TARGET_DATDIR),;' < $< > yosys-config + $(P) $(SED) -e 's#@CXXFLAGS@#$(subst -I. -I"$(YOSYS_SRC)",-I"$(TARGET_DATDIR)/include",$(CXXFLAGS))#;' \ + -e 's#@CXX@#$(CXX)#;' -e 's#@LDFLAGS@#$(LDFLAGS)#;' -e 's#@LDLIBS@#$(LDLIBS)#;' \ + -e 's#@BINDIR@#$(TARGET_BINDIR)#;' -e 's#@DATDIR@#$(TARGET_DATDIR)#;' < $< > yosys-config $(Q) chmod +x yosys-config abc/abc-$(ABCREV)$(EXE): |