summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-03-06 11:58:07 +0100
committerClifford Wolf <clifford@clifford.at>2013-03-06 11:58:07 +0100
commitb380af9d6d49ad4a7a944eb02abd3fa222f383a3 (patch)
tree38864a545a919e8f7bd5318fd0023eaf2027b5de /Makefile
parent14c097b633c168e912312a98b34d90f2120fcb63 (diff)
Added support for loadable modules (aka plugins)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 392d50f6..f8ba724c 100644
--- a/Makefile
+++ b/Makefile
@@ -12,13 +12,13 @@ OBJS += libs/sha1/sha1.o
OBJS += libs/subcircuit/subcircuit.o
GENFILES =
-TARGETS = yosys
+TARGETS = yosys yosys-config
all: top-all
-CXXFLAGS = -Wall -Wextra -ggdb -I$(shell pwd) -MD -D_YOSYS_
-LDFLAGS =
-LDLIBS = -lstdc++ -lreadline -lm
+CXXFLAGS = -Wall -Wextra -ggdb -I"$(shell pwd)" -MD -D_YOSYS_ -fPIC
+LDFLAGS = -rdynamic
+LDLIBS = -lstdc++ -lreadline -lm -ldl
-include Makefile.conf
@@ -47,6 +47,10 @@ top-all: $(TARGETS)
yosys: $(OBJS)
$(CXX) -o yosys $(LDFLAGS) $(OBJS) $(LDLIBS)
+yosys-config: yosys-config.in
+ sed 's,@CXX@,$(CXX),; s,@CXXFLAGS@,$(CXXFLAGS),; s,@LDFLAGS@,$(LDFLAGS),; s,@LDLIBS@,$(LDLIBS),;' < yosys-config.in > yosys-config
+ chmod +x yosys-config
+
test: yosys
cd tests/simple && bash run-test.sh
cd tests/hana && bash run-test.sh
@@ -54,6 +58,7 @@ test: yosys
install: yosys
install yosys /usr/local/bin/yosys
+ install yosys-config /usr/local/bin/yosys-config
clean:
rm -f $(OBJS) $(GENFILES) $(TARGETS)