Skip to content

Commit

Permalink
I fixed some compilation errors with the original Windows compilation…
Browse files Browse the repository at this point in the history
… scripts. I added some convenience scripts for building the different variants.
  • Loading branch information
ronsaldo committed Dec 24, 2016
1 parent 8714ffa commit ee8be2e
Show file tree
Hide file tree
Showing 39 changed files with 338 additions and 47 deletions.
22 changes: 8 additions & 14 deletions CMakeLists.txt
Expand Up @@ -2,14 +2,6 @@
cmake_minimum_required(VERSION 3.1)
project(OpenSmalltalkVM)

# Set output dir.
# OpenSmalltalkVM_BUILD_AS_INTERNAL_PROJECT can be used before including this
# project using add_subdirectory()
if(NOT OpenSmalltalkVM_BUILD_AS_INTERNAL_PROJECT)
set(EXECUTABLE_OUTPUT_PATH "${OpenSmalltalkVM_BINARY_DIR}/dist")
set(LIBRARY_OUTPUT_PATH "${OpenSmalltalkVM_BINARY_DIR}/dist")
endif()

# Check the build type
if (CMAKE_BUILD_TYPE STREQUAL "")
# CMake defaults to leaving CMAKE_BUILD_TYPE empty. This screws up
Expand Down Expand Up @@ -121,10 +113,6 @@ elseif(UNIX)
endif()
endif()

# Output paths.
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/dist")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/;${CMAKE_MODULE_PATH}")

set(SourceFolderName "")

# Spur object model
Expand Down Expand Up @@ -153,17 +141,23 @@ option(PHARO_BRANDING "Pharo Branding" ON)
set(VM_EXECUTABLE_NAME squeak)
set(VM_LIBRARY_NAME SqueakVMCore)
set(VM_NAME Squeak)
set(DEFAULT_IMAGE_NAME "Squeak.image")

if(PHARO_BRANDING)
add_definitions(-DPharoVM=1)
set(VM_EXECUTABLE_NAME pharo)
set(VM_LIBRARY_NAME PharoVMCore)
set(VM_NAME Pharo)
set(DEFAULT_IMAGE_NAME "Pharo.image")
endif()
add_definitions(-DVM_NAME="${VM_NAME}" -DDEFAULT_IMAGE_NAME="${DEFAULT_IMAGE_NAME}")

# Set output dir.
# OpenSmalltalkVM_BUILD_AS_INTERNAL_PROJECT can be used before including this
# project using add_subdirectory()
if(NOT OpenSmalltalkVM_BUILD_AS_INTERNAL_PROJECT)
set(EXECUTABLE_OUTPUT_PATH "${OpenSmalltalkVM_BINARY_DIR}/dist")
set(LIBRARY_OUTPUT_PATH "${OpenSmalltalkVM_BINARY_DIR}/dist")
endif()

# Cog JIT
option(COG_JIT "Cog JIT" ON)
if(COG_JIT)
Expand Down
13 changes: 13 additions & 0 deletions build.minheadless.cmake/x64/common/configure_variant.sh
@@ -0,0 +1,13 @@
#!/bin/sh
VARIANT_FOLDER="$1"
VARIANT_NAME="$2"
OS_NAME="`uname -o`"
GENERATOR_NAME="Unix Makefiles"

rm -rf "./$VARIANT_FOLDER"
mkdir "./$VARIANT_FOLDER"
cd "./$VARIANT_FOLDER"

if [ "$OS_NAME" = "Msys" ]; then
GENERATOR_NAME="MSYS Makefiles"
fi
18 changes: 18 additions & 0 deletions build.minheadless.cmake/x64/pharo.cog.spur/Makefile
@@ -0,0 +1,18 @@
all:
$(MAKE) -C debug all
$(MAKE) -C assert all
$(MAKE) -C relwithdebinfo all
$(MAKE) -C release all

clean:
$(MAKE) -C debug clean
$(MAKE) -C assert clean
$(MAKE) -C relwithdebinfo clean
$(MAKE) -C release clean

distclean:
rm -rf debug
rm -rf assert
rm -rf relwithdebinfo
rm -rf release

