mirror of https://github.com/YosysHQ/yosys.git
Improved Makefile: Added ENABLE_* switches
This commit is contained in:
parent
73fba5164f
commit
eff8c68dd9
32
Makefile
32
Makefile
|
@ -3,6 +3,10 @@ CONFIG := clang-debug
|
||||||
# CONFIG := gcc-debug
|
# CONFIG := gcc-debug
|
||||||
# CONFIG := release
|
# CONFIG := release
|
||||||
|
|
||||||
|
ENABLE_TCL := 1
|
||||||
|
ENABLE_QT4 := 1
|
||||||
|
ENABLE_GPROF := 0
|
||||||
|
|
||||||
OBJS = kernel/driver.o kernel/register.o kernel/rtlil.o kernel/log.o kernel/calc.o kernel/select.o kernel/show.o
|
OBJS = kernel/driver.o kernel/register.o kernel/rtlil.o kernel/log.o kernel/calc.o kernel/select.o kernel/show.o
|
||||||
|
|
||||||
OBJS += libs/bigint/BigIntegerAlgorithms.o libs/bigint/BigInteger.o libs/bigint/BigIntegerUtils.o
|
OBJS += libs/bigint/BigIntegerAlgorithms.o libs/bigint/BigInteger.o libs/bigint/BigIntegerUtils.o
|
||||||
|
@ -12,7 +16,7 @@ OBJS += libs/sha1/sha1.o
|
||||||
OBJS += libs/subcircuit/subcircuit.o
|
OBJS += libs/subcircuit/subcircuit.o
|
||||||
|
|
||||||
GENFILES =
|
GENFILES =
|
||||||
TARGETS = yosys yosys-config yosys-svgviewer
|
TARGETS = yosys yosys-config
|
||||||
|
|
||||||
all: top-all
|
all: top-all
|
||||||
|
|
||||||
|
@ -37,8 +41,19 @@ CXX = gcc
|
||||||
CXXFLAGS += -std=gnu++0x -march=native -O3 -DNDEBUG
|
CXXFLAGS += -std=gnu++0x -march=native -O3 -DNDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_TCL),1)
|
||||||
CXXFLAGS += -I/usr/include/tcl8.5 -DYOSYS_ENABLE_TCL
|
CXXFLAGS += -I/usr/include/tcl8.5 -DYOSYS_ENABLE_TCL
|
||||||
LDLIBS += -ltcl8.5
|
LDLIBS += -ltcl8.5
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_GPROF),1)
|
||||||
|
CXXFLAGS += -pg
|
||||||
|
LDFLAGS += -pg
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_QT4),1)
|
||||||
|
TARGETS += yosys-svgviewer
|
||||||
|
endif
|
||||||
|
|
||||||
include frontends/*/Makefile.inc
|
include frontends/*/Makefile.inc
|
||||||
include passes/*/Makefile.inc
|
include passes/*/Makefile.inc
|
||||||
|
@ -55,19 +70,16 @@ yosys-config: yosys-config.in
|
||||||
chmod +x yosys-config
|
chmod +x yosys-config
|
||||||
|
|
||||||
yosys-svgviewer: libs/svgviewer/*.h libs/svgviewer/*.cpp
|
yosys-svgviewer: libs/svgviewer/*.h libs/svgviewer/*.cpp
|
||||||
-cd libs/svgviewer && qmake-qt4 && make
|
cd libs/svgviewer && qmake-qt4 && make
|
||||||
-cp libs/svgviewer/svgviewer yosys-svgviewer
|
cp libs/svgviewer/svgviewer yosys-svgviewer
|
||||||
|
|
||||||
test: yosys
|
test: yosys
|
||||||
cd tests/simple && bash run-test.sh
|
cd tests/simple && bash run-test.sh
|
||||||
cd tests/hana && bash run-test.sh
|
cd tests/hana && bash run-test.sh
|
||||||
cd tests/asicworld && bash run-test.sh
|
cd tests/asicworld && bash run-test.sh
|
||||||
|
|
||||||
install: yosys
|
install: $(TARGETS)
|
||||||
install yosys /usr/local/bin/yosys
|
install $(TARGETS) /usr/local/bin/
|
||||||
install yosys-config /usr/local/bin/yosys-config
|
|
||||||
-install yosys-svgviewer /usr/local/bin/yosys-svgviewer
|
|
||||||
install yosys-filterlib /usr/local/bin/yosys-filterlib
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJS) $(GENFILES) $(TARGETS)
|
rm -f $(OBJS) $(GENFILES) $(TARGETS)
|
||||||
|
@ -96,6 +108,10 @@ config-gcc-debug: clean
|
||||||
config-release: clean
|
config-release: clean
|
||||||
echo 'CONFIG := release' > Makefile.conf
|
echo 'CONFIG := release' > Makefile.conf
|
||||||
|
|
||||||
|
config-gprof: clean
|
||||||
|
echo 'CONFIG := release' > Makefile.conf
|
||||||
|
echo 'ENABLE_GPROF := 1' >> Makefile.conf
|
||||||
|
|
||||||
-include libs/*/*.d
|
-include libs/*/*.d
|
||||||
-include frontends/*/*.d
|
-include frontends/*/*.d
|
||||||
-include passes/*/*.d
|
-include passes/*/*.d
|
||||||
|
|
Loading…
Reference in New Issue