Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "My Project",
"build": {
"dockerfile": "../Dockerfile"
},
"postCreateCommand": "make -C /vossroot/src package",
"workspaceFolder": "/vossroot",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools"
]
}
},
"mounts": [
"source=${localWorkspaceFolder},target=/vossroot,type=bind,consistency=cached"
],
"remoteUser": "root"
}
20 changes: 13 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
FROM debian:buster
# FROM debian:bookworm
FROM gdnmhr/yosys:debian-bookworm-v0.62

ARG DEBIAN_FRONTEND=noninteractive

RUN sudo apt-get update && \
sudo apt-get -y install gawk git make python3 lld bison clang flex \
libffi-dev libfl-dev libreadline-dev pkg-config tcl-dev zlib1g-dev \
graphviz xdot
RUN apt-get update && \
apt-get -y install --no-install-recommends \
build-essential \
gawk git make python3 lld bison clang flex \
libffi-dev libfl-dev libreadline-dev pkg-config tcl-dev tk-dev zlib1g-dev \
graphviz xdot \
# rumi 260415 for BSD Editline
libedit-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

VOLUME /vossroot
WORKDIR /vossroot/src
CMD make package
WORKDIR /vossroot/src
31 changes: 28 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Top level makefile
#

# rumi 260415: Automatically detect compiler and linker flags for Tcl, Tk, and Editline
PKG_FLAGS := $(filter-out -static, $(shell pkg-config --cflags --libs tcl tk libedit))
CFLAGS += $(PKG_FLAGS)
CXXFLAGS += $(PKG_FLAGS)
LDFLAGS += $(PKG_FLAGS)

#
# Current directory
#
Expand Down Expand Up @@ -96,7 +102,7 @@ docker_package:
docker run --user $(REPO_OWNER) -v `pwd`/..:/vossroot vossii-static-builder

package: clean
make install LINKFLAG=-static
make install
rm -r ../voss ; true
install -m 755 -d ../voss/
install -m 755 -d ../voss/bin
Expand Down Expand Up @@ -242,8 +248,27 @@ minisat:
visualization:
make -C "$(VISUALIZATION_DIR)" TCL_INCLUDE=$(TCL_INCLUDE) CC=$(CC) CXX=$(CX)

$(YOSYS_WRITE_PEXLIF)/write_pexlif.so: $(YOSYS_WRITE_PEXLIF)/write_pexlif.cc
make -C $(YOSYS_WRITE_PEXLIF)
# $(YOSYS_WRITE_PEXLIF)/write_pexlif.so: $(YOSYS_WRITE_PEXLIF)/write_pexlif.cc
# make -C $(YOSYS_WRITE_PEXLIF)
# Define the libraries to link
# YOSYS_LIBS := $(shell /opt/tools/yosys/bin/yosys-config --ldflags --libs)

# write_pexlif.so: write_pexlif.o
# g++ -shared -o $@ $^ $(YOSYS_LIBS)

# rumi 260415: this is a stupid HACK to make pexlif compile
VPATH := /vossroot/src/external/yosys/write_pexlif

PEXLIF_OBJ := write_pexlif.o
PEXLIF_TARGET := /vossroot/src/external/yosys/write_pexlif/write_pexlif.so

$(PEXLIF_TARGET): $(PEXLIF_OBJ)
g++ -shared -o $@ $^ $(shell /opt/tools/yosys/bin/yosys-config --ldflags --libs)

# Now make will automatically find write_pexlif.cc because of VPATH
$(PEXLIF_OBJ): write_pexlif.cc
g++ -fPIC -D_YOSYS_ -DDEBUG -I/opt/tools/yosys/share/yosys/include -c $< -o $@


clean:
@-make -C lib clean
Expand Down