4 changes: 4 additions & 0 deletions build.minheadless.cmake/x64/pharo.cog.spur/mvm
@@ -0,0 +1,4 @@
#!/bin/sh

./mvm_configure
make
6 changes: 6 additions & 0 deletions build.minheadless.cmake/x64/pharo.cog.spur/mvm_configure
@@ -0,0 +1,6 @@
#!/bin/sh

./mvm_configure_variant debug Debug
./mvm_configure_variant assert Assert
./mvm_configure_variant relwithdebinfo RelWithDebInfo
./mvm_configure_variant release Release
@@ -0,0 +1,4 @@
#!/bin/sh
. ../common/configure_variant.sh

cmake ../../../.. -G "$GENERATOR_NAME" -DCMAKE_BUILD_TYPE="$VARIANT_NAME" -DPHARO_BRANDING=On -DSPUR_OBJECT_MODEL=On -DCOG_JIT=On
18 changes: 18 additions & 0 deletions build.minheadless.cmake/x64/pharo.stack.spur/Makefile
@@ -0,0 +1,18 @@
all:
$(MAKE) -C debug all
$(MAKE) -C assert all
$(MAKE) -C relwithdebinfo all
$(MAKE) -C release all

clean:
$(MAKE) -C debug clean
$(MAKE) -C assert clean
$(MAKE) -C relwithdebinfo clean
$(MAKE) -C release clean

distclean:
rm -rf debug
rm -rf assert
rm -rf relwithdebinfo
rm -rf release

4 changes: 4 additions & 0 deletions build.minheadless.cmake/x64/pharo.stack.spur/mvm
@@ -0,0 +1,4 @@
#!/bin/sh

./mvm_configure
make
6 changes: 6 additions & 0 deletions build.minheadless.cmake/x64/pharo.stack.spur/mvm_configure
@@ -0,0 +1,6 @@
#!/bin/sh

./mvm_configure_variant debug Debug
./mvm_configure_variant assert Assert
./mvm_configure_variant relwithdebinfo RelWithDebInfo
./mvm_configure_variant release Release
@@ -0,0 +1,4 @@
#!/bin/sh
. ../common/configure_variant.sh

cmake ../../../.. -G "$GENERATOR_NAME" -DCMAKE_BUILD_TYPE="$VARIANT_NAME" -DPHARO_BRANDING=On -DSPUR_OBJECT_MODEL=On -DCOG_JIT=Off
18 changes: 18 additions & 0 deletions build.minheadless.cmake/x64/squeak.cog.spur/Makefile
@@ -0,0 +1,18 @@
all:
$(MAKE) -C debug all
$(MAKE) -C assert all
$(MAKE) -C relwithdebinfo all
$(MAKE) -C release all

clean:
$(MAKE) -C debug clean
$(MAKE) -C assert clean
$(MAKE) -C relwithdebinfo clean
$(MAKE) -C release clean

distclean:
rm -rf debug
rm -rf assert
rm -rf relwithdebinfo
rm -rf release

4 changes: 4 additions & 0 deletions build.minheadless.cmake/x64/squeak.cog.spur/mvm
@@ -0,0 +1,4 @@
#!/bin/sh

./mvm_configure
make
6 changes: 6 additions & 0 deletions build.minheadless.cmake/x64/squeak.cog.spur/mvm_configure
@@ -0,0 +1,6 @@
#!/bin/sh

./mvm_configure_variant debug Debug
./mvm_configure_variant assert Assert
./mvm_configure_variant relwithdebinfo RelWithDebInfo
./mvm_configure_variant release Release
@@ -0,0 +1,4 @@
#!/bin/sh
. ../common/configure_variant.sh

cmake ../../../.. -G "$GENERATOR_NAME" -DCMAKE_BUILD_TYPE="$VARIANT_NAME" -DPHARO_BRANDING=Off -DSPUR_OBJECT_MODEL=On -DCOG_JIT=On
18 changes: 18 additions & 0 deletions build.minheadless.cmake/x64/squeak.stack.spur/Makefile
@@ -0,0 +1,18 @@
all:
$(MAKE) -C debug all
$(MAKE) -C assert all
$(MAKE) -C relwithdebinfo all
$(MAKE) -C release all

