Skip to content

Commit

Permalink
Merge branch 'main' of github.com:tomm/fab-agon-emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
tomm committed Apr 10, 2024
2 parents 5eb6e73 + b406a72 commit 3338fbd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ vdp:
ifeq ($(UNAME_S),Darwin)
EXTRA_FLAGS="-Wno-c++11-narrowing -arch x86_64" SUFFIX=.x86_64 $(MAKE) -C src/vdp
EXTRA_FLAGS="-Wno-c++11-narrowing -arch arm64" SUFFIX=.arm64 $(MAKE) -C src/vdp
$(foreach file, $(wildcard src/vdp/*.x86_64.so), lipo -create -output src/vdp/$(notdir $(file:.x86_64.so=.so)) $(file) src/vdp/$(notdir $(file:.x86_64.so=.arm64.so));)
$(MAKE) -C src/vdp lipo
find src/vdp -type f \( -name "*.so" -a ! -name "*.x86_64.so" -a ! -name "*.arm64.so" \) -exec cp {} firmware/ \;
else
$(MAKE) -C src/vdp
endif
cp src/vdp/*.so firmware/
endif

cargo:
ifeq ($(OS),Windows_NT)
Expand All @@ -36,10 +37,16 @@ endif

vdp-clean:
rm -f firmware/*.so
ifeq ($(UNAME_S),Darwin)
EXTRA_FLAGS="-Wno-c++11-narrowing -arch x86_64" SUFFIX=.x86_64 $(MAKE) -C src/vdp clean
EXTRA_FLAGS="-Wno-c++11-narrowing -arch arm64" SUFFIX=.arm64 $(MAKE) -C src/vdp clean
else
$(MAKE) -C src/vdp clean
endif

cargo-clean:
cargo clean
rm -f fab-agon-emulator

clean: vdp-clean cargo-clean

Expand Down
15 changes: 15 additions & 0 deletions dist_scripts/make-dist-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
make clean
make

VERSION=`cargo tree --depth 0 | awk '{print $2;}'`
DIST_DIR=fab-agon-emulator-$VERSION-macos

rm -rf $DIST_DIR
mkdir $DIST_DIR
cp ./target/release/fab-agon-emulator $DIST_DIR
cp -r ./firmware $DIST_DIR
cp LICENSE README.md $DIST_DIR
mkdir $DIST_DIR/sdcard
cp -r sdcard/* $DIST_DIR/sdcard/
zip $DIST_DIR.zip -r $DIST_DIR/*
4 changes: 4 additions & 0 deletions src/vdp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ SRC_ALL = $(SRCS) vdp-1.03.cpp vdp-console8.cpp vdp-quark.cpp directcontroller_t
depends: $(SRC_ALL)
$(CXX) -MM $(CFLAGS) $(SRC_ALL) > Makefile.dep

lipo:
$(foreach file, $(wildcard *.x86_64.so), lipo -create -output $(notdir $(file:.x86_64.so=.so)) $(file) $(notdir $(file:.x86_64.so=.arm64.so));)


ifneq (,$(wildcard Makefile.dep))
include Makefile.dep
endif

0 comments on commit 3338fbd

Please sign in to comment.