Skip to content

Commit

Permalink
build: Updated build steps and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bostrt committed Jul 4, 2024
1 parent dcb6e1c commit 5aa36e6
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
This is a port of POSTAL 1 for the Miyoo Mini+. This source code also includes community patch ([see here for context](https://github.com/RWS-Studios/POSTAL-SourceCode/issues/1)).
# POSTAL 1 Miyoo Mini+ Port

This is a port of POSTAL 1 for the Miyoo Mini+. This source code also includes community patch ([see here for context](https://github.com/RWS-Studios/POSTAL-SourceCode/issues/1)).

# Build Steps

These steps are distilled from https://github.com/bostrt/sdl2/tree/4f68d46493fc1de447217a36176cffe01e5c8b71?tab=readme-ov-file#build-from-scratch

### Prepare Build Environment
```shell
$ cd POSTAL-miyoo/sdl2
$ docker build -t mmiyoo .
```

## Enter Build Environment
```shell
$ cd POSTAL-miyoo
$ docker run -it --rm -v $(pwd):/workspace mmiyoo /bin/bash
```

## Build SDL2
*Inside container*
```shell
$ cd /workspace/sdl2
$ make cfg
$ make gpu
$ make sdl2
$ cd /workspace
$ make MIYOO=1
```

Binary should be at `/workspace/bin/postal1-arm`
20 changes: 17 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ ifeq ($(WITH_STEAMWORKS),1)
steamworks := true
endif

ifeq ($(PANDORA),1)
ifeq ($(MIYOO),1)
macosx := false
CPUARCH := arm
CC := /opt/mmiyoo/bin/arm-linux-gnueabihf-g++
CXX := /opt/mmiyoo/bin/arm-linux-gnueabihf-g++
LINKER := /opt/mmiyoo/bin/arm-linux-gnueabihf-g++
steamworks := false
CFLAGS += -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ffast-math -DMIYOO
CLIENTEXE := $(BINDIR)/postal1-arm
else ifeq ($(PANDORA),1)
macosx := false
CPUARCH := arm
CC := gcc
Expand Down Expand Up @@ -279,7 +288,6 @@ CFLAGS += -DLOCALE=US -DTARGET=POSTAL_2015

# includes ...
CFLAGS += -I$(SRCDIR)
CFLAGS += -I$(SRCDIR)/SDL2/include
CFLAGS += -I$(SRCDIR)/RSPiX
CFLAGS += -I$(SRCDIR)/RSPiX/Inc
CFLAGS += -I$(SRCDIR)/RSPiX/Src
Expand All @@ -300,7 +308,13 @@ ifeq ($(strip $(expiring_beta)),true)
CFLAGS += -DBETAEXPIRE=$(shell date +%s)
endif

ifeq ($(strip $(macosx)),true)
ifeq ($(MIYOO),1)
CFLAGS += -I/workspace/sdl2/sdl2/include
LDFLAGS += -L/workspace/sdl2/sdl2/build/.libs -lSDL2
LDFLAGS += -L /workspace/sdl2/sdl2 -L /workspace/sdl2/mmiyoo/lib
LDFLAGS += -lEGL -lGLESv2
LDFLAGS += -lmi_ao -lshmvar -lmi_common -lmi_sys -lmi_gfx
else ifeq ($(strip $(macosx)),true)
CFLAGS += -arch i386 -mmacosx-version-min=10.6
LDFLAGS += -arch i386 -mmacosx-version-min=10.6
LDFLAGS += -framework CoreFoundation -framework Cocoa
Expand Down

0 comments on commit 5aa36e6

Please sign in to comment.