clean:
$(MAKE) -C debug clean
$(MAKE) -C assert clean
$(MAKE) -C relwithdebinfo clean
$(MAKE) -C release clean

distclean:
rm -rf debug
rm -rf assert
rm -rf relwithdebinfo
rm -rf release

4 changes: 4 additions & 0 deletions build.minheadless.cmake/x64/squeak.stack.spur/mvm
@@ -0,0 +1,4 @@
#!/bin/sh

./mvm_configure
make
6 changes: 6 additions & 0 deletions build.minheadless.cmake/x64/squeak.stack.spur/mvm_configure
@@ -0,0 +1,6 @@
#!/bin/sh

./mvm_configure_variant debug Debug
./mvm_configure_variant assert Assert
./mvm_configure_variant relwithdebinfo RelWithDebInfo
./mvm_configure_variant release Release
@@ -0,0 +1,4 @@
#!/bin/sh
. ../common/configure_variant.sh

cmake ../../../.. -G "$GENERATOR_NAME" -DCMAKE_BUILD_TYPE="$VARIANT_NAME" -DPHARO_BRANDING=Off -DSPUR_OBJECT_MODEL=On -DCOG_JIT=Off
13 changes: 13 additions & 0 deletions build.minheadless.cmake/x86/common/configure_variant.sh
@@ -0,0 +1,13 @@
#!/bin/sh
VARIANT_FOLDER="$1"
VARIANT_NAME="$2"
OS_NAME="`uname -o`"
GENERATOR_NAME="Unix Makefiles"

rm -rf "./$VARIANT_FOLDER"
mkdir "./$VARIANT_FOLDER"
cd "./$VARIANT_FOLDER"

if [ "$OS_NAME" = "Msys" ]; then
GENERATOR_NAME="MSYS Makefiles"
fi
18 changes: 18 additions & 0 deletions build.minheadless.cmake/x86/pharo.cog.spur/Makefile
@@ -0,0 +1,18 @@
all:
$(MAKE) -C debug all
$(MAKE) -C assert all
$(MAKE) -C relwithdebinfo all
$(MAKE) -C release all

clean:
$(MAKE) -C debug clean
$(MAKE) -C assert clean
$(MAKE) -C relwithdebinfo clean
$(MAKE) -C release clean

distclean:
rm -rf debug
rm -rf assert
rm -rf relwithdebinfo
rm -rf release

4 changes: 4 additions & 0 deletions build.minheadless.cmake/x86/pharo.cog.spur/mvm
@@ -0,0 +1,4 @@
#!/bin/sh

./mvm_configure
make
6 changes: 6 additions & 0 deletions build.minheadless.cmake/x86/pharo.cog.spur/mvm_configure
@@ -0,0 +1,6 @@
#!/bin/sh

./mvm_configure_variant debug Debug
./mvm_configure_variant assert Assert
./mvm_configure_variant relwithdebinfo RelWithDebInfo
./mvm_configure_variant release Release
@@ -0,0 +1,4 @@
#!/bin/sh
. ../common/configure_variant.sh

cmake ../../../.. -G "$GENERATOR_NAME" -DCMAKE_BUILD_TYPE="$VARIANT_NAME" -DBUILD_I386_VERSION=On -DPHARO_BRANDING=On -DSPUR_OBJECT_MODEL=On -DCOG_JIT=On
18 changes: 18 additions & 0 deletions build.minheadless.cmake/x86/pharo.stack.spur/Makefile
@@ -0,0 +1,18 @@
all:
$(MAKE) -C debug all
$(MAKE) -C assert all
$(MAKE) -C relwithdebinfo all
$(MAKE) -C release all

clean:
$(MAKE) -C debug clean
$(MAKE) -C assert clean
$(MAKE) -C relwithdebinfo clean
$(MAKE) -C release clean

distclean:
rm -rf debug
rm -rf assert
rm -rf relwithdebinfo
rm -rf release

4 changes: 4 additions & 0 deletions build.minheadless.cmake/x86/pharo.stack.spur/mvm
@@ -0,0 +1,4 @@
#!/bin/sh

