Esteban Lorenzano uploaded a new version of CMakeVMMaker to project VM Maker: http://source.squeak.org/VMMaker/CMakeVMMaker-EstebanLorenzano.142.mcz ==================== Summary ==================== Name: CMakeVMMaker-EstebanLorenzano.142 Author: EstebanLorenzano Time: 3 December 2011, 6:14:27 pm UUID: b72f285e-497c-4038-8d47-1565d66627e7 Ancestors: CMakeVMMaker-EstebanLorenzano.141 -some refactors to avoid duplicated code -added #generateForRelease (default) and #generateForDebug protocols -removed CogCocoaIOSConfigDebug (not needed anymore) -StackCocoaIOSARMConfig to build iStackVM, but still not working =============== Diff against CMakeVMMaker-EstebanLorenzano.141 =============== Item was changed: MacOSConfig subclass: #CocoaIOSConfig + instanceVariableNames: 'generateForRelease' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'CMakeVMMaker-IOS'! !CocoaIOSConfig commentStamp: 'MarianoMartinezPeck 4/24/2011 15:34' prior: 0! This is an abstract class for all Mac Cocoa configurations. It is intended to share code between different concrete implementations. Fore more information, check the class comments of all the superclasses. ! Item was changed: ----- Method: CocoaIOSConfig>>SqueakDebug (in category 'bundle strings') ----- SqueakDebug + ^self isGenerateForRelease + ifTrue: [ 0 ] + ifFalse: [ 1 ]! - ^0! Item was added: + ----- Method: CocoaIOSConfig>>architecture (in category 'settings') ----- + architecture + ^'i386'! Item was changed: ----- Method: CocoaIOSConfig>>compilerFlags (in category 'accessing') ----- compilerFlags | releaseFlags | + releaseFlags := self isGenerateForRelease - releaseFlags := self isRelease ifTrue: [ self compilerFlagsRelease ] ifFalse: [ self compilerFlagsDebug ]. ^String streamContents: [ :stream | (self commonCompilerFlags, releaseFlags) do: [ :each | stream nextPutAll: each ] separatedBy: [ stream space ] ]! Item was changed: ----- Method: CocoaIOSConfig>>extraPluginSettings: (in category 'plugin extra rules') ----- extraPluginSettings: maker maker set: 'CMAKE_OSX_ARCHITECTURES' to: 'i386'. maker setTargetProperty: 'COMPILE_FLAGS' to: '"-include \"', (self buildDir / self prefixHeaderFileName) fullName, '\""'. maker isExternal ifTrue: [ "copy result to results dir " maker set: 'LIBRARY_OUTPUT_PATH' toString: self outputDir. maker set: 'EXECUTABLE_OUTPUT_PATH' toString: self outputDir. maker puts: 'list(APPEND linkFlags "-undefined dynamic_lookup")' ]. + "maker addXCodeProperty: 'GCC_VERSION' value: '4.3'." - maker addXCodeProperty: 'GCC_VERSION' value: '4.2'. maker addXCodeProperty: 'GCC_PREFIX_HEADER' value: '${buildDir}/' , self executableName , '_Prefix.pch'. ! Item was changed: ----- Method: CocoaIOSConfig>>extraVMSettings: (in category 'settings') ----- extraVMSettings: maker + maker set: 'CMAKE_OSX_ARCHITECTURES' to: self architecture. - maker set: 'CMAKE_OSX_ARCHITECTURES' to: 'i386'. maker set: 'resourceDir' toString: self resourcesDir, '/ProjectBuilder'. + maker + set: 'resources' + to: (String streamContents: [ :stream | + self resources + do: [ :each | + stream + nextPut: $"; + nextPutAll: '${resourceDir}/'; + nextPutAll: each; + nextPut: $"] + separatedBy: [ stream space ] ]). - maker set: 'resources' to: - '"${resourceDir}/Squeak VM.r" - "${resourceDir}/Squeak.icns" - "${resourceDir}/Cog.icns" - "${resourceDir}/SqueakChanges.icns" - "${resourceDir}/SqueakImage.icns" - "${resourceDir}/SqueakPlugin.icns" - "${resourceDir}/SqueakScript.icns" - "${resourceDir}/SqueakGeneric.icns" - "${resourceDir}/SqueakProject.icns" - "${resourceDir}/SqueakSources.icns"'. maker set: 'resourcesLocaleEnglish' to: '"${resourceDir}/English.lproj/InfoPlist.strings" "${resourceDir}/English.lproj/MainMenu.nib"' ! Item was added: + ----- Method: CocoaIOSConfig>>generateForDebug (in category 'accessing') ----- + generateForDebug + generateForRelease := false! Item was added: + ----- Method: CocoaIOSConfig>>generateForRelease (in category 'accessing') ----- + generateForRelease + generateForRelease := true! Item was added: + ----- Method: CocoaIOSConfig>>initialize (in category 'initialization') ----- + initialize + super initialize. + self generateForRelease! Item was added: + ----- Method: CocoaIOSConfig>>isGenerateForRelease (in category 'testing') ----- + isGenerateForRelease + ^generateForRelease! Item was removed: - ----- Method: CocoaIOSConfig>>isRelease (in category 'testing') ----- - isRelease - ^true! Item was changed: ----- Method: CocoaIOSConfig>>precompiledHeaders (in category 'settings') ----- precompiledHeaders ^ '// // Prefix header for all source files of the ''', self executableName, ''' target in the ''', self executableName, ''' project // #ifdef __OBJC__ + ', + (String streamContents: [ :stream | + self precompiledImports + do: [ :each | + stream + nextPutAll: '#import '; + nextPut: $<; + nextPutAll: each; + nextPut: $> ] + separatedBy: [ + stream cr ] ]), ' - #import <Cocoa/Cocoa.h> #endif '! Item was added: + ----- Method: CocoaIOSConfig>>precompiledImports (in category 'settings') ----- + precompiledImports + ^#('Cocoa/Cocoa.h')! Item was added: + ----- Method: CocoaIOSConfig>>resources (in category 'settings') ----- + resources + ^#('Squeak VM.r' + 'Cog.icns' + 'Squeak.icns' + 'SqueakChanges.icns' + 'SqueakPlugin.icns' + 'SqueakScript.icns' + 'SqueakGeneric.icns' + 'SqueakProject.icns' + 'SqueakSources.icns') + + ! Item was changed: ----- Method: CogFamilyCocoaIOSConfig>>compilerFlagsRelease (in category 'settings') ----- compilerFlagsRelease ^#('-g0' '-Os' '-fvisibility=hidden' '-funroll-loops' '-fasm-blocks' '-finline-functions' '-mfpmath=sse' '-fomit-frame-pointer' '-march=pentium-m' '-mtune=prescott' '-falign-functions=16' '-fno-gcse' '-fno-cse-follow-jumps' '-std=gnu99' '-DBUILD_FOR_OSX' '-DUSE_INLINE_MEMORY_ACCESSORS' '-DLSB_FIRST' '-DUSE_INLINE_MEMORY_ACCESSORS' '-DHAVE_SYS_TIME_H' '-DHAVE_NANOSLEEP' '-DNDEBUG' '-DDEBUGVM=0' '-DCOGMTVM=0' '-DUSE_GLOBAL_STRUCT=0' '-DBASE_HEADER_SIZE=4')! Item was changed: ----- Method: CogFamilyCocoaIOSConfig>>setExtraTargetProperties: (in category 'settings') ----- setExtraTargetProperties: maker | plist | maker addFrameworks: self frameworks. " generated and add Info.plist file " plist := self plistFile. (maker buildDir forceNewFileNamed: 'Info.plist') nextPutAll: plist; close. maker addProperty: 'MACOSX_BUNDLE_INFO_PLIST' value: '${buildDir}/Info.plist'. maker cmd: 'set_source_files_properties' params: '${resources} PROPERTIES MACOSX_PACKAGE_LOCATION Resources'. maker cmd: 'set_source_files_properties' params: '${resourcesLocaleEnglish} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/English.lproj'. maker cmd: 'set_source_files_properties' params: '${ENGLISH_RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/English.lproj'. (maker buildDir forceNewFileNamed: self prefixHeaderFileName) nextPutAll: self precompiledHeaders; close. maker addXCodeProperty: 'GCC_PREFIX_HEADER' value: '${buildDir}/', self prefixHeaderFileName. maker addXCodeProperty: 'PER_ARCH_CFLAGS_i386' value: '-DLSB_FIRST -mfpmath=sse -finline-functions -fno-cse-follow-jumps -fno-gcse -mtune=prescott -march=pentium-m -falign-functions=16'. + "maker + addXCodeProperty: 'GCC_VERSION' value: '4.3'." - maker - addXCodeProperty: 'GCC_VERSION' value: '4.2'. maker cmd: 'set_target_properties' params: self executableName, ' PROPERTIES COMPILE_FLAGS "-include \"', (self buildDir / self prefixHeaderFileName) fullName, '\""'. maker set: 'EXECUTABLE_OUTPUT_PATH' toString: self outputDir. maker set: 'RUNTIME_OUTPUT_DIRECTORY' toString: self outputDir.! Item was removed: - CogMTCocoaIOSConfig subclass: #CogMTCocoaIOSDebugConfig - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'CMakeVMMaker-IOS'! - - !CogMTCocoaIOSDebugConfig commentStamp: 'MarianoMartinezPeck 4/24/2011 15:35' prior: 0! - This is a concrete class which generates a DEBUG thread-aware VM and threaded FFI CogVM for Mac using the Cocoa library. This VM is normally known as a debug CogMTVM. The debug means that it is compiled with all the necessary symbolic symbols for debugging and can be debugged, for example, with GDB. - - Fore more information, check the class comments of all the superclasses. - ! Item was removed: - ----- Method: CogMTCocoaIOSDebugConfig>>SqueakDebug (in category 'bundle strings') ----- - SqueakDebug - ^1! Item was removed: - ----- Method: CogMTCocoaIOSDebugConfig>>isRelease (in category 'testing') ----- - isRelease - "I'm a debug" - ^false! Item was added: + StackCocoaIOSCLANGConfig subclass: #StackCocoaIOSARMConfig + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'CMakeVMMaker-IOS'! Item was added: + ----- Method: StackCocoaIOSARMConfig>>architecture (in category 'settings') ----- + architecture + ^'"armv6" "armv7"'! Item was added: + ----- Method: StackCocoaIOSARMConfig>>commonCompilerFlags (in category 'accessing') ----- + commonCompilerFlags + "Common compiler flags" + ^#('-arch armv6' + '-arch armv7' + '-miphoneos-version-min=4.3' + '-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk' + '-x objective-c' + '-DTARGET_OS_IS_IPHONE' + '-DHAVE_UUID_GENERATE')! Item was added: + ----- Method: StackCocoaIOSARMConfig>>compilerFlagsDebug (in category 'settings') ----- + compilerFlagsDebug + ^#('-g3' '-O0' '-fvisibility=hidden' '-funroll-loops' '-fasm-blocks' '-finline-functions' '-mfpmath=sse' '-march=pentium-m' '-mtune=prescott' '-falign-functions=16' '-fno-gcse' '-fno-cse-follow-jumps' '-std=gnu99' '-DUSE_INLINE_MEMORY_ACCESSORS' '-DLSB_FIRST' '-DUSE_INLINE_MEMORY_ACCESSORS' '-DHAVE_SYS_TIME_H' '-DHAVE_NANOSLEEP' '-DDEBUGVM=1' '-DCOGMTVM=0' '-DUSE_GLOBAL_STRUCT=0' '-DBASE_HEADER_SIZE=4')! Item was added: + ----- Method: StackCocoaIOSARMConfig>>compilerFlagsRelease (in category 'settings') ----- + compilerFlagsRelease + ^#('-g0' '-Os' '-fvisibility=hidden' '-funroll-loops' '-fasm-blocks' '-finline-functions' '-mfpmath=sse' '-fomit-frame-pointer' '-march=pentium-m' '-mtune=prescott' '-falign-functions=16' '-fno-gcse' '-fno-cse-follow-jumps' '-std=gnu99' '-DUSE_INLINE_MEMORY_ACCESSORS' '-DLSB_FIRST' '-DUSE_INLINE_MEMORY_ACCESSORS' '-DHAVE_SYS_TIME_H' '-DHAVE_NANOSLEEP' '-DNDEBUG' '-DDEBUGVM=0' '-DCOGMTVM=0' '-DUSE_GLOBAL_STRUCT=0' '-DBASE_HEADER_SIZE=4')! Item was added: + ----- Method: StackCocoaIOSARMConfig>>defaultExternalPlugins (in category 'settings') ----- + defaultExternalPlugins + ^#()! Item was added: + ----- Method: StackCocoaIOSARMConfig>>defaultInternalPlugins (in category 'settings') ----- + defaultInternalPlugins + ^#() + "^ #( + ADPCMCodecPlugin + BMPReadWriterPlugin + BalloonEnginePlugin + BitBltSimulation + ClipboardExtendedPlugin + DSAPlugin + DeflatePlugin + DropPlugin + FFTPlugin + FilePlugin + FloatArrayPlugin + GeniePlugin + HostWindowPlugin + JPEGReadWriter2Plugin + JPEGReaderPlugin + LargeIntegersPlugin + Matrix2x3Plugin + MiscPrimitivePlugin + RePlugin + SecurityPlugin + SocketPlugin + SoundCodecPlugin + SoundGenerationPlugin + SoundPlugin + SurfacePlugin + UUIDPlugin + IOSPlugin + )"! Item was added: + ----- Method: StackCocoaIOSARMConfig>>executableName (in category 'accessing') ----- + executableName + ^ 'iStackVM'! Item was added: + ----- Method: StackCocoaIOSARMConfig>>frameworks (in category 'accessing') ----- + frameworks + ^ #( + "AppKit" + "Cocoa" + AudioToolbox + CoreAudio + CoreGraphics + CoreLocation + UIKit + Foundation + SystemConfiguration + "ApplicationServices" + QuartzCore + OpenGLES)! Item was added: + ----- Method: StackCocoaIOSARMConfig>>platformSources (in category 'source files') ----- + platformSources + "files added from platform/iOS/vm dir " + ^ #( + 'Common/main.m' + 'Common/Classes/Queue.m' + 'Common/Classes/sqMacV2Time.c' + 'Common/Classes/sqSqueakAppDelegate.m' + 'Common/Classes/sqSqueakFileDirectoryAPI.m' + 'Common/Classes/sqSqueakFileDirectoryInterface.m' + 'Common/Classes/sqSqueakInfoPlistInterface.m' + 'Common/Classes/sqSqueakMainApp.m' + 'Common/Classes/sqSqueakMainApplication.m' + 'Common/Classes/sqSqueakMainApplication+attributes.m' + 'Common/Classes/sqSqueakAttributesAPI.m' + 'Common/Classes/sqSqueakMainApplication+events.m' + 'Common/Classes/sqSqueakEventsAPI.m' + 'Common/Classes/sqSqueakMainApplication+imageReadWrite.m' + 'Common/Classes/sqSqueakMainApplication+sound.m' + 'Common/Classes/sqSqueakSoundAPI.m' + 'Common/Classes/sqSqueakMainApplication+vmAndImagePath.m' + 'Common/Classes/sqSqueakVmAndImagePathAPI.m' + 'Common/Classes/sqSqueakMainApplication+screen.m' + 'Common/Classes/sqSqueakScreenAPI.m' + 'Common/Classes/sqSqueakScreenAndWindow.m' + 'Common/Classes/sqSqueakCursorAPI.m' + 'Common/Classes/sqSqueakMainApplication+cursor.m' + 'iPhone/Classes/SqueakNoOGLIPhoneAppDelegate.m' + 'iPhone/Classes/sqSqueakIPhoneApplication.m' + 'iPhone/Classes/sqSqueakIPhoneApplication+attributes.m' + 'iPhone/Classes/sqSqueakIPhoneApplication+clipboard.m' + 'iPhone/Classes/sqSqueakIPhoneApplication+imageReadWrite.m' + 'iPhone/Classes/sqSqueakIPhoneApplication+events.m' + 'iPhone/Classes/sqSqueakIPhoneApplication+Network.m' + 'iPhone/Classes/sqSqueakiPhoneApplication+sound.m' + 'iPhone/Classes/sqSqueakIPhoneFileDirectoryInterface.m' + 'iPhone/Classes/sqSqueakIPhoneInfoPlistInterface.m' + 'iPhone/Classes/sqiPhoneScreenAndWindow.m' + 'iPhone/Classes/SqueakUIView.m' + 'iPhone/Classes/SqueakUIViewCALayer.m' + 'iPhone/Classes/SqueakUIViewOpenGL.m' + 'iPhone/Classes/SqueakUIController.m' + 'iPhone/Classes/sqSqueakIPhoneClipboardAPI.m' + 'iPhone/macintoshextra.c' + 'iPhone/osExports.c' + 'iPhone/sqDummyaio.c' + 'iPhone/sqMacV2Memory.c' + )! Item was added: + ----- Method: StackCocoaIOSARMConfig>>precompiledImports (in category 'settings') ----- + precompiledImports + ^#( + 'Foundation/Foundation.h' + 'UIKit/UIKit.h')! Item was added: + ----- Method: StackCocoaIOSARMConfig>>setExtraTargetProperties: (in category 'settings') ----- + setExtraTargetProperties: maker + "super setExtraTargetProperties: maker." + + | precompiledHeaders plist | + + precompiledHeaders := (self executableName, '_Prefix.pch'). + (maker buildDir forceNewFileNamed: precompiledHeaders) + nextPutAll: self precompiledHeaders; + close. + maker addXCodeProperty: 'GCC_PREFIX_HEADER' value: '${buildDir}/', precompiledHeaders. + + maker set: 'CMAKE_CROSSCOMPILING' to: 'TRUE'. + maker set: 'CMAKE_SYSTEM_NAMEG' toString: 'Darwin'. + maker set: 'CMAKE_SYSTEM_PROCESSOR' toString: 'arm'. + + maker set: 'SDKVER' toString: '5.0'. + maker set: 'DEVROOT' toString: '/Developer/Platforms/iPhoneOS.platform/Developer'. + maker set: 'SDKROOT' toString: '${DEVROOT}/SDKs/iPhoneOS${SDKVER}.sdk'. + + maker include: 'CMakeForceCompiler'. + maker cmd: 'CMAKE_FORCE_C_COMPILER' params: '${DEVROOT}/usr/bin/clang CLang'. + maker cmd: 'CMAKE_FORCE_CXX_COMPILER' params: '${DEVROOT}/usr/bin/clang++ CLang'. + + maker set: 'CMAKE_FIND_ROOT_PATH' to: '"${SDKROOT}" "${DEVROOT}"'. + maker set: 'CMAKE_FIND_ROOT_PATH_MODE_PROGRAM' to: 'NEVER'. + maker set: 'CMAKE_FIND_ROOT_PATH_MODE_LIBRARY' to: 'ONLY'. + maker set: 'CMAKE_FIND_ROOT_PATH_MODE_INCLUDE' to: 'ONLY'. + + maker addFrameworks: self frameworks. + + " generated and add Info.plist file " + plist := self plistFile. + + (maker buildDir forceNewFileNamed: 'Info.plist') + nextPutAll: plist; + close. + + maker + addProperty: 'MACOSX_BUNDLE_INFO_PLIST' + value: '${buildDir}/Info.plist'. + + maker + cmd: 'set_source_files_properties' + params: '${resources} PROPERTIES MACOSX_PACKAGE_LOCATION Resources'. + + maker + cmd: 'set_source_files_properties' + params: '${resourcesLocaleEnglish} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/English.lproj'. + + maker + cmd: 'set_source_files_properties' + params: '${ENGLISH_RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/English.lproj'. + + maker + cmd: 'set_target_properties' + params: self executableName, ' PROPERTIES COMPILE_FLAGS "-include \"', (self buildDir / self prefixHeaderFileName) fullName, '\""'. + + maker set: 'EXECUTABLE_OUTPUT_PATH' toString: self outputDir. + maker set: 'RUNTIME_OUTPUT_DIRECTORY' toString: self outputDir. + ! |
Free forum by Nabble | Edit this page |