Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 6b8c9b1

Browse files
Tweak the makefiles in preparation for commercial builds
1 parent 701b304 commit 6b8c9b1

File tree

4 files changed

+31
-8
lines changed

4 files changed

+31
-8
lines changed

Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ else
4343
$(error "Mode must be 'debug' or 'release'")
4444
endif
4545

46+
# Where to run the build command depends on community vs commercial
47+
ifeq ($(BUILD_EDITION),commercial)
48+
BUILD_SUBDIR :=
49+
BUILD_PROJECT := livecode-commercial
50+
else
51+
BUILD_SUBDIR := "/livecode"
52+
BUILD_PROJECT := livecode
53+
endif
54+
4655
################################################################
4756

4857
.DEFAULT: all
@@ -74,7 +83,7 @@ config-linux-%:
7483
./config.sh --platform linux-$*
7584

7685
compile-linux-%:
77-
$(MAKE) -C build-linux-$*
86+
$(MAKE) -C build-linux-$*/livecode
7887

7988
all-linux-%:
8089
$(MAKE) config-linux-$*
@@ -92,7 +101,7 @@ config-android-%:
92101
./config.sh --platform android-$*
93102

94103
compile-android-%:
95-
$(MAKE) -C build-android-$*
104+
$(MAKE) -C build-android-$*/livecode
96105

97106
all-android-%:
98107
$(MAKE) config-android-$*
@@ -108,7 +117,7 @@ config-mac:
108117
./config.sh --platform mac
109118

110119
compile-mac:
111-
$(XCODEBUILD) -project build-mac/livecode.xcodeproj -configuration $(BUILDTYPE)
120+
$(XCODEBUILD) -project build-mac$(BUILD_SUBDIR)/$(BUILD_PROJECT).xcodeproj -configuration $(BUILDTYPE)
112121

113122
all-mac:
114123
$(MAKE) config-mac
@@ -126,7 +135,7 @@ config-ios-%:
126135
./config.sh --platform ios --generator-output build-ios-$* -Dtarget_sdk=$*
127136

128137
compile-ios-%:
129-
$(XCODEBUILD) -project build-ios-$*/livecode.xcodeproj -configuration $(BUILDTYPE)
138+
$(XCODEBUILD) -project build-ios-$*$(BUILD_SUBDIR)/$(BUILD_PROJECT).xcodeproj -configuration $(BUILDTYPE)
130139

131140
# Provide some synonyms for "latest iOS SDK"
132141
$(addsuffix -ios-iphoneos,all config compile): %: %8.3
@@ -156,3 +165,4 @@ all-win-%:
156165
$(MAKE) compile-win-$*
157166

158167
$(addsuffix -win,all config compile): %: %-x86
168+

config.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ esac
187187

188188
# Guess generator output directory from platform
189189
if test -z "$GENERATOR_OUTPUT"; then
190-
GENERATOR_OUTPUT="build-${PLATFORM}"
190+
GENERATOR_OUTPUT="build-${PLATFORM}/livecode"
191191
fi
192192

193193
# Guess OS from platform
@@ -283,6 +283,10 @@ ANDROID_STRIP=${STRIP:-${ANDROID_TOOLCHAIN}strip}
283283
format_args="$(for f in ${FORMATS}; do echo --format ${f} ; done)"
284284
basic_args="${format_args} --depth ${DEPTH} --generator-output ${GENERATOR_OUTPUT}"
285285

286+
if [ "${BUILD_EDITION}" == "commercial" ] ; then
287+
basic_args="${basic_args} ../livecode-commercial.gyp"
288+
fi
289+
286290
case ${OS} in
287291
linux)
288292
invoke_gyp $basic_args "-DOS=${OS}" "-Dtarget_arch=${TARGET_ARCH}" "$@"

engine/kernel.gypi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
{
135135
'sources':
136136
[
137-
'<(INTERMEDIATE_DIR)/src/linux.stubs.cpp',
137+
'<(SHARED_INTERMEDIATE_DIR)/src/linux.stubs.cpp',
138138
],
139139

140140
'libraries':
@@ -156,7 +156,7 @@
156156
],
157157
'outputs':
158158
[
159-
'<(INTERMEDIATE_DIR)/src/linux.stubs.cpp',
159+
'<(SHARED_INTERMEDIATE_DIR)/src/linux.stubs.cpp',
160160
],
161161

162162
'action':

make.cmd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,17 @@
1212
@REM Select the correct build mode.
1313
@REM
1414
@IF NOT DEFINED BUILDTYPE SET BUILDTYPE=Debug
15+
16+
@REM Select the correct build project file
17+
@REM
18+
IF NOT DEFINED BUILD_EDITION SET BUILD_EDITION=community
19+
IF %BUILD_EDITION%==commercial (
20+
SET BUILD_PROJECT=livecode-commercial.sln
21+
) ELSE (
22+
SET BUILD_PROJECT=livecode\livecode.sln
23+
)
1524

16-
@msbuild livecode.sln /fl /flp:Verbosity=normal /nologo /p:Configuration=%BUILDTYPE% /m:1
25+
@msbuild %BUILD_PROJECT% /fl /flp:Verbosity=normal /nologo /p:Configuration=%BUILDTYPE% /m:1
1726

1827
@exit %ERRORLEVEL%
1928

0 commit comments

Comments
 (0)