[DEV] better generation of the tree and end-point package of the application
This commit is contained in:
parent
4016ab8885
commit
0793d9eb2c
@ -1,9 +1,24 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Setup macros definitions
|
||||||
|
include $(EWOL_FOLDER)/Build/core/defs.mk
|
||||||
|
|
||||||
|
# include generic makefile :
|
||||||
|
include $(EWOL_FOLDER)/Build/core/check-project-variable.mk
|
||||||
|
|
||||||
|
|
||||||
TARGET_OS = Android
|
TARGET_OS = Android
|
||||||
TARGET_ARCH = ARM
|
TARGET_ARCH = ARM
|
||||||
TARGET_CROSS = $(PROJECT_NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
|
TARGET_CROSS = $(PROJECT_NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
|
||||||
|
|
||||||
|
TARGET_OUT_FOLDER_BINARY := ERROR_NOTHING_MUST_BE_SET_HERE
|
||||||
|
TARGET_OUT_FOLDER_LIBRAIRY := data/lib/armeabi
|
||||||
|
TARGET_OUT_FOLDER_DATA := data/assets
|
||||||
|
TARGET_OUT_FOLDER_DOC := doc
|
||||||
|
TARGET_OUT_PREFIX_LIBRAIRY := lib
|
||||||
|
|
||||||
|
|
||||||
ANDROID_BOARD_ID = 14
|
ANDROID_BOARD_ID = 14
|
||||||
TARGET_GLOBAL_C_INCLUDES+=-I$(PROJECT_NDK)/platforms/android-$(ANDROID_BOARD_ID)/arch-arm/usr/include
|
TARGET_GLOBAL_C_INCLUDES+=-I$(PROJECT_NDK)/platforms/android-$(ANDROID_BOARD_ID)/arch-arm/usr/include
|
||||||
TARGET_GLOBAL_LDLIBS_SHARED = --sysroot=$(PROJECT_NDK)/platforms/android-$(ANDROID_BOARD_ID)/arch-arm
|
TARGET_GLOBAL_LDLIBS_SHARED = --sysroot=$(PROJECT_NDK)/platforms/android-$(ANDROID_BOARD_ID)/arch-arm
|
||||||
@ -11,31 +26,18 @@ TARGET_GLOBAL_LDLIBS_SHARED = --sysroot=$(PROJECT_NDK)/platforms/android-$(ANDRO
|
|||||||
#generic makefile
|
#generic makefile
|
||||||
include $(EWOL_FOLDER)/Build/core/main.mk
|
include $(EWOL_FOLDER)/Build/core/main.mk
|
||||||
|
|
||||||
CONFIG2___EWOL_APPL_ORGANISATION_TYPE__ := $(subst _,$(empty),$(call convert-special-char,$(CONFIG___EWOL_APPL_ORGANISATION_TYPE__)))
|
FINAL_FOLDER_JAVA_PROJECT=$(TARGET_OUT_STAGING)/src/$(PROJECT_COMPAGNY_TYPE)/$(PROJECT_COMPAGNY_NAME2)/$(PROJECT_NAME2)
|
||||||
|
|
||||||
CONFIG2___EWOL_APPL_COMPAGNY__ := $(subst _,$(empty),$(call convert-special-char,$(CONFIG___EWOL_APPL_COMPAGNY__)))
|
FINAL_FILE_ABSTRACTION = $(FINAL_FOLDER_JAVA_PROJECT)/$(PROJECT_NAME2).java
|
||||||
|
|
||||||
CONFIG2___EWOL_APPL_NAME__ := $(subst _,$(empty),$(call convert-special-char,$(CONFIG___EWOL_APPL_NAME__)))
|
|
||||||
|
|
||||||
CONFIG2___EWOL_ANDROID_ICON__ := $(subst $(quote),$(empty),$(CONFIG___EWOL_ANDROID_ICON__))
|
|
||||||
|
|
||||||
FINAL_FOLDER_JAVA=$(TARGET_OUT_FINAL)
|
|
||||||
FINAL_FOLDER_JAVA_PROJECT=$(FINAL_FOLDER_JAVA)/src/$(CONFIG2___EWOL_APPL_ORGANISATION_TYPE__)/$(CONFIG2___EWOL_APPL_COMPAGNY__)/$(CONFIG2___EWOL_APPL_NAME__)
|
|
||||||
|
|
||||||
FINAL_FILE_ABSTRACTION = $(FINAL_FOLDER_JAVA_PROJECT)/$(CONFIG2___EWOL_APPL_NAME__).java
|
|
||||||
|
|
||||||
javaclean:
|
|
||||||
$(Q)rm -rf $(FINAL_FOLDER_JAVA)/
|
|
||||||
$(Q)mkdir -p $(FINAL_FOLDER_JAVA_PROJECT)/
|
|
||||||
|
|
||||||
|
|
||||||
$(FINAL_FILE_ABSTRACTION) : $(EWOL_FOLDER)/Java/PROJECT_NAME.java $(CONFIG_GLOBAL_FILE)
|
$(FINAL_FILE_ABSTRACTION) : $(EWOL_FOLDER)/Java/PROJECT_NAME.java $(CONFIG_GLOBAL_FILE)
|
||||||
$(Q)mkdir -p $(dir $@)
|
$(Q)mkdir -p $(dir $@)
|
||||||
$(Q)cp $(EWOL_FOLDER)/Java/PROJECT_NAME.java $@
|
$(Q)cp $(EWOL_FOLDER)/Java/PROJECT_NAME.java $@
|
||||||
$(Q)sed -i "s|__PROJECT_ORG_TYPE__|$(CONFIG2___EWOL_APPL_ORGANISATION_TYPE__)|" $@
|
$(Q)sed -i "s|__PROJECT_ORG_TYPE__|$(PROJECT_COMPAGNY_TYPE)|" $@
|
||||||
$(Q)sed -i "s|__PROJECT_VENDOR__|$(CONFIG2___EWOL_APPL_COMPAGNY__)|" $@
|
$(Q)sed -i "s|__PROJECT_VENDOR__|$(PROJECT_COMPAGNY_NAME2)|" $@
|
||||||
$(Q)sed -i "s|__PROJECT_NAME__|$(CONFIG2___EWOL_APPL_NAME__)|" $@
|
$(Q)sed -i "s|__PROJECT_NAME__|$(PROJECT_NAME2)|" $@
|
||||||
$(Q)sed -i "s|__PROJECT_PACKAGE__|$(CONFIG2___EWOL_APPL_NAME__)|" $@
|
$(Q)sed -i "s|__PROJECT_PACKAGE__|$(PROJECT_NAME2)|" $@
|
||||||
ifeq ("$(CONFIG___VIDEO__OPENGL_ES_2)","y")
|
ifeq ("$(CONFIG___VIDEO__OPENGL_ES_2)","y")
|
||||||
$(Q)sed -i "s|__CONF_OGL_ES_V__|2|" $@
|
$(Q)sed -i "s|__CONF_OGL_ES_V__|2|" $@
|
||||||
else
|
else
|
||||||
@ -46,13 +48,15 @@ endif
|
|||||||
APPL_VERSION:=$(shell git describe --tags)
|
APPL_VERSION:=$(shell git describe --tags)
|
||||||
# --abbrev=0)
|
# --abbrev=0)
|
||||||
|
|
||||||
|
$(eval $(call copy-one-file,$(PROJECT_ICON),$(TARGET_OUT_STAGING)/res/drawable/icon.png))
|
||||||
|
|
||||||
$(FINAL_FOLDER_JAVA)/AndroidManifest.xml : $(CONFIG_GLOBAL_FILE)
|
|
||||||
|
$(TARGET_OUT_STAGING)/AndroidManifest.xml : $(CONFIG_GLOBAL_FILE) $(TARGET_OUT_STAGING)/res/drawable/icon.png
|
||||||
@echo "AndroidManifest.xml <== configFile"
|
@echo "AndroidManifest.xml <== configFile"
|
||||||
@echo "<?xml version=\"1.0\" encoding=\"utf-8\"?> " > $@
|
@echo "<?xml version=\"1.0\" encoding=\"utf-8\"?> " > $@
|
||||||
@echo "<!-- Manifest is autoGenerated with Ewol ... do not patch it-->" >> $@
|
@echo "<!-- Manifest is autoGenerated with Ewol ... do not patch it-->" >> $@
|
||||||
@echo "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" " >> $@
|
@echo "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" " >> $@
|
||||||
@echo " package=\"$(CONFIG2___EWOL_APPL_ORGANISATION_TYPE__).$(CONFIG2___EWOL_APPL_COMPAGNY__).$(CONFIG2___EWOL_APPL_NAME__)\" " >> $@
|
@echo " package=\"$(PROJECT_COMPAGNY_TYPE).$(PROJECT_COMPAGNY_NAME2).$(PROJECT_NAME2)\" " >> $@
|
||||||
@echo " android:versionCode=\"1\" " >> $@
|
@echo " android:versionCode=\"1\" " >> $@
|
||||||
@echo " android:versionName=\"$(APPL_VERSION)\"> " >> $@
|
@echo " android:versionName=\"$(APPL_VERSION)\"> " >> $@
|
||||||
ifeq ("$(CONFIG___VIDEO__OPENGL_ES_2)","y")
|
ifeq ("$(CONFIG___VIDEO__OPENGL_ES_2)","y")
|
||||||
@ -60,18 +64,12 @@ ifeq ("$(CONFIG___VIDEO__OPENGL_ES_2)","y")
|
|||||||
endif
|
endif
|
||||||
@echo " <uses-sdk android:minSdkVersion=\"$(CONFIG___EWOL_ANDROID_MINIMUM_SDK_VERSION__)\" /> " >> $@
|
@echo " <uses-sdk android:minSdkVersion=\"$(CONFIG___EWOL_ANDROID_MINIMUM_SDK_VERSION__)\" /> " >> $@
|
||||||
@echo " " >> $@
|
@echo " " >> $@
|
||||||
@echo " <application android:label=\"$(CONFIG___EWOL_APPL_NAME__)\" " >> $@
|
@echo " <application android:label=\"$(PROJECT_NAME)\" " >> $@
|
||||||
ifneq ("$(wildcard ./$(CONFIG2___EWOL_ANDROID_ICON__).png)","")
|
|
||||||
@mkdir -p $(FINAL_FOLDER_JAVA)/res/drawable/
|
|
||||||
@cp ./$(CONFIG2___EWOL_ANDROID_ICON__).png $(FINAL_FOLDER_JAVA)/res/drawable/icon.png
|
|
||||||
@echo " android:icon=\"@drawable/icon\" " >> $@
|
@echo " android:icon=\"@drawable/icon\" " >> $@
|
||||||
endif
|
|
||||||
@echo " > " >> $@
|
@echo " > " >> $@
|
||||||
@echo " <activity android:name=\".$(CONFIG2___EWOL_APPL_NAME__)\" " >> $@
|
@echo " <activity android:name=\".$(PROJECT_NAME2)\" " >> $@
|
||||||
@echo " android:label=\"$(CONFIG___EWOL_APPL_BASIC_TITLE__)\" " >> $@
|
@echo " android:label=\"$(CONFIG___EWOL_APPL_BASIC_TITLE__)\" " >> $@
|
||||||
ifneq ("$(wildcard ./$(CONFIG2___EWOL_ANDROID_ICON__).png)","")
|
|
||||||
@echo " android:icon=\"@drawable/icon\" " >> $@
|
@echo " android:icon=\"@drawable/icon\" " >> $@
|
||||||
endif
|
|
||||||
@echo " android:configChanges=\"orientation\"> " >> $@
|
@echo " android:configChanges=\"orientation\"> " >> $@
|
||||||
@echo " <intent-filter> " >> $@
|
@echo " <intent-filter> " >> $@
|
||||||
@echo " <action android:name=\"android.intent.action.MAIN\" /> " >> $@
|
@echo " <action android:name=\"android.intent.action.MAIN\" /> " >> $@
|
||||||
@ -120,67 +118,66 @@ ifeq ("$(CONFIG___ANDROID_PERMISSION__ACCESS_FINE_LOCATION__)","y")
|
|||||||
endif
|
endif
|
||||||
@echo "</manifest> " >> $@
|
@echo "</manifest> " >> $@
|
||||||
|
|
||||||
final : javaclean $(FINAL_FILE_ABSTRACTION) $(FINAL_FOLDER_JAVA)/AndroidManifest.xml
|
|
||||||
$(Q)mkdir -p $(FINAL_FOLDER_JAVA)/res/
|
javaclean:
|
||||||
|
$(Q)mkdir -p $(FINAL_FOLDER_JAVA_PROJECT)/
|
||||||
@echo ".apk/assets/ <== assets"
|
|
||||||
$(Q)mkdir -p $(FINAL_FOLDER_JAVA)/data/assets/
|
|
||||||
$(Q)cp -r $(EWOL_FOLDER)/share/* $(FINAL_FOLDER_JAVA)/data/assets/
|
|
||||||
$(Q)cp -r share/* $(FINAL_FOLDER_JAVA)/data/assets/
|
final : javaclean $(FINAL_FILE_ABSTRACTION) $(TARGET_OUT_STAGING)/AndroidManifest.xml
|
||||||
|
$(Q)mkdir -p $(TARGET_OUT_STAGING)/res/
|
||||||
@echo ".apk/lib/armeabi/ <== *.so"
|
$(Q)mkdir -p $(TARGET_OUT_STAGING)/src/
|
||||||
$(Q)mkdir -p $(FINAL_FOLDER_JAVA)/data/lib/armeabi/
|
|
||||||
$(Q)cp $(TARGET_OUT_STAGING)/usr/lib/$(CONFIG2___EWOL_APPL_NAME__).so $(FINAL_FOLDER_JAVA)/data/lib/armeabi/lib$(CONFIG2___EWOL_APPL_NAME__).so
|
|
||||||
|
|
||||||
@# Doc :
|
@# Doc :
|
||||||
@# http://asantoso.wordpress.com/2009/09/15/how-to-build-android-application-package-apk-from-the-command-line-using-the-sdk-tools-continuously-integrated-using-cruisecontrol/
|
@# http://asantoso.wordpress.com/2009/09/15/how-to-build-android-application-package-apk-from-the-command-line-using-the-sdk-tools-continuously-integrated-using-cruisecontrol/
|
||||||
|
|
||||||
@echo "R.java <== Resources files"
|
@echo "R.java <== Resources files"
|
||||||
$(Q)$(PROJECT_SDK)/platform-tools/aapt p -f \
|
$(Q)$(PROJECT_SDK)/platform-tools/aapt p -f \
|
||||||
-M $(FINAL_FOLDER_JAVA)/AndroidManifest.xml \
|
-M $(TARGET_OUT_STAGING)/AndroidManifest.xml \
|
||||||
-F $(FINAL_FOLDER_JAVA)/resources.res \
|
-F $(TARGET_OUT_STAGING)/resources.res \
|
||||||
-I $(PROJECT_SDK)/platforms/android-15/android.jar\
|
-I $(PROJECT_SDK)/platforms/android-15/android.jar\
|
||||||
-S $(FINAL_FOLDER_JAVA)/res/ \
|
-S $(TARGET_OUT_STAGING)/res/ \
|
||||||
-J $(FINAL_FOLDER_JAVA)/src
|
-J $(TARGET_OUT_STAGING)/src
|
||||||
|
@#aapt package -f -M ${manifest.file} -F ${packaged.resource.file} -I ${path.to.android-jar.library}
|
||||||
|
@# -S ${android-resource-directory} [-m -J ${folder.to.output.the.R.java}]
|
||||||
|
|
||||||
$(Q)mkdir -p $(FINAL_FOLDER_JAVA)/build/classes/
|
$(Q)mkdir -p $(TARGET_OUT_STAGING)/build/classes/
|
||||||
@echo ".class <== .java"
|
@echo ".class <== .java"
|
||||||
@# more information with : -Xlint
|
@# more information with : -Xlint
|
||||||
$(Q)javac \
|
$(Q)javac \
|
||||||
-d $(FINAL_FOLDER_JAVA)/build/classes \
|
-d $(TARGET_OUT_STAGING)/build/classes \
|
||||||
-classpath $(PROJECT_SDK)/platforms/android-15/android.jar \
|
-classpath $(PROJECT_SDK)/platforms/android-15/android.jar \
|
||||||
$(FINAL_FILE_ABSTRACTION) \
|
$(FINAL_FILE_ABSTRACTION) \
|
||||||
$(EWOL_FOLDER)/Java/src/org/ewol/interfaceJNI.java \
|
$(EWOL_FOLDER)/Java/src/org/ewol/interfaceJNI.java \
|
||||||
$(EWOL_FOLDER)/Java/src/org/ewol/interfaceOpenGL.java \
|
$(EWOL_FOLDER)/Java/src/org/ewol/interfaceOpenGL.java \
|
||||||
$(EWOL_FOLDER)/Java/src/org/ewol/interfaceSurfaceView.java \
|
$(EWOL_FOLDER)/Java/src/org/ewol/interfaceSurfaceView.java \
|
||||||
$(EWOL_FOLDER)/Java/src/org/ewol/interfaceAudio.java \
|
$(EWOL_FOLDER)/Java/src/org/ewol/interfaceAudio.java \
|
||||||
$(FINAL_FOLDER_JAVA)/src/R.java
|
$(TARGET_OUT_STAGING)/src/R.java
|
||||||
|
|
||||||
@echo ".dex <== .class"
|
@echo ".dex <== .class"
|
||||||
$(Q)$(PROJECT_SDK)/platform-tools/dx \
|
$(Q)$(PROJECT_SDK)/platform-tools/dx \
|
||||||
--dex --no-strict \
|
--dex --no-strict \
|
||||||
--output=$(FINAL_FOLDER_JAVA)/build/$(CONFIG2___EWOL_APPL_NAME__).dex \
|
--output=$(TARGET_OUT_STAGING)/build/$(PROJECT_NAME2).dex \
|
||||||
$(FINAL_FOLDER_JAVA)/build/classes/
|
$(TARGET_OUT_STAGING)/build/classes/
|
||||||
|
|
||||||
@echo ".apk <== .dex, assets, .so, res"
|
@echo ".apk <== .dex, assets, .so, res"
|
||||||
$(Q)$(PROJECT_SDK)/tools/apkbuilder \
|
$(Q)$(PROJECT_SDK)/tools/apkbuilder \
|
||||||
$(FINAL_FOLDER_JAVA)/build/$(CONFIG2___EWOL_APPL_NAME__)-unalligned.apk \
|
$(TARGET_OUT_STAGING)/build/$(PROJECT_NAME2)-unalligned.apk \
|
||||||
-u \
|
-u \
|
||||||
-z $(FINAL_FOLDER_JAVA)/resources.res \
|
-z $(TARGET_OUT_STAGING)/resources.res \
|
||||||
-f $(FINAL_FOLDER_JAVA)/build/$(CONFIG2___EWOL_APPL_NAME__).dex \
|
-f $(TARGET_OUT_STAGING)/build/$(PROJECT_NAME2).dex \
|
||||||
-rf $(FINAL_FOLDER_JAVA)/data
|
-rf $(TARGET_OUT_STAGING)/data
|
||||||
|
|
||||||
@# doc :
|
@# doc :
|
||||||
@# http://developer.android.com/tools/publishing/app-signing.html
|
@# http://developer.android.com/tools/publishing/app-signing.html
|
||||||
|
|
||||||
@# keytool is situated in $(JAVA_HOME)/bin ...
|
@# keytool is situated in $(JAVA_HOME)/bin ...
|
||||||
$(if $(wildcard ./$(CONFIG2___EWOL_APPL_NAME__)-$(BUILD_DIRECTORY_MODE).jks),$(empty), \
|
$(if $(wildcard ./$(PROJECT_NAME2)-$(BUILD_DIRECTORY_MODE).jks),$(empty), \
|
||||||
$(Q)echo "./$(CONFIG2___EWOL_APPL_NAME__).jks <== dynamic key (NOTE : It might ask some question to generate the key for android)" ; \
|
$(Q)echo "./$(PROJECT_NAME2)-$(BUILD_DIRECTORY_MODE).jks <== dynamic key (NOTE : It might ask some question to generate the key for android)" ; \
|
||||||
keytool -genkeypair -v \
|
keytool -genkeypair -v \
|
||||||
-keystore ./$(CONFIG2___EWOL_APPL_NAME__)-$(BUILD_DIRECTORY_MODE).jks \
|
-keystore ./$(PROJECT_NAME2)-$(BUILD_DIRECTORY_MODE).jks \
|
||||||
-storepass Pass$(CONFIG2___EWOL_APPL_NAME__) \
|
-storepass Pass$(PROJECT_NAME2) \
|
||||||
-alias alias$(CONFIG2___EWOL_APPL_NAME__) \
|
-alias alias$(PROJECT_NAME2) \
|
||||||
-keypass PassK$(CONFIG2___EWOL_APPL_NAME__) \
|
-keypass PassK$(PROJECT_NAME2) \
|
||||||
-keyalg RSA \
|
-keyalg RSA \
|
||||||
-validity 365 \
|
-validity 365 \
|
||||||
)
|
)
|
||||||
@ -207,35 +204,49 @@ final : javaclean $(FINAL_FILE_ABSTRACTION) $(FINAL_FOLDER_JAVA)/AndroidManifest
|
|||||||
@# keytool is situated in $(JAVA_HOME)/bin ...
|
@# keytool is situated in $(JAVA_HOME)/bin ...
|
||||||
@echo "apk(Signed) <== apk"
|
@echo "apk(Signed) <== apk"
|
||||||
@#generate the pass file :
|
@#generate the pass file :
|
||||||
@echo "Pass$(CONFIG2___EWOL_APPL_NAME__)" > tmpPass.boo
|
@echo "Pass$(PROJECT_NAME2)" > tmpPass.boo
|
||||||
@echo "PassK$(CONFIG2___EWOL_APPL_NAME__)" >> tmpPass.boo
|
@echo "PassK$(PROJECT_NAME2)" >> tmpPass.boo
|
||||||
@# verbose mode : -verbose
|
@# verbose mode : -verbose
|
||||||
$(Q)jarsigner \
|
$(Q)jarsigner \
|
||||||
-sigalg MD5withRSA \
|
-sigalg MD5withRSA \
|
||||||
-digestalg SHA1 \
|
-digestalg SHA1 \
|
||||||
-keystore ./$(CONFIG2___EWOL_APPL_NAME__)-$(BUILD_DIRECTORY_MODE).jks \
|
-keystore ./$(PROJECT_NAME2)-$(BUILD_DIRECTORY_MODE).jks \
|
||||||
$(FINAL_FOLDER_JAVA)/build/$(CONFIG2___EWOL_APPL_NAME__)-unalligned.apk \
|
$(TARGET_OUT_STAGING)/build/$(PROJECT_NAME2)-unalligned.apk \
|
||||||
alias$(CONFIG2___EWOL_APPL_NAME__) \
|
alias$(PROJECT_NAME2) \
|
||||||
< tmpPass.boo
|
< tmpPass.boo
|
||||||
|
|
||||||
$(Q)rm tmpPass.boo
|
$(Q)rm tmpPass.boo
|
||||||
@echo "apk(aligned) <== apk"
|
@echo "apk(aligned) <== apk"
|
||||||
|
$(Q)rm -f $(TARGET_OUT_STAGING)/$(PROJECT_NAME2).apk
|
||||||
@# verbose mode : -v
|
@# verbose mode : -v
|
||||||
$(Q)zipalign 4 \
|
$(Q)$(PROJECT_SDK)/tools/zipalign 4 \
|
||||||
$(FINAL_FOLDER_JAVA)/build/$(CONFIG2___EWOL_APPL_NAME__)-unalligned.apk \
|
$(TARGET_OUT_STAGING)/build/$(PROJECT_NAME2)-unalligned.apk \
|
||||||
$(FINAL_FOLDER_JAVA)/$(CONFIG2___EWOL_APPL_NAME__).apk
|
$(TARGET_OUT_STAGING)/$(PROJECT_NAME2).apk
|
||||||
|
@# copy file in the final stage :
|
||||||
|
$(Q)mkdir -p $(TARGET_OUT_FINAL)/
|
||||||
|
$(Q)cp $(TARGET_OUT_STAGING)/$(PROJECT_NAME2).apk $(TARGET_OUT_FINAL)/$(PROJECT_NAME2).apk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@echo ------------------------------------------------------------------------
|
@echo ------------------------------------------------------------------------
|
||||||
@echo Install : $(TARGET_OUT_FINAL)/$(CONFIG2___EWOL_APPL_NAME__).apk
|
@echo Install : $(TARGET_OUT_FINAL)/$(PROJECT_NAME2).apk
|
||||||
@echo ------------------------------------------------------------------------
|
@echo ------------------------------------------------------------------------
|
||||||
@# $(PROJECT_SDK)/platform-tools/adb kill-server
|
@# $(PROJECT_SDK)/platform-tools/adb kill-server
|
||||||
@# install application
|
@# install application
|
||||||
sudo $(PROJECT_SDK)/platform-tools/adb install -r $(FINAL_FOLDER_JAVA)/$(CONFIG2___EWOL_APPL_NAME__).apk
|
$(Q)sudo $(PROJECT_SDK)/platform-tools/adb install -r $(TARGET_OUT_FINAL)/$(PROJECT_NAME2).apk
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@echo ------------------------------------------------------------------------
|
@echo ------------------------------------------------------------------------
|
||||||
@echo UnInstall : $(ANDROID_BASIC_FOLDER)bin/$(CONFIG2___EWOL_APPL_NAME__).apk
|
@echo UnInstall : $(TARGET_OUT_FINAL)/$(PROJECT_NAME2).apk
|
||||||
@echo ------------------------------------------------------------------------
|
@echo ------------------------------------------------------------------------
|
||||||
@echo ... TODO ...
|
@echo ... TODO ...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
log:
|
||||||
|
@echo ------------------------------------------------------------------------
|
||||||
|
@echo Run android logat
|
||||||
|
@echo ------------------------------------------------------------------------
|
||||||
|
$(Q)sudo $(PROJECT_SDK)/platform-tools/adb shell logcat
|
||||||
|
|
||||||
|
@ -1,37 +1,48 @@
|
|||||||
|
|
||||||
APPL_DATA_FOLDER=/usr/share/$(PROJECT_NAME)
|
|
||||||
|
# Setup macros definitions
|
||||||
|
include $(EWOL_FOLDER)/Build/core/defs.mk
|
||||||
|
|
||||||
|
# include generic makefile :
|
||||||
|
include $(EWOL_FOLDER)/Build/core/check-project-variable.mk
|
||||||
|
|
||||||
|
|
||||||
|
TARGET_OUT_FOLDER_BINARY := $(PROJECT_NAME2)/usr/bin
|
||||||
|
TARGET_OUT_FOLDER_LIBRAIRY := $(PROJECT_NAME2)/usr/lib
|
||||||
|
TARGET_OUT_FOLDER_DATA := $(PROJECT_NAME2)/usr/share/$(PROJECT_NAME2)
|
||||||
|
TARGET_OUT_FOLDER_DOC := $(PROJECT_NAME2)/usr/share/doc
|
||||||
|
TARGET_OUT_PREFIX_LIBRAIRY :=
|
||||||
|
|
||||||
|
|
||||||
# include generic makefile :
|
# include generic makefile :
|
||||||
include $(EWOL_FOLDER)/Build/core/main.mk
|
include $(EWOL_FOLDER)/Build/core/main.mk
|
||||||
|
|
||||||
|
|
||||||
FINAL_FOLDER_DEBIAN= $(TARGET_OUT_FINAL)/$(PROJECT_NAME)/DEBIAN
|
TARGET_OUT_FOLDER_DEBIAN=$(TARGET_OUT_STAGING)/$(PROJECT_NAME2)/DEBIAN
|
||||||
FINAL_FOLDER_BIN= $(TARGET_OUT_FINAL)/$(PROJECT_NAME)/usr/bin
|
|
||||||
FINAL_FOLDER_LIB= $(TARGET_OUT_FINAL)/$(PROJECT_NAME)/usr/lib
|
|
||||||
FINAL_FOLDER_SHARED_DOC= $(TARGET_OUT_FINAL)/$(PROJECT_NAME)/share/doc
|
|
||||||
FINAL_FOLDER_SHARED_DATA=$(TARGET_OUT_FINAL)/$(PROJECT_NAME)/share/$(PROJECT_NAME)
|
|
||||||
|
|
||||||
FINAL_FILE_CONTROL=$(FINAL_FOLDER_DEBIAN)/control
|
FINAL_FILE_CONTROL=$(TARGET_OUT_FOLDER_DEBIAN)/control
|
||||||
FINAL_FILE_POST_RM=$(FINAL_FOLDER_DEBIAN)/postrm
|
FINAL_FILE_POST_RM=$(TARGET_OUT_FOLDER_DEBIAN)/postrm
|
||||||
|
|
||||||
FINAL_VERSION_TAG_SHORT=$(shell git describe --tags --abbrev=0)
|
FINAL_VERSION_TAG_SHORT=$(shell git describe --tags --abbrev=0)
|
||||||
|
|
||||||
|
|
||||||
# http://alp.developpez.com/tutoriels/debian/creer-paquet/
|
# http://alp.developpez.com/tutoriels/debian/creer-paquet/
|
||||||
final: all
|
final: all
|
||||||
@echo ------------------------------------------------------------------------
|
@echo ------------------------------------------------------------------------
|
||||||
@echo Final
|
@echo Final
|
||||||
@echo ------------------------------------------------------------------------
|
@echo ------------------------------------------------------------------------
|
||||||
@echo 'Create Folders ...'
|
@echo 'Create Folders ...'
|
||||||
@mkdir -p $(FINAL_FOLDER_DEBIAN)
|
@mkdir -p $(TARGET_OUT_FOLDER_DEBIAN)
|
||||||
|
@mkdir -p $(TARGET_OUT_STAGING)/$(TARGET_OUT_FOLDER_DOC)
|
||||||
# Create the control file
|
# Create the control file
|
||||||
@echo "Package: "$(PROJECT_NAME) > $(FINAL_FILE_CONTROL)
|
@echo "Package: "$(PROJECT_NAME2) > $(FINAL_FILE_CONTROL)
|
||||||
@echo "Version: "$(FINAL_VERSION_TAG_SHORT) >> $(FINAL_FILE_CONTROL)
|
@echo "Version: "$(FINAL_VERSION_TAG_SHORT) >> $(FINAL_FILE_CONTROL)
|
||||||
@echo "Section: Development,Editors" >> $(FINAL_FILE_CONTROL)
|
@echo "Section: "$(PROJECT_SECTION) >> $(FINAL_FILE_CONTROL)
|
||||||
@echo "Priority: optional" >> $(FINAL_FILE_CONTROL)
|
@echo "Priority: "$(PROJECT_PRIORITY) >> $(FINAL_FILE_CONTROL)
|
||||||
@echo "Architecture: all" >> $(FINAL_FILE_CONTROL)
|
@echo "Architecture: all" >> $(FINAL_FILE_CONTROL)
|
||||||
@echo "Depends: bash" >> $(FINAL_FILE_CONTROL)
|
@echo "Depends: bash" >> $(FINAL_FILE_CONTROL)
|
||||||
@echo "Maintainer: Mr DUPIN Edouard <yui.heero@gmail.com>" >> $(FINAL_FILE_CONTROL)
|
@echo "Maintainer: "$(PROJECT_MAINTAINER) >> $(FINAL_FILE_CONTROL)
|
||||||
@echo "Description: Text editor for sources code with ctags management" >> $(FINAL_FILE_CONTROL)
|
@echo "Description: "$(PROJECT_DESCRIPTION) >> $(FINAL_FILE_CONTROL)
|
||||||
@echo "" >> $(FINAL_FILE_CONTROL)
|
@echo "" >> $(FINAL_FILE_CONTROL)
|
||||||
# Create the PostRm
|
# Create the PostRm
|
||||||
@echo "#!/bin/bash" > $(FINAL_FILE_POST_RM)
|
@echo "#!/bin/bash" > $(FINAL_FILE_POST_RM)
|
||||||
@ -41,13 +52,13 @@ final: all
|
|||||||
@chmod 755 $(FINAL_FILE_POST_RM)*
|
@chmod 755 $(FINAL_FILE_POST_RM)*
|
||||||
@#chmod 755 $(PROJECT_NAME)/DEBIAN/pre*
|
@#chmod 755 $(PROJECT_NAME)/DEBIAN/pre*
|
||||||
@# copy licence and information :
|
@# copy licence and information :
|
||||||
@cp -f os-Linux/README $(FINAL_FOLDER_SHARED_DOC)/README
|
@cp -f os-Linux/README $(TARGET_OUT_STAGING)/$(TARGET_OUT_FOLDER_DOC)/README
|
||||||
@cp -f licence.txt $(FINAL_FOLDER_SHARED_DOC)/copyright
|
@cp -f licence.txt $(TARGET_OUT_STAGING)/$(TARGET_OUT_FOLDER_DOC)/copyright
|
||||||
@cp -f changelog $(FINAL_FOLDER_SHARED_DOC)/changelog
|
@cp -f changelog $(TARGET_OUT_STAGING)/$(TARGET_OUT_FOLDER_DOC)/changelog
|
||||||
@# copy all the staging
|
@echo pachage : $(TARGET_OUT_STAGING)/$(PROJECT_NAME).deb
|
||||||
@cp -rf $(TARGET_OUT_STAGING)/* $(TARGET_OUT_FINAL)/$(PROJECT_NAME)/
|
@cd $(TARGET_OUT_STAGING)/; dpkg-deb --build $(PROJECT_NAME)
|
||||||
@echo pachage : $(TARGET_OUT_FINAL)/$(PROJECT_NAME).deb
|
@mkdir -p $(TARGET_OUT_FINAL)
|
||||||
@cd $(TARGET_OUT_FINAL)/; dpkg-deb --build $(PROJECT_NAME)
|
@cp $(TARGET_OUT_STAGING)/$(PROJECT_NAME).deb $(TARGET_OUT_FINAL)/
|
||||||
|
|
||||||
install: final
|
install: final
|
||||||
@echo ------------------------------------------------------------------------
|
@echo ------------------------------------------------------------------------
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Setup macros definitions
|
||||||
|
include $(EWOL_FOLDER)/Build/core/defs.mk
|
||||||
|
|
||||||
|
# include generic makefile :
|
||||||
|
include $(EWOL_FOLDER)/Build/core/check-project-variable.mk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# for MAcOSX we need to FORCE CLANG
|
# for MAcOSX we need to FORCE CLANG
|
||||||
CLANG:=1
|
CLANG:=1
|
||||||
# ewemple of a cross compiler :
|
# ewemple of a cross compiler :
|
||||||
@ -6,6 +16,13 @@ CLANG:=1
|
|||||||
# http://devs.openttd.org/~truebrain/compile-farm/apple-darwin9.txt
|
# http://devs.openttd.org/~truebrain/compile-farm/apple-darwin9.txt
|
||||||
|
|
||||||
|
|
||||||
|
TARGET_OUT_FOLDER_BINARY := MacOS
|
||||||
|
TARGET_OUT_FOLDER_LIBRAIRY := lib
|
||||||
|
TARGET_OUT_FOLDER_DATA := Resources
|
||||||
|
TARGET_OUT_FOLDER_DOC := doc
|
||||||
|
TARGET_OUT_PREFIX_LIBRAIRY :=
|
||||||
|
|
||||||
|
|
||||||
# include generic makefile :
|
# include generic makefile :
|
||||||
include $(EWOL_FOLDER)/Build/core/main.mk
|
include $(EWOL_FOLDER)/Build/core/main.mk
|
||||||
|
|
||||||
|
@ -1,10 +1,23 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Setup macros definitions
|
||||||
|
include $(EWOL_FOLDER)/Build/core/defs.mk
|
||||||
|
|
||||||
|
# include generic makefile :
|
||||||
|
include $(EWOL_FOLDER)/Build/core/check-project-variable.mk
|
||||||
|
|
||||||
|
|
||||||
# defien the target OS of this system
|
# defien the target OS of this system
|
||||||
TARGET_OS=Windows
|
TARGET_OS=Windows
|
||||||
# define the cross compilateur
|
# define the cross compilateur
|
||||||
TARGET_CROSS=i586-mingw32msvc-
|
TARGET_CROSS=i586-mingw32msvc-
|
||||||
|
|
||||||
|
TARGET_OUT_FOLDER_BINARY :=
|
||||||
|
TARGET_OUT_FOLDER_LIBRAIRY := lib
|
||||||
|
TARGET_OUT_FOLDER_DATA := data
|
||||||
|
TARGET_OUT_FOLDER_DOC := doc
|
||||||
|
TARGET_OUT_PREFIX_LIBRAIRY :=
|
||||||
|
|
||||||
include $(EWOL_FOLDER)/Build/core/main.mk
|
include $(EWOL_FOLDER)/Build/core/main.mk
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
LOCAL_MODULE_CLASS := EXECUTABLE
|
LOCAL_MODULE_CLASS := EXECUTABLE
|
||||||
|
|
||||||
ifeq ("$(LOCAL_DESTDIR)","")
|
ifeq ("$(LOCAL_DESTDIR)","")
|
||||||
LOCAL_DESTDIR := usr/bin
|
LOCAL_DESTDIR := $(TARGET_OUT_FOLDER_BINARY)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ("$(LOCAL_MODULE_FILENAME)","")
|
ifeq ("$(LOCAL_MODULE_FILENAME)","")
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
LOCAL_MODULE_CLASS := SHARED_LIBRARY
|
LOCAL_MODULE_CLASS := SHARED_LIBRARY
|
||||||
|
|
||||||
ifeq ("$(LOCAL_DESTDIR)","")
|
ifeq ("$(LOCAL_DESTDIR)","")
|
||||||
LOCAL_DESTDIR := usr/lib
|
LOCAL_DESTDIR := $(TARGET_OUT_FOLDER_LIBRAIRY)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ("$(LOCAL_MODULE_FILENAME)","")
|
ifeq ("$(LOCAL_MODULE_FILENAME)","")
|
||||||
LOCAL_MODULE_FILENAME := $(LOCAL_MODULE)$(TARGET_SHARED_LIB_SUFFIX)
|
LOCAL_MODULE_FILENAME := $(TARGET_OUT_PREFIX_LIBRAIRY)$(LOCAL_MODULE)$(TARGET_SHARED_LIB_SUFFIX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(local-add-module)
|
$(local-add-module)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
LOCAL_MODULE_CLASS := STATIC_LIBRARY
|
LOCAL_MODULE_CLASS := STATIC_LIBRARY
|
||||||
|
|
||||||
ifeq ("$(LOCAL_DESTDIR)","")
|
ifeq ("$(LOCAL_DESTDIR)","")
|
||||||
LOCAL_DESTDIR := usr/lib
|
LOCAL_DESTDIR := $(TARGET_OUT_FOLDER_LIBRAIRY)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ("$(LOCAL_MODULE_FILENAME)","")
|
ifeq ("$(LOCAL_MODULE_FILENAME)","")
|
||||||
|
97
core/check-project-variable.mk
Normal file
97
core/check-project-variable.mk
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
|
||||||
|
#######################################################################################
|
||||||
|
# Global project variables
|
||||||
|
#######################################################################################
|
||||||
|
|
||||||
|
#Can be many things, but limit whith no space no special char and no Maj ... [a-z]
|
||||||
|
# com : Commercial
|
||||||
|
# net : Network??
|
||||||
|
# org : Organisation
|
||||||
|
# gov : Governement
|
||||||
|
# mil : Military
|
||||||
|
# edu : Education
|
||||||
|
# pri : Private
|
||||||
|
# museum : ...
|
||||||
|
LIST_OF_COMPAGNY_TYPE:= com net org gov mil edu pri museum
|
||||||
|
DEFAULT_COMPAGNY_TYPE=com
|
||||||
|
# check if it is setted :
|
||||||
|
PROJECT_COMPAGNY_TYPE?=$(DEFAULT_ORGANISATION)
|
||||||
|
# Check if the compagny type is set :
|
||||||
|
ifeq ($(filter $(PROJECT_COMPAGNY_TYPE), $(LIST_OF_COMPAGNY_TYPE)), )
|
||||||
|
$(error PROJECT_COMPAGNY_TYPE=$(PROJECT_COMPAGNY_TYPE) is not supported, choose between $(LIST_OF_COMPAGNY_TYPE))
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Application name setting
|
||||||
|
DEFAULT_PROJECT_NAME=applnoname
|
||||||
|
PROJECT_NAME?=$(DEFAULT_PROJECT_NAME)
|
||||||
|
ifeq ($(PROJECT_NAME),$(DEFAULT_PROJECT_NAME))
|
||||||
|
$(info "PROJECT_NAME=$(PROJECT_NAME) ==> automatic set it by default"
|
||||||
|
endif
|
||||||
|
PROJECT_NAME2 := $(subst _,$(empty),$(call convert-special-char,$(PROJECT_NAME)))
|
||||||
|
|
||||||
|
# Icon application name setting
|
||||||
|
DEFAULT_PROJECT_ICON=$(EWOL_FOLDER)/share/icon.png
|
||||||
|
PROJECT_ICON?=$(DEFAULT_PROJECT_ICON)
|
||||||
|
ifeq ($(PROJECT_ICON),$(DEFAULT_PROJECT_ICON))
|
||||||
|
$(info "PROJECT_ICON=$(PROJECT_ICON) ==> automatic set it by default"
|
||||||
|
endif
|
||||||
|
|
||||||
|
#compagny name setting
|
||||||
|
DEFAULT_PROJECT_COMPAGNY_NAME=unknow
|
||||||
|
PROJECT_COMPAGNY_NAME?=$(DEFAULT_PROJECT_COMPAGNY_NAME)
|
||||||
|
ifeq ($(PROJECT_ICON),$(DEFAULT_PROJECT_ICON))
|
||||||
|
$(info "PROJECT_ICON=$(PROJECT_ICON) ==> automatic set it by default"
|
||||||
|
endif
|
||||||
|
PROJECT_COMPAGNY_NAME2 := $(subst _,$(empty),$(call convert-special-char,$(PROJECT_COMPAGNY_NAME)))
|
||||||
|
|
||||||
|
# project section :
|
||||||
|
DEFAULT_PROJECT_SECTION=misc
|
||||||
|
ifeq ($(PROJECT_SECTION),$(empty))
|
||||||
|
$(info "PROJECT_SECTION=$(DEFAULT_PROJET_SECTION) ==> set by default")
|
||||||
|
$(info " refer to : http://packages.debian.org/sid/")
|
||||||
|
$(info " admin cli-mono comm database debian-installer")
|
||||||
|
$(info " debug doc editors electronics devel embedded")
|
||||||
|
$(info " fonts games gnome gnu-r gnustep graphics")
|
||||||
|
$(info " hamradio haskell httpd interpreters java")
|
||||||
|
$(info " kde kernel libdevel libs lisp localization")
|
||||||
|
$(info " mail math misc net news ocaml oldlibs otherosfs")
|
||||||
|
$(info " perl php python ruby science shells sound tex")
|
||||||
|
$(info " text utils vcs video virtual web x11 xfce zope ...")
|
||||||
|
endif
|
||||||
|
PROJECT_SECTION?=$(DEFAULT_PROJECT_SECTION)
|
||||||
|
|
||||||
|
#projet priority :
|
||||||
|
DEFAULT_PROJECT_PRIORITY=optional
|
||||||
|
ifeq ($(PROJECT_PRIORITY),$(empty))
|
||||||
|
$(info "PROJET_PRIORITY=$(DEFAULT_PROJET_PRIORITY) ==> set by default")
|
||||||
|
$(info " required : Packages which are necessary for the proper functioning of the system (usually, this means that dpkg functionality depends on these packages). Removing a required package may cause your system to become totally broken and you may not even be able to use dpkg to put things back, so only do so if you know what you are doing. Systems with only the required packages are probably unusable, but they do have enough functionality to allow the sysadmin to boot and install more software.")
|
||||||
|
$(info " important : Important programs, including those which one would expect to find on any Unix-like system. If the expectation is that an experienced Unix person who found it missing would say "What on earth is going on, where is foo?", it must be an important package.[6] Other packages without which the system will not run well or be usable must also have priority important. This does not include Emacs, the X Window System, TeX or any other large applications. The important packages are just a bare minimum of commonly-expected and necessary tools.")
|
||||||
|
$(info " standard : These packages provide a reasonably small but not too limited character-mode system. This is what will be installed by default if the user doesn't select anything else. It doesn't include many large applications.")
|
||||||
|
$(info " optional : (In a sense everything that isn't required is optional, but that's not what is meant here.) This is all the software that you might reasonably want to install if you didn't know what it was and don't have specialized requirements. This is a much larger system and includes the X Window System, a full TeX distribution, and many applications. Note that optional packages should not conflict with each other.")
|
||||||
|
$(info " extra : This contains all packages that conflict with others with required, important, standard or optional priorities, or are only likely to be useful if you already know what they are or have specialized requirements (such as packages containing only detached debugging symbols).")
|
||||||
|
endif
|
||||||
|
PROJECT_PRIORITY?=$(DEFAULT_PROJECT_PRIORITY)
|
||||||
|
|
||||||
|
#maintainer list :
|
||||||
|
DEFAULT_PROJECT_MAINTAINER="Mr UNKNOW unknow <unknow@unknow.com>"
|
||||||
|
PROJECT_MAINTAINER?=$(DEFAULT_PROJECT_MAINTAINER)
|
||||||
|
ifeq ($(PROJECT_MAINTAINER),$(DEFAULT_PROJET_PRIORITY))
|
||||||
|
$(info "PROJECT_MAINTAINER=$(PROJECT_MAINTAINER) ==> set by default (but you might set it ...")
|
||||||
|
endif
|
||||||
|
|
||||||
|
DEFAULT_PROJECT_DESCRIPTION="No description availlable"
|
||||||
|
PROJECT_DESCRIPTION?=$(DEFAULT_PROJECT_DESCRIPTION)
|
||||||
|
ifeq ($(PROJECT_DESCRIPTION),$(DEFAULT_PROJECT_DESCRIPTION))
|
||||||
|
$(info "PROJECT_DESCRIPTION=$(PROJECT_DESCRIPTION) ==> set by default (but you might set it ...")
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(info ---------------------------------------------------------------------);
|
||||||
|
$(info PROJECT_COMPAGNY_TYPE: $(PROJECT_COMPAGNY_TYPE));
|
||||||
|
$(info PROJECT_NAME2: $(PROJECT_NAME2));
|
||||||
|
$(info PROJECT_ICON: $(PROJECT_ICON));
|
||||||
|
$(info PROJECT_COMPAGNY_NAME2: $(PROJECT_COMPAGNY_NAME2));
|
||||||
|
$(info PROJECT_SECTION: $(PROJECT_SECTION));
|
||||||
|
$(info PROJECT_PRIORITY: $(PROJECT_PRIORITY));
|
||||||
|
$(info PROJECT_MAINTAINER: $(PROJECT_MAINTAINER));
|
||||||
|
$(info PROJECT_DESCRIPTION: $(PROJECT_DESCRIPTION));
|
||||||
|
$(info ---------------------------------------------------------------------);
|
@ -88,20 +88,19 @@ define __generate-config
|
|||||||
echo " bool 'Build $(__mod)'" >> $1; \
|
echo " bool 'Build $(__mod)'" >> $1; \
|
||||||
echo " default y" >> $1; \
|
echo " default y" >> $1; \
|
||||||
echo " help" >> $1; \
|
echo " help" >> $1; \
|
||||||
echo " Build $(__mod)" >> $1; \
|
echo " Force build of module $(__mod)" >> $1; \
|
||||||
|
echo " or copy data in the staging area (.a too)" >> $1; \
|
||||||
) \
|
) \
|
||||||
echo "endmenu" >> $1; \
|
echo "endmenu" >> $1; \
|
||||||
$(foreach __mod,$(__modules), \
|
$(foreach __mod,$(__modules), \
|
||||||
$(eval __build := BUILD_$(call get-define,$(__mod))) \
|
$(eval __build := BUILD_$(call get-define,$(__mod))) \
|
||||||
$(eval __files := $(call __get_module-config-in-files,$(__mod))) \
|
$(eval __files := $(call __get_module-config-in-files,$(__mod))) \
|
||||||
if [ "$(__files)" != "" ]; then \
|
if [ "$(__files)" != "" ]; then \
|
||||||
echo "if $(__build)" >> $1; \
|
echo "menu $(__mod)" >> $1; \
|
||||||
echo " menu $(__mod)" >> $1; \
|
|
||||||
$(foreach __f,$(__files), \
|
$(foreach __f,$(__files), \
|
||||||
echo " source $(call fullpath,$(__f))" >> $1; \
|
echo " source $(call fullpath,$(__f))" >> $1; \
|
||||||
) \
|
) \
|
||||||
echo " endmenu" >> $1; \
|
echo "endmenu" >> $1; \
|
||||||
echo "endif" >> $1; \
|
|
||||||
fi; \
|
fi; \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
@ -516,7 +516,7 @@ $(Q)$(CCACHE) $(TARGET_CXX) \
|
|||||||
$(TARGET_GLOBAL_CFLAGS_$(PRIVATE_ARM_MODE)) \
|
$(TARGET_GLOBAL_CFLAGS_$(PRIVATE_ARM_MODE)) \
|
||||||
$(TARGET_GLOBAL_CFLAGS) $(TARGET_GLOBAL_CPPFLAGS) $(CXX_FLAGS_WARNINGS) \
|
$(TARGET_GLOBAL_CFLAGS) $(TARGET_GLOBAL_CPPFLAGS) $(CXX_FLAGS_WARNINGS) \
|
||||||
$(PRIVATE_CFLAGS) $(PRIVATE_CPPFLAGS) \
|
$(PRIVATE_CFLAGS) $(PRIVATE_CPPFLAGS) \
|
||||||
-D__EWOL_APPL_NAME__="$(CONFIG___EWOL_APPL_NAME__)" \
|
-D__EWOL_APPL_NAME__="$(PROJECT_NAME2)" \
|
||||||
-c -MMD -MP -g \
|
-c -MMD -MP -g \
|
||||||
$(call path-from-top,$<)
|
$(call path-from-top,$<)
|
||||||
endef
|
endef
|
||||||
@ -536,7 +536,7 @@ $(Q)$(CCACHE) $(TARGET_CC) \
|
|||||||
$(TARGET_GLOBAL_CFLAGS_$(PRIVATE_ARM_MODE)) \
|
$(TARGET_GLOBAL_CFLAGS_$(PRIVATE_ARM_MODE)) \
|
||||||
$(TARGET_GLOBAL_CFLAGS) $(CC_FLAGS_WARNINGS) \
|
$(TARGET_GLOBAL_CFLAGS) $(CC_FLAGS_WARNINGS) \
|
||||||
$(PRIVATE_CFLAGS) \
|
$(PRIVATE_CFLAGS) \
|
||||||
-D__EWOL_APPL_NAME__="$(CONFIG___EWOL_APPL_NAME__)" \
|
-D__EWOL_APPL_NAME__="$(PROJECT_NAME2)" \
|
||||||
-c -MMD -MP -g \
|
-c -MMD -MP -g \
|
||||||
$(call path-from-top,$<)
|
$(call path-from-top,$<)
|
||||||
endef
|
endef
|
||||||
@ -557,7 +557,7 @@ $(Q)$(CCACHE) $(TARGET_CC) \
|
|||||||
$(TARGET_GLOBAL_CFLAGS) $(CC_FLAGS_WARNINGS) \
|
$(TARGET_GLOBAL_CFLAGS) $(CC_FLAGS_WARNINGS) \
|
||||||
$(PRIVATE_CFLAGS) \
|
$(PRIVATE_CFLAGS) \
|
||||||
-c -MMD -MP -g \
|
-c -MMD -MP -g \
|
||||||
-D__EWOL_APPL_NAME__="$(CONFIG___EWOL_APPL_NAME__)" \
|
-D__EWOL_APPL_NAME__="$(PROJECT_NAME2)" \
|
||||||
$(call path-from-top,$<)
|
$(call path-from-top,$<)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
10
core/main.mk
10
core/main.mk
@ -33,8 +33,6 @@ ifeq ("$(V)","0")
|
|||||||
Q := @
|
Q := @
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CONFIG___EWOL_APPL_NAME__:="$(PROJECT_NAME)"
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
## The folowing 2 macros can NOT be put in defs.mk as it will be included
|
## The folowing 2 macros can NOT be put in defs.mk as it will be included
|
||||||
@ -67,8 +65,6 @@ endif
|
|||||||
include $(BUILD_SYSTEM)/setup-host.mk
|
include $(BUILD_SYSTEM)/setup-host.mk
|
||||||
include $(BUILD_SYSTEM)/setup-target.mk
|
include $(BUILD_SYSTEM)/setup-target.mk
|
||||||
include $(BUILD_SYSTEM)/setup.mk
|
include $(BUILD_SYSTEM)/setup.mk
|
||||||
# Setup macros definitions
|
|
||||||
include $(BUILD_SYSTEM)/defs.mk
|
|
||||||
# Setup warnings flags
|
# Setup warnings flags
|
||||||
include $(BUILD_SYSTEM)/warnings.mk
|
include $(BUILD_SYSTEM)/warnings.mk
|
||||||
# Load configuration
|
# Load configuration
|
||||||
@ -82,15 +78,19 @@ BUILD_EXECUTABLE := $(BUILD_SYSTEM)/build-executable.mk
|
|||||||
BUILD_PREBUILT := $(BUILD_SYSTEM)/build-prebuilt.mk
|
BUILD_PREBUILT := $(BUILD_SYSTEM)/build-prebuilt.mk
|
||||||
BUILD_RULES := $(BUILD_SYSTEM)/rules.mk
|
BUILD_RULES := $(BUILD_SYSTEM)/rules.mk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
## Makefile scan and includes.
|
## Makefile scan and includes.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
TARGET_OUT_BUILD ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/obj
|
TARGET_OUT_BUILD ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/obj
|
||||||
TARGET_OUT_STAGING ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/staging
|
TARGET_OUT_STAGING ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/staging
|
||||||
TARGET_OUT_STAGING_DATA ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/staging
|
|
||||||
TARGET_OUT_FINAL ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/final
|
TARGET_OUT_FINAL ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/final
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Makefile with the list of all makefiles available and include them
|
# Makefile with the list of all makefiles available and include them
|
||||||
SCAN_TARGET := scan
|
SCAN_TARGET := scan
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ all_copy_files :=
|
|||||||
$(foreach __pair,$(LOCAL_COPY_FILES), \
|
$(foreach __pair,$(LOCAL_COPY_FILES), \
|
||||||
$(eval __pair2 := $(subst :,$(space),$(__pair))) \
|
$(eval __pair2 := $(subst :,$(space),$(__pair))) \
|
||||||
$(eval __src := $(addprefix $(LOCAL_PATH)/,$(word 1,$(__pair2)))) \
|
$(eval __src := $(addprefix $(LOCAL_PATH)/,$(word 1,$(__pair2)))) \
|
||||||
$(eval __dst := $(TARGET_OUT_STAGING)/usr/share/$(PROJECT_NAME)/$(word 2,$(__pair2))) \
|
$(eval __dst := $(TARGET_OUT_STAGING)/$(TARGET_OUT_FOLDER_DATA)/$(word 2,$(__pair2))) \
|
||||||
$(foreach __file_src,$(__src), \
|
$(foreach __file_src,$(__src), \
|
||||||
$(eval all_copy_files += $(__dst)) \
|
$(eval all_copy_files += $(__dst)) \
|
||||||
$(eval $(call copy-one-file,$(__file_src),$(__dst))) \
|
$(eval $(call copy-one-file,$(__file_src),$(__dst))) \
|
||||||
@ -138,7 +138,7 @@ $(foreach __pair,$(LOCAL_COPY_FILES), \
|
|||||||
$(foreach __pair,$(LOCAL_COPY_FOLDERS), \
|
$(foreach __pair,$(LOCAL_COPY_FOLDERS), \
|
||||||
$(eval __pair2 := $(subst :,$(space),$(__pair))) \
|
$(eval __pair2 := $(subst :,$(space),$(__pair))) \
|
||||||
$(eval __folder_src := $(addprefix $(LOCAL_PATH)/,$(word 1,$(__pair2)))) \
|
$(eval __folder_src := $(addprefix $(LOCAL_PATH)/,$(word 1,$(__pair2)))) \
|
||||||
$(eval __folder_dest := $(TARGET_OUT_STAGING)/usr/share/$(PROJECT_NAME)/$(word 2,$(__pair2))) \
|
$(eval __folder_dest := $(TARGET_OUT_STAGING)/$(TARGET_OUT_FOLDER_DATA)/$(word 2,$(__pair2))) \
|
||||||
$(eval __list_file_src := $(wildcard $(__folder_src))) \
|
$(eval __list_file_src := $(wildcard $(__folder_src))) \
|
||||||
$(foreach __file_src,$(__list_file_src), \
|
$(foreach __file_src,$(__list_file_src), \
|
||||||
$(eval __file_dest := $(__folder_dest)/$(notdir $(__file_src))) \
|
$(eval __file_dest := $(__folder_dest)/$(notdir $(__file_src))) \
|
||||||
|
Loading…
Reference in New Issue
Block a user