forked from ps2dev/ps2sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (19 loc) · 926 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
ARG BASE_DOCKER_IMAGE
FROM $BASE_DOCKER_IMAGE
COPY . /src
RUN apk add build-base git bash
# Still compilation is not fully compatible with multi-thread
RUN cd /src && \
make -j $(getconf _NPROCESSORS_ONLN) clean && \
make -j $(getconf _NPROCESSORS_ONLN) && \
make -j $(getconf _NPROCESSORS_ONLN) install
RUN ln -sf "$PS2SDK/ee/lib/libcglue.a" "$PS2DEV/ee/mips64r5900el-ps2-elf/lib/libcglue.a"
RUN ln -sf "$PS2SDK/ee/lib/libpthreadglue.a" "$PS2DEV/ee/mips64r5900el-ps2-elf/lib/libpthreadglue.a"
RUN ln -sf "$PS2SDK/ee/lib/libkernel.a" "$PS2DEV/ee/mips64r5900el-ps2-elf/lib/libkernel.a"
RUN ln -sf "$PS2SDK/ee/lib/libcdvd.a" "$PS2DEV/ee/mips64r5900el-ps2-elf/lib/libcdvd.a"
# Second stage of Dockerfile
FROM alpine:latest
ENV PS2DEV /usr/local/ps2dev
ENV PS2SDK $PS2DEV/ps2sdk
ENV PATH $PATH:${PS2DEV}/bin:${PS2DEV}/ee/bin:${PS2DEV}/iop/bin:${PS2DEV}/dvp/bin:${PS2SDK}/bin
COPY --from=0 ${PS2DEV} ${PS2DEV}