diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-07-03 07:32:48 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-07-03 07:32:48 +0200 |
commit | 88a33b79bf70f3a27a5274daab03a90683163226 (patch) | |
tree | b08a56c56c621d5e66051edb6b057259c25d994c | |
parent | 6d167784e474c9c25cee655b22b7703666c32d7e (diff) | |
download | ghdl-yosys-plugin-88a33b79bf70f3a27a5274daab03a90683163226.tar.gz ghdl-yosys-plugin-88a33b79bf70f3a27a5274daab03a90683163226.tar.bz2 ghdl-yosys-plugin-88a33b79bf70f3a27a5274daab03a90683163226.zip |
Makefile: add install target.
-rw-r--r-- | Makefile | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -8,6 +8,9 @@ ifeq ($(GHDL_PREFIX),) $(error GHDL_PREFIX not defined) endif +YOSYS_CONFIG=yosys-config +SOEXT=so + LDFLAGS= CFLAGS=-O @@ -15,17 +18,21 @@ ALL_LDFLAGS=$(GHDL_PREFIX)/lib/libghdlsynth.so -Wl,-rpath,$(GHDL_PREFIX)/lib $(L ALL_CFLAGS=-fPIC -DYOSYS_ENABLE_GHDL -I$(GHDL_PREFIX)/include $(CFLAGS) -COMPILE=yosys-config --exec --cxx +COMPILE=$(YOSYS_CONFIG) --exec --cxx -all: ghdl.so +all: ghdl.$(SOEXT) -ghdl.so: ghdl.o +ghdl.$(SOEXT): ghdl.o $(COMPILE) -o $@ -shared $< -shared $(ALL_LDFLAGS) --ldflags --ldlibs ghdl.o: ghdl/ghdl.cc $(COMPILE) -c --cxxflags -o $@ $< $(ALL_CFLAGS) clean: force - $(RM) -f ghdl.so ghdl.o + $(RM) -f ghdl.$(SOEXT) ghdl.o + +install: ghdl.$(SOEXT) + $(YOSYS_CONFIG) --exec mkdir -p --datdir/plugins + $(YOSYS_CONFIG) --exec cp $< --datdir/plugins force: |