| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d80e4ad commit fda187f
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,15 +34,6 @@ IOS_SDKS ?= \ | |||
| 34 | 34 | ||
| 35 | 35 | # Choose the correct build type | |
| 36 | 36 | MODE ?= debug | |
| 37 | - ifeq ($(MODE),debug) | ||
| 38 | - export BUILDTYPE ?= Debug | ||
| 39 | - else ifeq ($(MODE),release) | ||
| 40 | - export BUILDTYPE ?= Release | ||
| 41 | - else ifeq ($(MODE),fast) | ||
| 42 | - export BUILDTYPE ?= Fast | ||
| 43 | - else | ||
| 44 | - $(error "Mode must be 'debug' or 'release'") | ||
| 45 | - endif | ||
| 46 | 37 | ||
| 47 | 38 | # Where to run the build command depends on community vs commercial | |
| 48 | 39 | ifeq ($(BUILD_EDITION),commercial) | |
@@ -53,17 +44,12 @@ else | |||
| 53 | 44 | BUILD_PROJECT := livecode | |
| 54 | 45 | endif | |
| 55 | 46 | ||
| 47 | + include Makefile.common | ||
| 48 | + | ||
| 56 | 49 | ################################################################ | |
| 57 | 50 | ||
| 58 | 51 | .DEFAULT: all | |
| 59 | 52 | ||
| 60 | - guess_platform_script := \ | ||
| 61 | - case `uname -s` in \ | ||
| 62 | - Linux) echo linux ;; \ | ||
| 63 | - Darwin) echo mac ;; \ | ||
| 64 | - esac | ||
| 65 | - guess_platform := $(shell $(guess_platform_script)) | ||
| 66 | - | ||
| 67 | 53 | all: all-$(guess_platform) | |
| 68 | 54 | check: check-$(guess_platform) | |
| 69 | 55 | ||
@@ -78,14 +64,6 @@ check-common-%: | |||
| 78 | 64 | ||
| 79 | 65 | LINUX_ARCHS = x86_64 x86 | |
| 80 | 66 | ||
| 81 | - guess_linux_arch_script := \ | ||
| 82 | - case `uname -p` in \ | ||
| 83 | - x86_64) echo x86_64 ;; \ | ||
| 84 | - x86|i*86) echo x86 ;; \ | ||
| 85 | - esac | ||
| 86 | - | ||
| 87 | - guess_linux_arch := $(shell $(guess_linux_arch_script)) | ||
| 88 | - | ||
| 89 | 67 | config-linux-%: | |
| 90 | 68 | ./config.sh --platform linux-$* | |
| 91 | 69 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,64 @@ | |||
| 1 | + # Copyright (C) 2016 LiveCode Ltd. | ||
| 2 | + # | ||
| 3 | + # This file is part of LiveCode. | ||
| 4 | + # | ||
| 5 | + # LiveCode is free software; you can redistribute it and/or modify it under | ||
| 6 | + # the terms of the GNU General Public License v3 as published by the Free | ||
| 7 | + # Software Foundation. | ||
| 8 | + # | ||
| 9 | + # LiveCode is distributed in the hope that it will be useful, but WITHOUT ANY | ||
| 10 | + # WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | + # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 12 | + # for more details. | ||
| 13 | + # | ||
| 14 | + # You should have received a copy of the GNU General Public License | ||
| 15 | + # along with LiveCode. If not see <http://www.gnu.org/licenses/>. | ||
| 16 | + | ||
| 17 | + # This file consists of some common functionality required by various | ||
| 18 | + # Makefiles | ||
| 19 | + | ||
| 20 | + ifeq ($(MODE),debug) | ||
| 21 | + export BUILDTYPE ?= Debug | ||
| 22 | + else ifeq ($(MODE),release) | ||
| 23 | + export BUILDTYPE ?= Release | ||
| 24 | + else ifeq ($(MODE),fast) | ||
| 25 | + export BUILDTYPE ?= Fast | ||
| 26 | + else | ||
| 27 | + $(error "Mode must be 'debug' or 'release'") | ||
| 28 | + endif | ||
| 29 | + | ||
| 30 | + ################################################################ | ||
| 31 | + # Attempt to guess where to find various tools and libraries | ||
| 32 | + ################################################################ | ||
| 33 | + | ||
| 34 | + top_srcdir ?= . | ||
| 35 | + | ||
| 36 | + guess_linux_arch_script := \ | ||
| 37 | + case `uname -p` in \ | ||
| 38 | + x86_64) echo x86_64 ;; \ | ||
| 39 | + x86|i*86) echo x86 ;; \ | ||
| 40 | + esac | ||
| 41 | + guess_linux_arch := $(shell $(guess_linux_arch_script)) | ||
| 42 | + | ||
| 43 | + guess_platform_script := \ | ||
| 44 | + case `uname -s` in \ | ||
| 45 | + Linux) echo linux-$(guess_linux_arch) ;; \ | ||
| 46 | + Darwin) echo mac ;; \ | ||
| 47 | + esac | ||
| 48 | + guess_platform := $(shell $(guess_platform_script)) | ||
| 49 | + | ||
| 50 | + guess_engine_flags_script := \ | ||
| 51 | + if echo $(guess_platform) | grep "^linux" >/dev/null 2>&1 && \ | ||
| 52 | + ! xset -q >/dev/null 2>&1 ; then \ | ||
| 53 | + echo "-ui"; \ | ||
| 54 | + fi | ||
| 55 | + guess_engine_flags := $(shell $(guess_engine_flags_script)) | ||
| 56 | + | ||
| 57 | + ifeq ($(guess_platform),mac) | ||
| 58 | + bin_dir ?= $(top_srcdir)/_build/mac/$(BUILDTYPE) | ||
| 59 | + else | ||
| 60 | + bin_dir ?= $(top_srcdir)/$(guess_platform)-bin | ||
| 61 | + endif | ||
| 62 | + | ||
| 63 | + guess_engine := $(if $(filter mac,$(guess_platform)),$(bin_dir)/Standalone-Community.app/Contents/MacOS/Standalone-Community,$(bin_dir)/standalone-community) | ||
| 64 | + guess_dev_engine := $(if $(filter mac,$(guess_platform)),$(bin_dir)/LiveCode-Community.app/Contents/MacOS/LiveCode-Community,$(bin_dir)/LiveCode-Community) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,57 +4,17 @@ else | |||
| 4 | 4 | _PRINT_RULE ?= | |
| 5 | 5 | endif | |
| 6 | 6 | ||
| 7 | - ################################################################ | ||
| 8 | - # Attempt to guess where to find various tools and libraries | ||
| 9 | - ################################################################ | ||
| 10 | - | ||
| 11 | 7 | MODE ?= release | |
| 12 | - ifeq ($(MODE),release) | ||
| 13 | - UC_MODE := Release | ||
| 14 | - else ifeq ($(MODE),debug) | ||
| 15 | - UC_MODE := Debug | ||
| 16 | - else ifeq ($(MODE),fast) | ||
| 17 | - UC_MODE := Fast | ||
| 18 | - else | ||
| 19 | - $(error "Mode must be 'debug' or 'release'") | ||
| 20 | - endif | ||
| 21 | - | ||
| 22 | 8 | top_srcdir ?= .. | |
| 23 | - TEST_DIR ?= $(top_srcdir)/_tests | ||
| 24 | - LCM_DIR ?= $(TEST_DIR)/_build | ||
| 25 | 9 | ||
| 26 | - guess_linux_arch_script := \ | ||
| 27 | - case `uname -p` in \ | ||
| 28 | - x86_64) echo x86_64 ;; \ | ||
| 29 | - x86|i*86) echo x86 ;; \ | ||
| 30 | - esac | ||
| 31 | - guess_linux_arch := $(shell $(guess_linux_arch_script)) | ||
| 32 | - | ||
| 33 | - guess_platform_script := \ | ||
| 34 | - case `uname -s` in \ | ||
| 35 | - Linux) echo linux-$(guess_linux_arch) ;; \ | ||
| 36 | - Darwin) echo mac ;; \ | ||
| 37 | - esac | ||
| 38 | - guess_platform := $(shell $(guess_platform_script)) | ||
| 39 | - | ||
| 40 | - ifeq ($(guess_platform),mac) | ||
| 41 | - bin_dir ?= $(top_srcdir)/_build/mac/$(UC_MODE) | ||
| 42 | - else | ||
| 43 | - bin_dir ?= $(top_srcdir)/$(guess_platform)-bin | ||
| 44 | - endif | ||
| 10 | + include $(top_srcdir)/Makefile.common | ||
| 45 | 11 | ||
| 46 | 12 | ########## LiveCode Script test parameters | |
| 47 | 13 | ||
| 48 | - guess_engine := $(if $(filter mac,$(guess_platform)),$(bin_dir)/Standalone-Community.app/Contents/MacOS/Standalone-Community,$(bin_dir)/standalone-community) | ||
| 49 | - guess_dev_engine := $(if $(filter mac,$(guess_platform)),$(bin_dir)/LiveCode-Community.app/Contents/MacOS/LiveCode-Community,$(bin_dir)/LiveCode-Community) | ||
| 14 | + TEST_DIR ?= $(top_srcdir)/_tests | ||
| 15 | + LCM_DIR ?= $(TEST_DIR)/_build | ||
| 50 | 16 | ||
| 51 | 17 | # When running on headless Linux, run tests in -ui mode. | |
| 52 | - guess_engine_flags_script := \ | ||
| 53 | - if echo $(guess_platform) | grep "^linux" >/dev/null 2>&1 && \ | ||
| 54 | - ! xset -q >/dev/null 2>&1 ; then \ | ||
| 55 | - echo "-ui"; \ | ||
| 56 | - fi | ||
| 57 | - guess_engine_flags := $(shell $(guess_engine_flags_script)) | ||
| 58 | 18 | ||
| 59 | 19 | LCS_ENGINE ?= $(guess_engine) | |
| 60 | 20 | LCS_ENGINE_FLAGS ?= $(guess_engine_flags) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments