Dropped Mac PPC support for now; only Intel binaries will be available.

This commit is contained in:
Cas Cremers 2012-11-22 14:31:19 +01:00
parent 0fb7e9e24e
commit 1648d14d98
8 changed files with 5 additions and 81 deletions

View File

@ -1,8 +0,0 @@
################################################################
# Name: BuildMacIntel-MacPPC.cmake
# Purpose: Build MacPPC binary on MacIntel
# Author: Cas Cremers
################################################################
include (BuildMacPPC.cmake)

View File

@ -5,7 +5,7 @@
################################################################ ################################################################
message (STATUS "Building Apple Mac Intel version") message (STATUS "Building Apple Mac Intel version")
set (scythername "scyther-macintel") set (scythername "scyther-mac")
add_executable (${scythername} ${Scyther_sources}) add_executable (${scythername} ${Scyther_sources})
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fnested-functions -arch i386") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fnested-functions -arch i386")

View File

@ -1,8 +0,0 @@
################################################################
# Name: BuildMacPPC-MacIntel.cmake
# Purpose: Build MacIntel binary on MacPPC
# Author: Cas Cremers
################################################################
include (BuildMacIntel.cmake)

View File

@ -1,11 +0,0 @@
################################################################
# Name: BuildMacPPC.cmake
# Purpose: Build MacPPC binary
# Author: Cas Cremers
################################################################
message (STATUS "Building Apple Mac PPC version")
set (scythername "scyther-macppc")
add_executable (${scythername} ${Scyther_sources})
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fnested-functions -arch ppc")

View File

@ -4,11 +4,6 @@
# Author: Cas Cremers # Author: Cas Cremers
################################################################ ################################################################
# Add target for Universal Binary when needed
if (APPLE)
include (UniversalBinary.cmake)
endif (APPLE)
# Retrieve Source_OS, Destination_OS (from -DTARGET) # Retrieve Source_OS, Destination_OS (from -DTARGET)
include (GetOS.cmake) include (GetOS.cmake)

View File

@ -1,42 +0,0 @@
################################################################
# Name: UniversalBinary.cmake
# Purpose: Add target to make a Mac universal binary
# Needs pre-build mac versions first!
# Author: Cas Cremers
################################################################
find_program(lipoexecutable lipo)
if (lipoexecutable)
# Check whether we already have the binaries
set (UBrequiredfiles FALSE)
set (ppcfile "scyther-macppc")
set (intelfile "scyther-macintel")
if (EXISTS "${ppcfile}")
if (EXISTS "${intelfile}")
set (UBrequiredfiles TRUE)
else (EXISTS "${intelfile}")
message (STATUS "Could not find scyther-macintel.")
endif (EXISTS "${intelfile}")
else (EXISTS "${ppcfile}")
message (STATUS "Could not find scyther-macppc.")
endif (EXISTS "${ppcfile}")
# Use information to proceed
if (UBrequiredfiles)
message (STATUS "Adding target for Mac universal binary")
add_custom_target (scyther-mac
COMMAND lipo -create "${ppcfile}" "${intelfile}" -output scyther-mac
COMMENT "Generating Mac universal binary"
DEPENDS scyther-macintel
DEPENDS scyther-macppc
)
else (UBrequiredfiles)
message (STATUS "No universal binary possible yet. Please do the following:")
message (STATUS " cmake -DTARGETOS=MacPPC . && make")
message (STATUS " cmake -DTARGETOS=MacIntel . && make")
message (STATUS " cmake . && make scyther-mac")
endif (UBrequiredfiles)
else (lipoexecutable)
message (FATAL_ERROR "Cannot find the 'lipo' program that is required for creating universal binaries")
endif (lipoexecutable)

View File

@ -8,7 +8,7 @@ PLATFORM=`uname`
echo $PLATFORM echo $PLATFORM
if [ "$PLATFORM" = "Darwin" ] if [ "$PLATFORM" = "Darwin" ]
then then
./subbuild-mac-universal.sh ./subbuild-mac-intel.sh
else else
if [ "$PLATFORM" = "Linux" ] if [ "$PLATFORM" = "Linux" ]
then then

View File

@ -3,15 +3,13 @@
# Default flags # Default flags
CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release" CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release"
# Make for ppc and intel, and combine into universal binary # Make for intel
cmake $CMFLAGS -D TARGETOS=MacPPC . && make cmake $CMFLAGS -D TARGETOS=MacIntel . && make scyther-mac
cmake $CMFLAGS -D TARGETOS=MacIntel . && make
cmake $CMFLAGS . && make scyther-mac
echo echo
echo echo
echo "---------------------------------------------------------" echo "---------------------------------------------------------"
echo "Built the Mac universal binary" echo "Built the Mac intel binary"
# Copy to the correct locations # Copy to the correct locations
cp scyther-mac ../gui/Scyther/ cp scyther-mac ../gui/Scyther/