add platform specific makefile
This commit is contained in:
parent
bd5d268630
commit
5d6f5cfb29
59
Build/Makefile.Android.mk
Normal file
59
Build/Makefile.Android.mk
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
|
||||
include $(EWOL_FOLDER)/Build/Makefile.common.mk
|
||||
|
||||
|
||||
PROJECT_PACKAGE=$(PROJECT_NAME)package
|
||||
JAVA_FOLDER=src/com/$(PROJECT_VENDOR)/$(PROJECT_NAME)
|
||||
|
||||
|
||||
all:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo '
DEBUT DE COMPILATION DU PROGRAMME :'$(CADRE_COTERS)
|
||||
@echo '
Project name : $(F_BLUE)$(PROJECT_NAME)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo '
Project Vendor : $(F_CYAN)$(PROJECT_VENDOR)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo '
Build date : $(F_ROUGE)$(BUILD_TIME) $(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo '
Tag : $(F_VIOLET)$(PROJECT_VERSION_TAG) $(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
|
||||
@echo $(F_ROUGE)"
(sh) Clear previous sources "$(F_NORMALE)
|
||||
@rm -rf src jni/ewolAndroidAbstraction.cpp
|
||||
@echo $(F_ROUGE)"
(sh) Create folder : $(JAVA_FOLDER)/ "$(F_NORMALE)
|
||||
@mkdir -p $(JAVA_FOLDER)/
|
||||
|
||||
@echo $(F_ROUGE)"
(sh) copy the java File : "$(F_NORMALE)
|
||||
@cp $(EWOL_FOLDER)/SourcesJava/PROJECT_NAME.java $(JAVA_FOLDER)/$(PROJECT_NAME).java
|
||||
@echo $(F_ROUGE)"
(sh) Replace __PROJECT_VENDOR__, __PROJECT_NAME__ and __PROJECT_PACKAGE__ with the correct intance "$(F_NORMALE)
|
||||
@sed -i "s|__PROJECT_VENDOR__|$(PROJECT_VENDOR)|" $(JAVA_FOLDER)/$(PROJECT_NAME).java
|
||||
@sed -i "s|__PROJECT_NAME__|$(PROJECT_NAME)|" $(JAVA_FOLDER)/$(PROJECT_NAME).java
|
||||
@sed -i "s|__PROJECT_PACKAGE__|$(PROJECT_PACKAGE)|" $(JAVA_FOLDER)/$(PROJECT_NAME).java
|
||||
|
||||
@echo $(F_ROUGE)"
(sh) copy the cpp for jni File : $(EWOL_FOLDER)/SourcesJava/ewolAndroidAbstraction.cpp"$(F_NORMALE)
|
||||
@cp $(EWOL_FOLDER)/SourcesJava/ewolAndroidAbstraction.cpp jni/
|
||||
@echo $(F_ROUGE)"
(sh) Replace __PROJECT_VENDOR__, __PROJECT_NAME__ and __PROJECT_PACKAGE__ with the correct intance "$(F_NORMALE)
|
||||
@sed -i "s|__PROJECT_VENDOR__|$(PROJECT_VENDOR)|" jni/ewolAndroidAbstraction.cpp
|
||||
@sed -i "s|__PROJECT_NAME__|$(PROJECT_NAME)|" jni/ewolAndroidAbstraction.cpp
|
||||
@sed -i "s|__PROJECT_PACKAGE__|$(PROJECT_PACKAGE)|" jni/ewolAndroidAbstraction.cpp
|
||||
|
||||
@echo $(F_ROUGE)"
(ndk-build) build native code"$(F_NORMALE)
|
||||
cd $(PROJECT_NDK) ; NDK_PROJECT_PATH=$(PROJECT_PATH) NDK_MODULE_PATH=$(PROJECT_MODULE) ./ndk-build
|
||||
@echo $(F_ROUGE)"
(ant) build java code"$(F_NORMALE)
|
||||
PATH=$(PROJECT_SDK)/tools/:$(PROJECT_SDK)/platform-tools/:$(PATH) ant -Dsdk.dir=$(PROJECT_SDK) debug
|
||||
@echo $(F_ROUGE)"
(sh) Clear previous sources "$(F_NORMALE)
|
||||
@rm -rf src jni/ewolAndroidAbstraction.cpp
|
||||
|
||||
install: all
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' INSTALL : $(F_VIOLET)./bin/$(PROJECT_NAME)-debug.apk$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@# $(PROJECT_SDK)/platform-tools/adb kill-server
|
||||
@# install application
|
||||
sudo $(PROJECT_SDK)/platform-tools/adb install -r ./bin/$(PROJECT_NAME)-debug.apk
|
||||
|
||||
clean:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' CLEANING : bin libs gen obj'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
rm -rf bin libs gen obj
|
245
Build/Makefile.Linux.mk
Normal file
245
Build/Makefile.Linux.mk
Normal file
@ -0,0 +1,245 @@
|
||||
|
||||
|
||||
|
||||
|
||||
include $(EWOL_FOLDER)/Build/Makefile.common.mk
|
||||
|
||||
include $(EWOL_FOLDER)/Build/ewol.mk
|
||||
|
||||
###############################################################################
|
||||
### Compilateur base system ###
|
||||
###############################################################################
|
||||
CXX=g++
|
||||
CC=gcc
|
||||
AR=ar
|
||||
|
||||
|
||||
|
||||
X11FLAGS= -lGL -lGLU
|
||||
# some X11 mode availlable :
|
||||
# install package : libxxf86vm-dev
|
||||
X11FLAGS+= -lX11 -DEWOL_X11_MODE__XF86V -lXxf86vm
|
||||
# install package : libxrender-dev
|
||||
#X11FLAGS+= -lX11 -DEWOL_X11_MODE__XRENDER -lXrandr
|
||||
|
||||
|
||||
ifeq ($(shell if `pkg-config --exists freetype2` ; then echo "yes"; else echo "no"; fi), yes)
|
||||
FREETYPE_CFLAGS= `pkg-config --cflags freetype2` -DEWOL_USE_FREE_TYPE
|
||||
FREETYPE_LDFLAGS= `pkg-config --libs freetype2` -DEWOL_USE_FREE_TYPE
|
||||
else
|
||||
FREETYPE_CFLAGS=
|
||||
FREETYPE_LDFLAGS=
|
||||
$(Info libFreeType-dev is not installed)
|
||||
endif
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Basic C flags ###
|
||||
###############################################################################
|
||||
|
||||
# basic X11 librairy ==> show if we can une under lib ...
|
||||
CXXFLAGS= $(X11FLAGS) $(FREETYPE_CFLAGS) -D__PLATFORM__$(PLATFORM)
|
||||
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
CXXFLAGS+= -O2
|
||||
else
|
||||
# Enable debug (cgdb ***)
|
||||
CXXFLAGS+= -g -O0
|
||||
endif
|
||||
# display all flags
|
||||
CXXFLAGS+= -Wall
|
||||
# ...
|
||||
CXXFLAGS+= -D_REENTRANT
|
||||
# internal defines
|
||||
CXXFLAGS+= $(DEFINE)
|
||||
# remove warning from the convertion char*
|
||||
CXXFLAGS+= -Wno-write-strings
|
||||
|
||||
CFLAGS= $(CXXFLAGS) -std=c99
|
||||
|
||||
# basic extern librairy
|
||||
LDFLAGS= $(X11FLAGS) $(FREETYPE_LDFLAGS)
|
||||
|
||||
# Dynamic connection of the CALLBACK of the GUI
|
||||
LDFLAGS+= -Wl,--export-dynamic
|
||||
|
||||
# TODO : add the prefix ...
|
||||
CXXFILES = $(addprefix $(EWOL_FOLDER)/Sources/, $(EWOL_CXXFILES)) $(PROJECT_SOURCES)
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Basic Project description Files ###
|
||||
###############################################################################
|
||||
FILE_DIRECTORY=Sources
|
||||
OUTPUT_NAME_RELEASE=$(PROJECT_NAME)_release
|
||||
OUTPUT_NAME_DEBUG=$(PROJECT_NAME)_debug
|
||||
OBJECT_DIR=Object_$(PLATFORM)
|
||||
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
OBJECT_DIRECTORY=$(OBJECT_DIR)/release
|
||||
OUTPUT_NAME = $(OUTPUT_NAME_RELEASE)
|
||||
else
|
||||
OBJECT_DIRECTORY=$(OBJECT_DIR)/debug
|
||||
OUTPUT_NAME = $(OUTPUT_NAME_DEBUG)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Generique dependency ###
|
||||
###############################################################################
|
||||
MAKE_DEPENDENCE=Makefile
|
||||
|
||||
###############################################################################
|
||||
### Files Listes ###
|
||||
###############################################################################
|
||||
|
||||
|
||||
# get all data file in the specific folder
|
||||
DATA_FOLDER=dataTest
|
||||
DATA_FILE=$(shell find $(DATA_FOLDER)/*)
|
||||
|
||||
###############################################################################
|
||||
### Liste of folder where .h can be ###
|
||||
###############################################################################
|
||||
LISTE_MODULES = $(sort $(dir $(CXXFILES)))
|
||||
#$(info listeModule=$(LISTE_MODULES))
|
||||
INCLUDE_DIRECTORY = $(addprefix -I$(FILE_DIRECTORY)/, $(LISTE_MODULES))
|
||||
# overwrite if needed the directory folder :
|
||||
INCLUDE_DIRECTORY = -I$(FILE_DIRECTORY)/
|
||||
|
||||
###############################################################################
|
||||
### Build Object Files List ###
|
||||
###############################################################################
|
||||
OBJ = $(addprefix $(OBJECT_DIRECTORY)/, $(CXXFILES:.cpp=.o))
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Main Part of Makefile ###
|
||||
###############################################################################
|
||||
all: build
|
||||
|
||||
-include $(OBJ:.o=.d)
|
||||
|
||||
build: .encadrer .versionFile $(OUTPUT_NAME)
|
||||
|
||||
.encadrer:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo '
DEBUT DE COMPILATION DU PROGRAMME :'$(CADRE_COTERS)
|
||||
@echo '
Repertoire Sources : $(FILE_DIRECTORY)/'$(CADRE_COTERS)
|
||||
@echo '
Repertoire object : $(OBJECT_DIRECTORY)/'$(CADRE_COTERS)
|
||||
@echo '
Binaire de sortie : $(F_VIOLET)$(OUTPUT_NAME) $(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@mkdir -p $(addprefix $(OBJECT_DIRECTORY)/, $(LISTE_MODULES))
|
||||
|
||||
.versionFile:
|
||||
@rm -f $(OBJECT_DIRECTORY)/ewol/ewol.o
|
||||
|
||||
# build C++
|
||||
$(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE)
|
||||
@echo $(F_VERT)"
(.o) $<"$(F_NORMALE)
|
||||
@$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD
|
||||
|
||||
# build binary Release Mode
|
||||
$(OUTPUT_NAME_RELEASE): $(OBJ) $(MAKE_DEPENDENCE)
|
||||
@echo $(F_ROUGE)"
(bin) $@ "$(F_NORMALE)
|
||||
@$(CXX) $(OBJ) $(LDFLAGS) -o $@
|
||||
@cp $@ $(PROJECT_NAME)
|
||||
|
||||
# build binary Debug Mode
|
||||
ifeq ($(PLATFORM), Android)
|
||||
$(OUTPUT_NAME_DEBUG): $(MAKE_DEPENDENCE)
|
||||
cd $(PROJECT_NDK) ; NDK_PROJECT_PATH=$(shell pwd) ./ndk-build
|
||||
# V=1
|
||||
PATH=$(PROJECT_SDK)/tools/:$(PROJECT_SDK)/platform-tools/:$(PATH) ant -Dsdk.dir=$(PROJECT_SDK) debug
|
||||
else
|
||||
$(OUTPUT_NAME_DEBUG): $(OBJ) $(MAKE_DEPENDENCE)
|
||||
@echo $(F_ROUGE)"
(bin) $@ "$(F_NORMALE)
|
||||
@$(CXX) $(OBJ) $(LDFLAGS) -o $@
|
||||
@cp $@ $(PROJECT_NAME)
|
||||
endif
|
||||
|
||||
|
||||
clean:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' CLEANING : $(F_VIOLET)$(OUTPUT_NAME)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
ifeq ($(PLATFORM), Android)
|
||||
rm -rf bin libs gen obj
|
||||
else
|
||||
@echo Remove Folder : $(OBJECT_DIR)
|
||||
@rm -rf $(OBJECT_DIR)
|
||||
@echo Remove File : $(PROJECT_NAME) $(OUTPUT_NAME_DEBUG) $(OUTPUT_NAME_RELEASE)
|
||||
@rm -f $(PROJECT_NAME) $(OUTPUT_NAME_DEBUG) $(OUTPUT_NAME_RELEASE)
|
||||
@echo Remove File : pngToCpp
|
||||
@rm -f pngToCpp
|
||||
@echo Remove File : $(FILE_DIRECTORY)/GuiTools/myImage.*
|
||||
@rm -f $(FILE_DIRECTORY)/GuiTools/myImage.*
|
||||
@echo Remove doxygen files : doxygen/*
|
||||
@rm -rf doxygen
|
||||
@rm -f doxygen.log
|
||||
@echo Remove temporary files *.bck
|
||||
@rm -f `find . -name "*.bck"`
|
||||
endif
|
||||
|
||||
count:
|
||||
wc -l Makefile `find $(FILE_DIRECTORY)/ -name "*.cpp"` `find $(FILE_DIRECTORY)/ -name "*.h"`
|
||||
|
||||
ifeq ($(PLATFORM), Android)
|
||||
install:
|
||||
sudo $(PROJECT_SDK)/platform-tools/adb install -r ./bin/EwolActivity-debug.apk
|
||||
else
|
||||
install: .encadrer .versionFile $(OUTPUT_NAME_RELEASE)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' INSTALL : $(F_VIOLET)$(OUTPUT_NAME_RELEASE)=>$(PROJECT_NAME)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo $(F_ROUGE)"
(stripped) $(OUTPUT_NAME_RELEASE) => $(PROJECT_NAME) "$(F_NORMALE)
|
||||
@cp $(OUTPUT_NAME_RELEASE) $(PROJECT_NAME)
|
||||
@strip -s $(PROJECT_NAME)
|
||||
@echo $(F_VERT)"
(copy) $(PROJECT_NAME) /usr/bin/ "$(F_NORMALE)
|
||||
@cp -vf $(PROJECT_NAME) /usr/bin/
|
||||
@echo $(F_VERT)"
(data) data/* ==> /usr/share/edn/ "$(F_NORMALE)
|
||||
@mkdir -p /usr/share/edn/
|
||||
@rm -rf /usr/share/edn/*
|
||||
@cp -vf data/*.xml /usr/share/edn/
|
||||
@mkdir -p /usr/share/edn/images/
|
||||
@cp -vf data/imagesSources/icone.png /usr/share/edn/images/
|
||||
@cp -vf data/imagesSources/delete-24px.png /usr/share/edn/images/
|
||||
endif
|
||||
|
||||
# http://alp.developpez.com/tutoriels/debian/creer-paquet/
|
||||
package: .encadrer
|
||||
@echo 'Create Folders ...'
|
||||
@mkdir -p package/$(PROJECT_NAME)/DEBIAN/
|
||||
@mkdir -p package/$(PROJECT_NAME)/usr/bin/
|
||||
@mkdir -p package/$(PROJECT_NAME)/usr/share/doc/
|
||||
@mkdir -p package/$(PROJECT_NAME)/usr/share/edn/
|
||||
# Create the control file
|
||||
@echo "Package: "$(PROJECT_NAME) > package/$(PROJECT_NAME)/DEBIAN/control
|
||||
@echo "Version: "$(VERSION_TAG_SHORT) >> package/$(PROJECT_NAME)/DEBIAN/control
|
||||
@echo "Section: Development,Editors" >> package/$(PROJECT_NAME)/DEBIAN/control
|
||||
@echo "Priority: optional" >>package/$(PROJECT_NAME)/DEBIAN/control
|
||||
@echo "Architecture: all" >> package/$(PROJECT_NAME)/DEBIAN/control
|
||||
@echo "Depends: bash" >> package/$(PROJECT_NAME)/DEBIAN/control
|
||||
@echo "Maintainer: Mr DUPIN Edouard <yui.heero@gmail.com>" >> package/$(PROJECT_NAME)/DEBIAN/control
|
||||
@echo "Description: Text editor for sources code with ctags management" >> package/$(PROJECT_NAME)/DEBIAN/control
|
||||
@echo "" >> package/$(PROJECT_NAME)/DEBIAN/control
|
||||
# Create the PostRm
|
||||
@echo "#!/bin/bash" > package/$(PROJECT_NAME)/DEBIAN/postrm
|
||||
@echo "rm ~/."$(PROJECT_NAME) >> package/$(PROJECT_NAME)/DEBIAN/postrm
|
||||
@echo "" >> package/$(PROJECT_NAME)/DEBIAN/postrm
|
||||
# Enable Execution in script
|
||||
@chmod 755 package/$(PROJECT_NAME)/DEBIAN/post*
|
||||
@#chmod 755 package/$(PROJECT_NAME)/DEBIAN/pre*
|
||||
# copy licence and information :
|
||||
@cp README package/$(PROJECT_NAME)/usr/share/doc/README
|
||||
@cp licence.txt package/$(PROJECT_NAME)/usr/share/doc/copyright
|
||||
@echo "First generation in progress" >> package/$(PROJECT_NAME)/usr/share/doc/changelog
|
||||
@cp -vf $(PROJECT_NAME) package/$(PROJECT_NAME)/usr/bin/
|
||||
@cp -vf data/*.xml package/$(PROJECT_NAME)/usr/share/edn/
|
||||
@cd package; dpkg-deb --build $(PROJECT_NAME)
|
||||
|
||||
|
74
Build/Makefile.common.mk
Normal file
74
Build/Makefile.common.mk
Normal file
@ -0,0 +1,74 @@
|
||||
##################################################################################################################
|
||||
# #
|
||||
# Fichier : Makefile.common #
|
||||
# #
|
||||
# Type : common part of the ewol Makefile #
|
||||
# #
|
||||
# Auteur : Heero Yui #
|
||||
# #
|
||||
# Evolutions : Date Auteur Raison #
|
||||
# 2011-12-15 Heero Yui Mise en place du système de couleur et d'encart #
|
||||
# #
|
||||
# Notes : This makefile might be edited with an editor compatible with escape char and carrer return #
|
||||
# char #
|
||||
# #
|
||||
##################################################################################################################
|
||||
export F_GRAS=[1m
|
||||
export F_INVERSER=[7m
|
||||
export F_SOUSLIGNER=[4m
|
||||
export F_NORMALE=[m
|
||||
export F_NOIR=[31m
|
||||
export F_ROUGE=[31m
|
||||
export F_VERT=[32m
|
||||
export F_MARRON=[33m
|
||||
export F_BLUE=[34m
|
||||
export F_VIOLET=[35m
|
||||
export F_CYAN=[36m
|
||||
export F_GRIS=[37m
|
||||
export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)'
|
||||
export CADRE_COTERS='
$(F_INVERSER) $(F_NORMALE) $(F_INVERSER) $(F_NORMALE)'
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Platform specificity : ###
|
||||
###############################################################################
|
||||
SUPPORTED_PLATFORM=Linux IMac IPhone IPad Android AndroidTablet
|
||||
DEFAULT_PLATFORM=Linux
|
||||
|
||||
# default platform can be overridden
|
||||
PLATFORM?=$(DEFAULT_PLATFORM)
|
||||
|
||||
ifeq ($(PLATFORM), Linux)
|
||||
CXXFILES += base/guiX11.cpp
|
||||
else ifeq ($(PLATFORM), IMac)
|
||||
CXXFILES += base/guiIMac.cpp
|
||||
else ifeq ($(PLATFORM), IPhone)
|
||||
CXXFILES += base/guiIPhone.cpp
|
||||
else ifeq ($(PLATFORM), IPad)
|
||||
CXXFILES += base/guiIPad.cpp
|
||||
else ifeq ($(PLATFORM), Android)
|
||||
CXXFILES += base/guiAndroid.cpp
|
||||
else ifeq ($(PLATFORM), AndroidTablet)
|
||||
CXXFILES += base/guiAndroidTablet.cpp
|
||||
else
|
||||
$(error you must specify a corect platform : make PLATFORM=$(SUPPORTED_PLATFORM))
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
.encadrer:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo '
DEBUT DE COMPILATION DU PROGRAMME :'$(CADRE_COTERS)
|
||||
@echo '
Repertoire Sources : $(FILE_DIRECTORY)/'$(CADRE_COTERS)
|
||||
@echo '
Repertoire object : $(OBJECT_DIRECTORY)/'$(CADRE_COTERS)
|
||||
@echo '
Binaire de sortie : $(F_VIOLET)$(OUTPUT_NAME) $(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@mkdir -p $(addprefix $(OBJECT_DIRECTORY)/, $(LISTE_MODULES))
|
||||
|
||||
|
||||
BUILD_TIME=$(shell date)
|
||||
|
||||
|
79
Build/ewol.mk
Normal file
79
Build/ewol.mk
Normal file
@ -0,0 +1,79 @@
|
||||
|
||||
|
||||
EWOL_VERSION_TAG=$(shell cd $(EWOL_FOLDER); git describe --tags)
|
||||
#$(info $(VERSION_TAG))
|
||||
|
||||
EWOL_VERSION_TAG_SHORT=$(shell cd $(EWOL_FOLDER); git describe --tags --abbrev=0)
|
||||
#$(info $(VERSION_TAG_SHORT))
|
||||
|
||||
###############################################################################
|
||||
### Compilation Define ###
|
||||
###############################################################################
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
EWOL_CXXFLAGS = -DETK_DEBUG_LEVEL=1
|
||||
EWOL_CXXFLAGS+= -DEWOL_DEBUG_LEVEL=1
|
||||
EWOL_CXXFLAGS+= -DNDEBUG
|
||||
EWOL_CXXFLAGS+= -DEWOL_VERSION_TAG_NAME="\"$(EWOL_VERSION_TAG)-release\""
|
||||
else
|
||||
EWOL_CXXFLAGS = -DETK_DEBUG_LEVEL=3
|
||||
EWOL_CXXFLAGS+= -DEWOL_DEBUG_LEVEL=3
|
||||
EWOL_CXXFLAGS+= -DEWOL_VERSION_TAG_NAME="\"$(EWOL_VERSION_TAG)-debug\""
|
||||
endif
|
||||
EWOL_CXXFLAGS+= -DVERSION_BUILD_TIME="\"$(BUILD_TIME)\""
|
||||
|
||||
|
||||
|
||||
# tiny XML (extern OPEN Sources) :
|
||||
EWOL_CXXFILES += tinyXML/tinyxml.cpp \
|
||||
tinyXML/tinyxmlparser.cpp \
|
||||
tinyXML/tinyxmlerror.cpp \
|
||||
tinyXML/tinystr.cpp
|
||||
|
||||
# Ewol Tool Kit :
|
||||
EWOL_CXXFILES += etk/Debug.cpp \
|
||||
etk/DebugInternal.cpp \
|
||||
etk/Memory.cpp \
|
||||
etk/String.cpp \
|
||||
etk/Stream.cpp \
|
||||
etk/File.cpp \
|
||||
etk/RegExp.cpp
|
||||
|
||||
# Ewol Sources :
|
||||
EWOL_CXXFILES += ewol/ewol.cpp \
|
||||
ewol/Debug.cpp \
|
||||
ewol/OObject.cpp \
|
||||
ewol/OObject/2DText.cpp \
|
||||
ewol/OObject/2DColored.cpp \
|
||||
ewol/OObject/2DTextured.cpp \
|
||||
ewol/Texture.cpp
|
||||
ifeq ("$(FREETYPE_CFLAGS)", "")
|
||||
EWOL_CXXFILES += ewol/FontBitmap.cpp
|
||||
else
|
||||
EWOL_CXXFILES += ewol/FontFreeType.cpp
|
||||
endif
|
||||
EWOL_CXXFILES += ewol/Widget.cpp \
|
||||
ewol/WidgetManager.cpp \
|
||||
ewol/Windows.cpp
|
||||
# list of widgets :
|
||||
EWOL_CXXFILES += ewol/widget/Button.cpp \
|
||||
ewol/widget/CheckBox.cpp \
|
||||
ewol/widget/Entry.cpp \
|
||||
ewol/widget/List.cpp \
|
||||
ewol/widget/SizerHori.cpp \
|
||||
ewol/widget/SizerVert.cpp
|
||||
# only to test son internal element ...
|
||||
EWOL_CXXFILES += ewol/widget/Test.cpp
|
||||
# theme management :
|
||||
EWOL_CXXFILES += ewol/themeManager.cpp \
|
||||
ewol/theme/Theme.cpp \
|
||||
ewol/theme/EolElement.cpp \
|
||||
ewol/theme/EolElementFrame.cpp \
|
||||
ewol/theme/EolColor.cpp \
|
||||
ewol/theme/EolBase.cpp \
|
||||
ewol/theme/EolBaseCircle.cpp \
|
||||
ewol/theme/EolBaseCirclePart.cpp \
|
||||
ewol/theme/EolBaseLine.cpp \
|
||||
ewol/theme/EolBasePolygone.cpp \
|
||||
ewol/theme/EolBaseRect.cpp \
|
||||
ewol/theme/EolBaseTriangle.cpp
|
||||
|
114
Makefile
114
Makefile
@ -16,21 +16,6 @@
|
||||
# Concu Pour le projet ewol #
|
||||
# #
|
||||
##################################################################################################################
|
||||
export F_GRAS=[1m
|
||||
export F_INVERSER=[7m
|
||||
export F_SOUSLIGNER=[4m
|
||||
export F_NORMALE=[m
|
||||
export F_NOIR=[31m
|
||||
export F_ROUGE=[31m
|
||||
export F_VERT=[32m
|
||||
export F_MARRON=[33m
|
||||
export F_BLUE=[34m
|
||||
export F_VIOLET=[35m
|
||||
export F_CYAN=[36m
|
||||
export F_GRIS=[37m
|
||||
export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)'
|
||||
export CADRE_COTERS='
$(F_INVERSER) $(F_NORMALE) $(F_INVERSER) $(F_NORMALE)'
|
||||
|
||||
VERSION_TAG=$(shell git describe --tags)
|
||||
#$(info $(VERSION_TAG))
|
||||
|
||||
@ -40,33 +25,7 @@ VERSION_TAG_SHORT=$(shell git describe --tags --abbrev=0)
|
||||
VERSION_BUILD_TIME=$(shell date)
|
||||
#$(info $(VERSION_BUILD_TIME))
|
||||
|
||||
###############################################################################
|
||||
### Platform specificity : ###
|
||||
###############################################################################
|
||||
SUPPORTED_PLATFORM=X11 DoubleBuffer IPhone IPad Android AndroidTablet
|
||||
DEFAULT_PLATFORM=X11
|
||||
|
||||
# default platform can be overridden
|
||||
PLATFORM?=$(DEFAULT_PLATFORM)
|
||||
|
||||
|
||||
ifeq ($(PLATFORM), X11)
|
||||
CXXFILES += base/guiX11.cpp
|
||||
else ifeq ($(PLATFORM), DoubleBuffer)
|
||||
CXXFILES += base/guiDoubleBuffer.cpp
|
||||
else ifeq ($(PLATFORM), IPhone)
|
||||
CXXFILES += base/guiIPhone.cpp
|
||||
else ifeq ($(PLATFORM), IPad)
|
||||
CXXFILES += base/guiIPad.cpp
|
||||
else ifeq ($(PLATFORM), Android)
|
||||
CXXFILES += base/guiAndroid.cpp
|
||||
else ifeq ($(PLATFORM), AndroidTablet)
|
||||
CXXFILES += base/guiAndroidTablet.cpp
|
||||
else
|
||||
$(error you must specify a corect platform : make PLATFORM=$(SUPPORTED_PLATFORM))
|
||||
endif
|
||||
|
||||
$(info Build for PLATFORM=$(PLATFORM))
|
||||
|
||||
###############################################################################
|
||||
### Compilateur base system ###
|
||||
@ -77,20 +36,6 @@ AR=ar
|
||||
|
||||
DEBUG:=1
|
||||
|
||||
###############################################################################
|
||||
### Compilation Define ###
|
||||
###############################################################################
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
DEFINE = -DETK_DEBUG_LEVEL=1
|
||||
DEFINE+= -DEWOL_DEBUG_LEVEL=1
|
||||
DEFINE+= -DNDEBUG
|
||||
DEFINE+= -DEWOL_VERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
|
||||
else
|
||||
DEFINE = -DETK_DEBUG_LEVEL=3
|
||||
DEFINE+= -DEWOL_DEBUG_LEVEL=3
|
||||
DEFINE+= -DEWOL_VERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
|
||||
endif
|
||||
DEFINE+= -DVERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
||||
|
||||
X11FLAGS= -lGL -lGLU
|
||||
# some X11 mode availlable :
|
||||
@ -181,65 +126,6 @@ MAKE_DEPENDENCE=Makefile
|
||||
### Files Listes ###
|
||||
###############################################################################
|
||||
|
||||
# tiny XML (extern OPEN Sources) :
|
||||
CXXFILES += tinyXML/tinyxml.cpp \
|
||||
tinyXML/tinyxmlparser.cpp \
|
||||
tinyXML/tinyxmlerror.cpp \
|
||||
tinyXML/tinystr.cpp
|
||||
|
||||
# Ewol Tool Kit :
|
||||
CXXFILES += etk/Debug.cpp \
|
||||
etk/DebugInternal.cpp \
|
||||
etk/Memory.cpp \
|
||||
etk/String.cpp \
|
||||
etk/Stream.cpp \
|
||||
etk/File.cpp \
|
||||
etk/RegExp.cpp
|
||||
|
||||
# Ewol Sources :
|
||||
CXXFILES += ewol/ewol.cpp \
|
||||
ewol/Debug.cpp \
|
||||
ewol/OObject.cpp \
|
||||
ewol/OObject/2DText.cpp \
|
||||
ewol/OObject/2DColored.cpp \
|
||||
ewol/OObject/2DTextured.cpp \
|
||||
ewol/Texture.cpp
|
||||
ifeq ("$(FREETYPE_CFLAGS)", "")
|
||||
CXXFILES += ewol/FontBitmap.cpp
|
||||
else
|
||||
CXXFILES += ewol/FontFreeType.cpp
|
||||
endif
|
||||
CXXFILES += ewol/Widget.cpp \
|
||||
ewol/WidgetManager.cpp \
|
||||
ewol/Windows.cpp
|
||||
# list of widgets :
|
||||
CXXFILES += ewol/widget/Button.cpp \
|
||||
ewol/widget/CheckBox.cpp \
|
||||
ewol/widget/Entry.cpp \
|
||||
ewol/widget/List.cpp \
|
||||
ewol/widget/SizerHori.cpp \
|
||||
ewol/widget/SizerVert.cpp
|
||||
# only to test son internal element ...
|
||||
CXXFILES += ewol/widget/Test.cpp
|
||||
# theme management :
|
||||
CXXFILES += ewol/themeManager.cpp \
|
||||
ewol/theme/Theme.cpp \
|
||||
ewol/theme/EolElement.cpp \
|
||||
ewol/theme/EolElementFrame.cpp \
|
||||
ewol/theme/EolColor.cpp \
|
||||
ewol/theme/EolBase.cpp \
|
||||
ewol/theme/EolBaseCircle.cpp \
|
||||
ewol/theme/EolBaseCirclePart.cpp \
|
||||
ewol/theme/EolBaseLine.cpp \
|
||||
ewol/theme/EolBasePolygone.cpp \
|
||||
ewol/theme/EolBaseRect.cpp \
|
||||
ewol/theme/EolBaseTriangle.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
# Ewol Test Software :
|
||||
CXXFILES += Main.cpp
|
||||
|
||||
# get all data file in the specific folder
|
||||
DATA_FOLDER=dataTest
|
||||
|
@ -101,9 +101,21 @@ void ewol::Button::OnRegenerateDisplay(void)
|
||||
{
|
||||
// clean the object list ...
|
||||
ClearOObjectList();
|
||||
/*
|
||||
int32_t borderSize = 2;
|
||||
int32_t paddingSize = 3;
|
||||
int32_t tmpSizeX = 0;
|
||||
int32_t tmpSizeY = 0;
|
||||
int32_t tmpOriginX = 0;
|
||||
int32_t tmpOriginX = 0;
|
||||
|
||||
if (true==m_userFillX) {
|
||||
|
||||
}
|
||||
if (true==m_userFillY) {
|
||||
|
||||
}
|
||||
*/
|
||||
/*
|
||||
ewol::OObject2DColored * tmpOObjects = new ewol::OObject2DColored;
|
||||
tmpOObjects->SetColor(0.0, 0.0, 0.0, 1.0);
|
||||
@ -113,6 +125,7 @@ void ewol::Button::OnRegenerateDisplay(void)
|
||||
AddOObject(tmpOObjects, "BouttonDecoration");
|
||||
|
||||
*/
|
||||
#if 1
|
||||
int32_t borderWidth = 2;
|
||||
ewol::OObject2DText * tmpText = new ewol::OObject2DText("", -1, m_textColorFg);
|
||||
|
||||
@ -155,7 +168,7 @@ void ewol::Button::OnRegenerateDisplay(void)
|
||||
AddEventArea(origin, size, FLAG_EVENT_INPUT_1 | FLAG_EVENT_INPUT_CLICKED_ALL, ewolEventButtonPressed);
|
||||
AddEventArea(origin, size, FLAG_EVENT_INPUT_ENTER, ewolEventButtonEnter);
|
||||
AddEventArea(origin, size, FLAG_EVENT_INPUT_LEAVE, ewolEventButtonLeave);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user