blob: dc171a477ad5d7459cad9e67d42f46c77ed7bc3f [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 = fasm.o
fasm.so: $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS)
.PHONY: install
install: fasm.so
mkdir -p $(PLUGINS_DIR)
cp $< $(PLUGINS_DIR)/$<
test:
$(MAKE) -C tests all
clean:
rm -f *.d *.o fasm.so