./mvm_configure
make
6 changes: 6 additions & 0 deletions build.minheadless.cmake/x86/pharo.stack.spur/mvm_configure
@@ -0,0 +1,6 @@
#!/bin/sh

./mvm_configure_variant debug Debug
./mvm_configure_variant assert Assert
./mvm_configure_variant relwithdebinfo RelWithDebInfo
./mvm_configure_variant release Release
@@ -0,0 +1,4 @@
#!/bin/sh
. ../common/configure_variant.sh

cmake ../../../.. -G "$GENERATOR_NAME" -DCMAKE_BUILD_TYPE="$VARIANT_NAME" -DBUILD_I386_VERSION=On -DPHARO_BRANDING=On -DSPUR_OBJECT_MODEL=On -DCOG_JIT=Off
18 changes: 18 additions & 0 deletions build.minheadless.cmake/x86/squeak.cog.spur/Makefile
@@ -0,0 +1,18 @@
all:
$(MAKE) -C debug all
$(MAKE) -C assert all
$(MAKE) -C relwithdebinfo all
$(MAKE) -C release all

clean:
$(MAKE) -C debug clean
$(MAKE) -C assert clean
$(MAKE) -C relwithdebinfo clean
$(MAKE) -C release clean

distclean:
rm -rf debug
rm -rf assert
rm -rf relwithdebinfo
rm -rf release

4 changes: 4 additions & 0 deletions build.minheadless.cmake/x86/squeak.cog.spur/mvm
@@ -0,0 +1,4 @@
#!/bin/sh

./mvm_configure
make
6 changes: 6 additions & 0 deletions build.minheadless.cmake/x86/squeak.cog.spur/mvm_configure
@@ -0,0 +1,6 @@
#!/bin/sh

./mvm_configure_variant debug Debug
./mvm_configure_variant assert Assert
./mvm_configure_variant relwithdebinfo RelWithDebInfo
./mvm_configure_variant release Release
@@ -0,0 +1,4 @@
#!/bin/sh
. ../common/configure_variant.sh

cmake ../../../.. -G "$GENERATOR_NAME" -DCMAKE_BUILD_TYPE="$VARIANT_NAME" -DBUILD_I386_VERSION=On -DPHARO_BRANDING=Off -DSPUR_OBJECT_MODEL=On -DCOG_JIT=On
18 changes: 18 additions & 0 deletions build.minheadless.cmake/x86/squeak.stack.spur/Makefile
@@ -0,0 +1,18 @@
all:
$(MAKE) -C debug all
$(MAKE) -C assert all
$(MAKE) -C relwithdebinfo all
$(MAKE) -C release all

clean:
$(MAKE) -C debug clean
$(MAKE) -C assert clean
$(MAKE) -C relwithdebinfo clean
$(MAKE) -C release clean

distclean:
rm -rf debug
rm -rf assert
rm -rf relwithdebinfo
rm -rf release

4 changes: 4 additions & 0 deletions build.minheadless.cmake/x86/squeak.stack.spur/mvm
@@ -0,0 +1,4 @@
#!/bin/sh

./mvm_configure
make
6 changes: 6 additions & 0 deletions build.minheadless.cmake/x86/squeak.stack.spur/mvm_configure
@@ -0,0 +1,6 @@
#!/bin/sh

./mvm_configure_variant debug Debug
./mvm_configure_variant assert Assert
./mvm_configure_variant relwithdebinfo RelWithDebInfo
./mvm_configure_variant release Release
@@ -0,0 +1,4 @@
#!/bin/sh
. ../common/configure_variant.sh

cmake ../../../.. -G "$GENERATOR_NAME" -DCMAKE_BUILD_TYPE="$VARIANT_NAME" -DBUILD_I386_VERSION=On -DPHARO_BRANDING=Off -DSPUR_OBJECT_MODEL=On -DCOG_JIT=Off
2 changes: 1 addition & 1 deletion platforms/minheadless/windows/sqWin32Main.c
Expand Up @@ -45,5 +45,5 @@ int CALLBACK WinMain(
int nCmdShow
)
{
return squeak_main(__argc, __argv);
return squeak_main(__argc, (const char **)__argv);
}

0 comments on commit ee8be2e

Please sign in to comment.