summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-03-28 16:50:50 +0100
committerClifford Wolf <clifford@clifford.at>2013-03-28 16:50:50 +0100
commiteff8c68dd94cf90e2026db5a0bbb99b02a9fd8c2 (patch)
treee6af611a6c30068c2c71a404ec6a273f08a856aa /Makefile
parent73fba5164ffce53c766cc82dc0825f23baf996d3 (diff)
Improved Makefile: Added ENABLE_* switches
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 24 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index c2477fe7..d59ca1d6 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,10 @@ CONFIG := clang-debug
# CONFIG := gcc-debug
# 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 += 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
GENFILES =
-TARGETS = yosys yosys-config yosys-svgviewer
+TARGETS = yosys yosys-config
all: top-all
@@ -37,8 +41,19 @@ CXX = gcc
CXXFLAGS += -std=gnu++0x -march=native -O3 -DNDEBUG
endif
+ifeq ($(ENABLE_TCL),1)
CXXFLAGS += -I/usr/include/tcl8.5 -DYOSYS_ENABLE_TCL
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 passes/*/Makefile.inc
@@ -55,19 +70,16 @@ yosys-config: yosys-config.in
chmod +x yosys-config
yosys-svgviewer: libs/svgviewer/*.h libs/svgviewer/*.cpp
- -cd libs/svgviewer && qmake-qt4 && make
- -cp libs/svgviewer/svgviewer yosys-svgviewer
+ cd libs/svgviewer && qmake-qt4 && make
+ cp libs/svgviewer/svgviewer yosys-svgviewer
test: yosys
cd tests/simple && bash run-test.sh
cd tests/hana && bash run-test.sh
cd tests/asicworld && bash run-test.sh
-install: yosys
- install yosys /usr/local/bin/yosys
- install yosys-config /usr/local/bin/yosys-config
- -install yosys-svgviewer /usr/local/bin/yosys-svgviewer
- install yosys-filterlib /usr/local/bin/yosys-filterlib
+install: $(TARGETS)
+ install $(TARGETS) /usr/local/bin/
clean:
rm -f $(OBJS) $(GENFILES) $(TARGETS)
@@ -96,6 +108,10 @@ config-gcc-debug: clean
config-release: clean
echo 'CONFIG := release' > Makefile.conf
+config-gprof: clean
+ echo 'CONFIG := release' > Makefile.conf
+ echo 'ENABLE_GPROF := 1' >> Makefile.conf
+
-include libs/*/*.d
-include frontends/*/*.d
-include passes/*/*.d