Skip to content

Commit 5e31c21

Browse files
committed
Force minimal Makefile approach for Windows builds to bypass XEP80 issues
- Skip autotools completely on Windows and use minimal Makefile directly - Add verbose build output and debugging markers for minimal build tracking - Enhanced verification to show when minimal build approach is used - This avoids the persistent 'xep80.h 2114' compilation errors Windows builds will now use a curated set of source files that exclude problematic modules while maintaining core emulator functionality.
1 parent 5e3eba3 commit 5e31c21

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ if(WIN32)
132132
COMMAND ${CMAKE_COMMAND} -E echo "=== Verifying libatari800 build on Windows ==="
133133
COMMAND ${CMAKE_COMMAND} -E echo "Expected library: ${ATARI800_LIBRARY}"
134134
COMMAND ${CMAKE_COMMAND} -E echo "Checking if library exists..."
135-
COMMAND ${CMAKE_COMMAND} -E env MSYSTEM=MSYS ${MSYS2_BASH} -c "export PATH='/mingw64/bin:/usr/bin:$PATH' && if [ -f '${ATARI800_LIBRARY}' ]; then echo 'SUCCESS: libatari800.a exists'; ls -la '${ATARI800_LIBRARY}'; else echo 'ERROR: libatari800.a missing'; ls -la '${ATARI800_SOURCE_DIR}/src/'; fi"
135+
COMMAND ${CMAKE_COMMAND} -E env MSYSTEM=MSYS ${MSYS2_BASH} -c "export PATH='/mingw64/bin:/usr/bin:$PATH' && if [ -f '${ATARI800_LIBRARY}' ]; then echo 'SUCCESS: libatari800.a exists'; ls -la '${ATARI800_LIBRARY}'; if [ -f '${ATARI800_SOURCE_DIR}/.minimal-build-marker' ]; then echo 'INFO: Built using minimal Makefile approach'; cat '${ATARI800_SOURCE_DIR}/.minimal-build-marker'; fi; else echo 'ERROR: libatari800.a missing'; ls -la '${ATARI800_SOURCE_DIR}/src/'; if [ -f '${ATARI800_SOURCE_DIR}/.minimal-build-marker' ]; then echo 'DEBUG: Minimal build was attempted'; cat '${ATARI800_SOURCE_DIR}/.minimal-build-marker'; fi; fi"
136136
COMMENT "Verifying libatari800 library creation"
137137
)
138138
endif()

scripts/configure-atari800.sh

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,12 @@ fi
134134

135135
# Configure with Windows-specific settings if needed
136136
if [[ "$OSTYPE" == "msys" ]] || [[ "$MSYSTEM" != "" ]]; then
137-
echo "Configuring for Windows with basic settings..."
138-
# Try a simple, minimal configuration for Windows
139-
./configure --target=libatari800 --enable-netsio || {
140-
echo "Basic configure with netsio failed, trying minimal configure..."
141-
./configure --target=libatari800 || {
142-
echo "Configure failed completely, using minimal Makefile fallback"
143-
echo "Creating minimal build system for libatari800..."
144-
"$SCRIPT_DIR/create-minimal-makefile.sh" "$ATARI800_SRC_PATH"
145-
echo "Skipping configure step - using minimal Makefile approach"
146-
echo "atari800 configuration completed (minimal build)"
147-
exit 0
148-
}
149-
}
137+
echo "Windows detected - using minimal Makefile approach to avoid autotools issues"
138+
echo "Creating minimal build system for libatari800..."
139+
"$SCRIPT_DIR/create-minimal-makefile.sh" "$ATARI800_SRC_PATH"
140+
echo "Skipping configure step - using minimal Makefile approach"
141+
echo "atari800 configuration completed (minimal build)"
142+
exit 0
150143
else
151144
# Unix/macOS: Use full configuration
152145
./configure --target=libatari800 --enable-netsio

scripts/create-minimal-makefile.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ if [[ "$OSTYPE" == "msys" ]] || [[ "$MSYSTEM" != "" ]]; then
1919
fi
2020

2121
echo "Creating minimal Makefile for libatari800..."
22+
echo "This approach avoids autotools and problematic modules like XEP80"
2223

2324
# Create a basic Makefile that compiles the essential files for libatari800
2425
cat > Makefile << 'EOF'
@@ -59,9 +60,13 @@ LIBATARI800_OBJS = \
5960
all: src/libatari800.a
6061
6162
src/libatari800.a: $(LIBATARI800_OBJS)
63+
@echo "=== Creating libatari800.a from $(words $(LIBATARI800_OBJS)) object files ==="
6264
$(AR) $(ARFLAGS) $@ $^
65+
@echo "=== libatari800.a created successfully ==="
66+
@ls -la $@
6367
6468
%.o: %.c
69+
@echo "Compiling $< ..."
6570
$(CC) $(CFLAGS) -c $< -o $@
6671
6772
clean:
@@ -135,4 +140,8 @@ cat > src/config.h << 'EOF'
135140
EOF
136141

137142
echo "Created minimal Makefile and config.h for libatari800"
138-
echo "You can now run 'make' to build libatari800.a"
143+
echo "You can now run 'make' to build libatari800.a"
144+
145+
# Create a marker file to indicate minimal build was used
146+
echo "MINIMAL_BUILD_USED=$(date)" > .minimal-build-marker
147+
echo "Minimal build marker created for debugging"

0 commit comments

Comments
 (0)