Skip to content
This repository has been archived by the owner on Sep 22, 2019. It is now read-only.

Commit

Permalink
add dockerfile for linux build
Browse files Browse the repository at this point in the history
makefile targets for per OS builds
  • Loading branch information
Southclaws committed Jan 9, 2019
1 parent 4378044 commit 670cf1f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM rust:1.31

WORKDIR /root
COPY . .
RUN apt update && apt install -y gcc-multilib && make toolchain-linux

ENTRYPOINT [ "make", "build-linux-release" ]
26 changes: 18 additions & 8 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@
# Development
# -

build-release:
toolchain-win32:
rustup default stable-i686-pc-windows-msvc

build-win32-release: toolchain-win32
cargo +stable-i686-pc-windows-msvc build --release
cp target/release/pawn_templates.dll test/plugins/templates.dll

build-debug:
build-win32-debug: toolchain-win32
cargo +stable-i686-pc-windows-msvc build
cp target/debug/pawn_templates.dll test/plugins/templates.dll

toolchain-linux:
rustup default stable-i686-unknown-linux-gnu

build-linux-release: toolchain-linux
cargo +stable-i686-unknown-linux-gnu build --release
cp target/release/libpawn_templates.so test/plugins/templates.so

build-linux-debug: toolchain-linux
cargo +stable-i686-unknown-linux-gnu build
cp target/debug/libpawn_templates.so test/plugins/templates.so

# -
# Setup test requirements
# -
Expand All @@ -36,9 +50,5 @@ test-container:

build-container:
rm -rf build
docker build -t southclaws/projectname-build .
docker run -v $(shell pwd)/test/plugins:/root/test/plugins southclaws/projectname-build

# this make target is only run inside the container
build-inside:
cd build && cmake .. && make
docker build -t southclaws/templates-build .
docker run -v $(shell pwd)/test/plugins:/root/test/plugins southclaws/templates-build

0 comments on commit 670cf1f

Please sign in to comment.