[DEV] correction of the Mac modification in the makefiles

This commit is contained in:
Edouard DUPIN 2013-03-11 22:24:44 +01:00
parent 1177a53e86
commit fceecb4db2
21 changed files with 178 additions and 172 deletions

View File

@ -1,15 +1,20 @@
###############################################################################
## @author Edouard DUPIN
## @date 17-08-2012
## @project standard Build system
## @copyright BSDv3
###############################################################################
# Define SDK and NDK folder for Android compilation tools and packager tools :
ifeq ("$(PROJECT_NDK)","")
PROJECT_NDK:=$(call fullpath,$(PROJECT_PATH)/../android/ndk/)
$(info Auto define android NDK project to : $(PROJECT_NDK))
endif
ifeq ("$(PROJECT_NDK)","")
PROJECT_SDK:=$(call fullpath,$(PROJECT_PATH)/../android/sdk/)
$(info Auto define Android SDK project to : $(PROJECT_SDK))
endif
# Setup macros definitions
include $(BUILD_SYSTEM)/core/defs.mk
# include generic makefile :
include $(BUILD_SYSTEM)/core/check-project-variable.mk
PROJECT_NDK?=..
TARGET_OS := Android
#TARGET_ARCH := ARM
TARGET_ARCH := ARMv7
TARGET_CROSS := $(PROJECT_NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-

View File

@ -1,11 +1,9 @@
# Setup macros definitions
include $(BUILD_SYSTEM)/core/defs.mk
# include generic makefile :
include $(BUILD_SYSTEM)/core/check-project-variable.mk
###############################################################################
## @author Edouard DUPIN
## @date 17-08-2012
## @project standard Build system
## @copyright BSDv3
###############################################################################
TARGET_OUT_FOLDER_BINARY := $(PROJECT_NAME2)/usr/bin
TARGET_OUT_FOLDER_LIBRAIRY := $(PROJECT_NAME2)/usr/lib
@ -15,7 +13,7 @@ TARGET_OUT_PREFIX_LIBRAIRY :=
# include generic makefile :
include $(BUILD_SYSTEM)/core/main.mk
include $(BUILD_SYSTEM)/main.mk
TARGET_OUT_FOLDER_DEBIAN=$(TARGET_OUT_STAGING)/$(PROJECT_NAME2)/DEBIAN

View File

@ -1,13 +1,9 @@
# Setup macros definitions
include $(BUILD_SYSTEM)/core/defs.mk
# include generic makefile :
include $(BUILD_SYSTEM)/core/check-project-variable.mk
###############################################################################
## @author Edouard DUPIN
## @date 17-08-2012
## @project standard Build system
## @copyright BSDv3
###############################################################################
# for MAcOSX we need to FORCE CLANG
CLANG:=1
@ -25,7 +21,7 @@ TARGET_OUT_PREFIX_LIBRAIRY :=
# include generic makefile :
include $(BUILD_SYSTEM)/core/main.mk
include $(BUILD_SYSTEM)/main.mk
FINAL_FOLDER= $(TARGET_OUT_FINAL)/$(PROJECT_NAME).app/Contents

View File

@ -1,14 +1,10 @@
###############################################################################
## @author Edouard DUPIN
## @date 17-08-2012
## @project standard Build system
## @copyright BSDv3
###############################################################################
# Setup macros definitions
include $(BUILD_SYSTEM)/core/defs.mk
# include generic makefile :
include $(BUILD_SYSTEM)/core/check-project-variable.mk
# defien the target OS of this system
TARGET_OS=Windows
# define the cross compilateur
TARGET_CROSS=i586-mingw32msvc-
@ -18,7 +14,7 @@ TARGET_OUT_FOLDER_DATA := data
TARGET_OUT_FOLDER_DOC := doc
TARGET_OUT_PREFIX_LIBRAIRY :=
include $(BUILD_SYSTEM)/core/main.mk
include $(BUILD_SYSTEM)/main.mk
final: all

View File

@ -1,35 +1,83 @@
###############################################################################
## @author Edouard DUPIN
## @date 17-08-2012
## @project standard Build system
## @copyright BSDv3
###############################################################################
# get the local dir in a good form :
###############################################################################
## General setup.
###############################################################################
# Make sure SHELL is correctly set
SHELL := /bin/bash
# This is the default target. It must be the first declared target.
all:
# Turns off suffix rules built into make
.SUFFIXES:
# Quiet command if V is 0
ifneq ("$(V)","1")
Q := @
endif
###############################################################################
## Basic PATHS.
###############################################################################
# Directories (full path)
TOP_DIR := $(shell pwd)
#BUILD_SYSTEM := $(shell readlink -m -n $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))))
BUILD_SYSTEM := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
BUILD_SYSTEM_BASE := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
BUILD_SYSTEM := $(BUILD_SYSTEM_BASE)/core
###############################################################################
## Basic configurations.
###############################################################################
# Determine the Host-Os type :
include $(BUILD_SYSTEM)/setup-host-define-type.mk
# Setup macros definitions :
include $(BUILD_SYSTEM)/defs.mk
# include generic makefile :
include $(BUILD_SYSTEM)/check-project-variable.mk
###############################################################################
### Platform specificity : ###
###############################################################################
SUPPORTED_PLATFORM=Linux Windows MacOs IOs Android
DEFAULT_PLATFORM=Linux
# By default we build for the current platform
DEFAULT_PLATFORM=$(HOST_OS)
# default platform can be overridden
PLATFORM?=$(DEFAULT_PLATFORM)
PROJECT_PATH=$(shell pwd)
PROJECT_MODULE=$(shell readlink -n $(PROJECT_PATH)/../)
PROJECT_MODULE=$(call fullpath,$(PROJECT_PATH)/../)
ifeq ($(PLATFORM), Linux)
PROJECT_NDK?=$(shell readlink -n $$(PROJECT_MODULE)/ewol/)
else ifeq ($(PLATFORM), MacOs)
TARGET_OS=MacOs
PROJECT_NDK?=$$(PROJECT_MODULE)/ewol/
else ifeq ($(PLATFORM), IOs)
else ifeq ($(PLATFORM), Windows)
else ifeq ($(PLATFORM), Android)
PROJECT_NDK:=$(shell readlink -n $(PROJECT_PATH)/../android/ndk/)
PROJECT_SDK:=$(shell readlink -n $(PROJECT_PATH)/../android/sdk/)
else
ifeq ($(filter $(PLATFORM), $(SUPPORTED_PLATFORM)), )
$(error you must specify a corect platform : make PLATFORM=[$(SUPPORTED_PLATFORM)])
endif
include $(BUILD_SYSTEM)/Makefile.$(PLATFORM).mk
# define the target OS of this system
TARGET_OS:=$(PLATFORM)
###############################################################################
## Build system setup.
###############################################################################
ifeq ("$(DEBUG)","1")
BUILD_DIRECTORY_MODE := debug
else
BUILD_DIRECTORY_MODE := release
endif
include $(BUILD_SYSTEM_BASE)/Makefile.$(PLATFORM).mk

View File

@ -1,10 +1,8 @@
###############################################################################
## @file executable.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Register an executable (can be build).
## @project standard Build system
## @copyright BSDv3
###############################################################################
LOCAL_MODULE_CLASS := EXECUTABLE

View File

@ -1,10 +1,8 @@
###############################################################################
## @file prebuilt.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Register a prebuilt module.
## @project standard Build system
## @copyright BSDv3
###############################################################################
LOCAL_MODULE_CLASS := PREBUILT

View File

@ -1,10 +1,8 @@
###############################################################################
## @file shared.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Register a shared library (can be build).
## @project standard Build system
## @copyright BSDv3
###############################################################################
LOCAL_MODULE_CLASS := SHARED_LIBRARY

View File

@ -1,10 +1,8 @@
###############################################################################
## @file static.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Register a static library (can be build).
## @project standard Build system
## @copyright BSDv3
###############################################################################
LOCAL_MODULE_CLASS := STATIC_LIBRARY

View File

@ -1,3 +1,9 @@
###############################################################################
## @author Edouard DUPIN
## @date 17-08-2012
## @project standard Build system
## @copyright BSDv3
###############################################################################
#######################################################################################
# Global project variables

View File

@ -1,10 +1,8 @@
###############################################################################
## @file clearvars.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Clear out values of all variables used by rule templates.
## @project standard Build system
## @copyright BSDv3
###############################################################################
# Do NOT clear LOCAL_PATH, it is set BEFORE including this makefile

View File

@ -1,10 +1,8 @@
###############################################################################
## @file config.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Configuration management.
## @project standard Build system
## @copyright BSDv3
###############################################################################
# Tools (absolute path)

View File

@ -1,10 +1,8 @@
###############################################################################
## @file defs.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## This file contains macros used by other makefiles.
## @project standard Build system
## @copyright BSDv3
###############################################################################
###############################################################################
@ -38,10 +36,10 @@ false :=
# Get full path.
# $1 : path to extend.
ifneq ("HOST_HAS_READLINK","true")
ifneq ("$(HOST_HAS_READLINK)","true")
fullpath = $1
else
fullpath = $(shell readlink -n $1)
fullpath = $(shell readlink -m -n $1)
endif
# Figure out where we are

View File

@ -1,51 +1,11 @@
###############################################################################
## @file main.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Main Makefile.
## @project standard Build system
## @copyright BSDv3
###############################################################################
###############################################################################
## General setup.
###############################################################################
# Make sure SHELL is correctly set
SHELL := /bin/bash
# This is the default target. It must be the first declared target.
all:
# Turns off suffix rules built into make
.SUFFIXES:
# Overridable settings
V := 0
W := 0
# debug mode of the software
DEBUG := 0
# compilation done with Clang system instead of gcc
CLANG := 0
# Quiet command if V is 0
ifeq ("$(V)","0")
Q := @
endif
###############################################################################
## Build system setup.
###############################################################################
# Directories (full path)
TOP_DIR := $(shell pwd)
BUILD_SYSTEM := $(BUILD_SYSTEM)/core
ifeq ("$(DEBUG)","1")
BUILD_DIRECTORY_MODE := debug
else
BUILD_DIRECTORY_MODE := release
endif
# Setup configuration
include $(BUILD_SYSTEM)/setup-host.mk

View File

@ -1,10 +1,8 @@
###############################################################################
## @file module.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Build a module.
## @project standard Build system
## @copyright BSDv3
###############################################################################
# Bring back all LOCAL_XXX variables defined by LOCAL_MODULE

View File

@ -1,10 +1,8 @@
###############################################################################
## @file rules.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Generate rules for building an executable or library.
## @project standard Build system
## @copyright BSDv3
###############################################################################
# Intermediate/Build directory

View File

@ -0,0 +1,27 @@
###############################################################################
## @author Edouard DUPIN
## @date 17-08-2012
## @project standard Build system
## @copyright BSDv3
###############################################################################
# check if the user does not decide to force an other HOST_OS
ifneq ("$(HOST_OS)","")
$(error User must not define $(HOST_OS))
endif
# Host OS
ifneq ("$(shell echo $$OSTYPE | grep msys)","")
# Windows Host
HOST_OS := Windows
HOST_HAS_READLINK := true
else ifneq ("$(shell echo $$OSTYPE | grep darwin)","")
# MAC OS host
HOST_OS := MacOs
HOST_HAS_READLINK := false
else
# Linux Host
HOST_OS := Linux
HOST_HAS_READLINK := true
endif

View File

@ -1,16 +1,11 @@
###############################################################################
## @file setup-host.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
## @project standard Build system
## @copyright BSDv3
###############################################################################
# check if the user does not decide to force an other HOST_OS
ifneq ("$(HOST_OS)","")
$(error User must not define $(HOST_OS))
endif
###############################################################################
##############################################################################
## Tools for host.
###############################################################################
@ -41,21 +36,20 @@ HOST_GLOBAL_LDLIBS ?=
HOST_GLOBAL_LDLIBS_SHARED ?=
# Host OS
ifneq ("$(shell echo $$OSTYPE | grep msys)","")
HOST_OS := Windows
ifeq ("$(HOST_OS)","Windows")
HOST_EXE_SUFFIX := .exe
HOST_SHARED_LIB_SUFFIX := .dll
HOST_HAS_READLINK := true
else
ifneq ("$(shell echo $$OSTYPE | grep darwin)","")
HOST_OS := MacOs
HOST_SHARED_LIB_SUFFIX := .dylib
HOST_HAS_READLINK := false
else
HOST_OS := Linux
HOST_SHARED_LIB_SUFFIX := .so
HOST_HAS_READLINK := true
endif
else ifeq ("$(HOST_OS)","MacOs")
HOST_EXE_SUFFIX :=
HOST_SHARED_LIB_SUFFIX := .dylib
else ifeq ("$(HOST_OS)","IOs")
$(error HOST_OS=$(HOST_OS) ==> not supported for compilation ... )
else ifeq ("$(HOST_OS)","Linux")
HOST_EXE_SUFFIX :=
HOST_SHARED_LIB_SUFFIX := .so
else ifeq ("$(HOST_OS)","Android")
$(error HOST_OS=$(HOST_OS) ==> not supported for compilation ... )
else
$(error HOST_OS=$(HOST_OS) ==> Unknow OS for compilation ... )
endif

View File

@ -1,13 +1,10 @@
###############################################################################
## @file setup-target.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
## @project standard Build system
## @copyright BSDv3
###############################################################################
###############################################################################
## Tools for target.
###############################################################################

View File

@ -1,10 +1,9 @@
###############################################################################
## @file setup.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
## @project standard Build system
## @copyright BSDv3
###############################################################################
###############################################################################
## Make sure that there are no spaces in the absolute path; the build system
## can't deal with them.

View File

@ -1,10 +1,8 @@
###############################################################################
## @file warnings.mk
## @author Edouard DUPIN
## @date 17-08-2012
## @project EWOL
##
## Setup warning flags.
## @project standard Build system
## @copyright BSDv3
###############################################################################
COMMON_FLAGS_WARNINGS :=