blob: 6c6f96fef84a1b1f3c11fdf862b9276b979d2767 [file] [log] [blame]
CXX = $(shell yosys-config --cxx)
CXXFLAGS = $(shell yosys-config --cxxflags)
LDFLAGS = $(shell yosys-config --ldflags)
LDLIBS = $(shell yosys-config --ldlibs)
PLUGINS_DIR = $(shell yosys-config --datdir)/plugins
OBJS = selection.o
selection.so: $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS)
install_plugin: selection.so
mkdir -p $(PLUGINS_DIR)
cp $< $(PLUGINS_DIR)/$<
test:
$(MAKE) -C tests all
.PHONY: install
install: install_plugin
clean:
rm -f *.d *.o *.so
$(MAKE) -C tests clean