Add build_mingw target using x86_64-w64-mingw32-gcc cross-compiler with dedicated MinGW flags and publish step. Introduce Dockerfile with Ubuntu base image installing all required build dependencies (gcc, make, readline, ncurses, curl, openssl, json-c, sqlite3, python3-dev). Add compose.yml for convenient Docker-based development shell with mounted working directory. Extend Makefile with docker, docker_make, docker_run, run_mingw targets and suppress error output on publish commands for build and build_free targets.
38 lines
790 B
Docker
38 lines
790 B
Docker
# Use an official Ubuntu as a base image
|
|
FROM ubuntu:latest
|
|
|
|
# Set environment variables to avoid interactive prompts during package installation
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Update the package list and install required packages
|
|
RUN apt-get update -y && \
|
|
apt-get install -y \
|
|
gcc \
|
|
make \
|
|
libreadline-dev \
|
|
libncurses5-dev \
|
|
libcurl4-openssl-dev \
|
|
libssl-dev \
|
|
libjson-c-dev \
|
|
libsqlite3-dev \
|
|
python3-dev \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN mkdir /r
|
|
# Set the working directory
|
|
WORKDIR /r
|
|
|
|
# Copy the source files into the container
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN make build
|
|
|
|
RUN cp r /usr/local/bin/r
|
|
|
|
WORKDIR /app
|
|
|
|
# Command to run the application (optional, can be overridden)
|
|
CMD ["r", "--verbose"]
|