Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for M1 Macs #19

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ shoebill: make_gui debugger
make_gui: make_core
xcodebuild -project gui/Shoebill.xcodeproj SYMROOT=build

debugger: make_core
$(MAKE) -C debugger

make_core:
$(MAKE) -C core -j 4

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1><img align=right src="../../../pruten.github.io/raw/master/web/stork_tiny_head3.jpg"/>Shoebill</h1>
<h1><img align=right src="https://github.com/pruten/pruten.github.io/raw/master/web/stork_tiny_head3.jpg"/>Shoebill</h1>

A Macintosh II emulator that runs A/UX (and A/UX only).

Expand Down
8 changes: 7 additions & 1 deletion core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ OBJ_x86_64 = $(OBJ_NEED_NOTHING) $(OBJ_NEED_PREPROCESSING) $(OBJ_NEED_DECODER)
# The object files compiled for i386 (the same as x86_64 files, but with .i386 appended)
OBJ_i386 = $(patsubst %,%.i386,$(OBJ_x86_64))

# The object files compiled for arm64 (the same as x86_64 files, but with .arm64 appended)
OBJ_arm64 = $(patsubst %,%.arm64,$(OBJ_x86_64))

MACRO = perl macro.pl

Expand All @@ -40,7 +42,8 @@ all: $(TEMP)/libshoebill_core.a
$(TEMP)/libshoebill_core.a: $(TEMP) $(DEPS) $(OBJ_x86_64)
libtool -static -v -o $(TEMP)/libshoebill_core.a.x86_64 $(OBJ_x86_64)
libtool -static -v -o $(TEMP)/libshoebill_core.a.i386 $(OBJ_i386)
lipo -create -output $(TEMP)/libshoebill_core.a $(TEMP)/libshoebill_core.a.x86_64 $(TEMP)/libshoebill_core.a.i386
libtool -static -v -o $(TEMP)/libshoebill_core.a.arm64 $(OBJ_arm64)
lipo -create -output $(TEMP)/libshoebill_core.a $(TEMP)/libshoebill_core.a.x86_64 $(TEMP)/libshoebill_core.a.i386 $(TEMP)/libshoebill_core.a.arm64


# Split object files into i386/x86_64 versions, since it seems that libtool is unable to
Expand All @@ -52,14 +55,17 @@ $(TEMP)/libshoebill_core.a: $(TEMP) $(DEPS) $(OBJ_x86_64)
$(OBJ_NEED_NOTHING): $(TEMP)/%.o: %.c $(DEPS)
$(CC) -c -arch x86_64 $(CFLAGS) $< -o $@
$(CC) -c -arch i386 $(CFLAGS) $< -o [email protected]
$(CC) -c -arch arm64 $(CFLAGS) $< -o [email protected]

$(OBJ_NEED_PREPROCESSING): $(TEMP)/%.o: $(TEMP)/%.post.c $(DEPS)
$(CC) -c -arch x86_64 $(CFLAGS) $< -o $@
$(CC) -c -arch i386 $(CFLAGS) $< -o [email protected]
$(CC) -c -arch arm64 $(CFLAGS) $< -o [email protected]

$(OBJ_NEED_DECODER): $(TEMP)/%.o: $(TEMP)/%.post.c $(DEPS) $(TEMP)/dis_decoder_guts.c $(TEMP)/inst_decoder_guts.c
$(CC) -c -arch x86_64 $(CFLAGS) $< -o $@
$(CC) -c -arch i386 $(CFLAGS) $< -o [email protected]
$(CC) -c -arch arm64 $(CFLAGS) $< -o [email protected]

# Preprocess C files
$(POST_PREPROCESSING): $(TEMP)/%.post.c: %.c $(DEPS)
Expand Down
20 changes: 12 additions & 8 deletions gui/Shoebill.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = NO;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
Expand All @@ -308,10 +309,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.8;
MACOSX_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = macosx10.8;
VALID_ARCHS = "x86_64 i386";
SDKROOT = macosx;
VALID_ARCHS = "x86_64 arm64";
};
name = Debug;
};
Expand All @@ -323,6 +324,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = NO;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
Expand All @@ -343,9 +345,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.8;
SDKROOT = macosx10.8;
VALID_ARCHS = "x86_64 i386";
MACOSX_DEPLOYMENT_TARGET = 11.0;
SDKROOT = macosx;
VALID_ARCHS = "x86_64 arm64";
};
name = Release;
};
Expand All @@ -364,9 +366,10 @@
"$(inherited)",
../intermediates,
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx10.8;
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand All @@ -386,8 +389,9 @@
"$(inherited)",
../intermediates,
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx10.8;
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions gui/Shoebill/Shoebill-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.5</string>
<string>0.0.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.0.5</string>
<string>Apple Silicon/Intel</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSMainNibFile</key>
Expand Down