[DEV] set configuration system with the one unse in the generic linux kernel ==> more compatible
This commit is contained in:
parent
1b6659890d
commit
d207607bac
@ -38,12 +38,7 @@ $(FINAL_FILE_ABSTRACTION) : $(EWOL_FOLDER)/sources/android/PROJECT_NAME.java $(C
|
||||
$(Q)sed -i "s|__PROJECT_VENDOR__|$(PROJECT_COMPAGNY_NAME2)|" $@
|
||||
$(Q)sed -i "s|__PROJECT_NAME__|$(PROJECT_NAME2)|" $@
|
||||
$(Q)sed -i "s|__PROJECT_PACKAGE__|$(PROJECT_NAME2)|" $@
|
||||
ifeq ("$(CONFIG___VIDEO__OPENGL_ES_2)","y")
|
||||
$(Q)sed -i "s|__CONF_OGL_ES_V__|2|" $@
|
||||
else
|
||||
$(Q)sed -i "s|__CONF_OGL_ES_V__|1|" $@
|
||||
endif
|
||||
|
||||
|
||||
APPL_VERSION:=$(shell git describe --tags)
|
||||
# --abbrev=0)
|
||||
@ -59,16 +54,14 @@ $(TARGET_OUT_STAGING)/AndroidManifest.xml : $(CONFIG_GLOBAL_FILE) $(TARGET_OUT_S
|
||||
@echo " package=\"$(PROJECT_COMPAGNY_TYPE).$(PROJECT_COMPAGNY_NAME2).$(PROJECT_NAME2)\" " >> $@
|
||||
@echo " android:versionCode=\"1\" " >> $@
|
||||
@echo " android:versionName=\"$(APPL_VERSION)\"> " >> $@
|
||||
ifeq ("$(CONFIG___VIDEO__OPENGL_ES_2)","y")
|
||||
@echo " <uses-feature android:glEsVersion=\"0x00020000\" android:required=\"true\" />" >> $@
|
||||
endif
|
||||
@echo " <uses-sdk android:minSdkVersion=\"$(CONFIG___EWOL_ANDROID_MINIMUM_SDK_VERSION__)\" /> " >> $@
|
||||
@echo " <uses-sdk android:minSdkVersion=\"$(__EWOL_ANDROID_MINIMUM_SDK_VERSION__)\" /> " >> $@
|
||||
@echo " " >> $@
|
||||
@echo " <application android:label=\"$(PROJECT_NAME)\" " >> $@
|
||||
@echo " android:icon=\"@drawable/icon\" " >> $@
|
||||
@echo " > " >> $@
|
||||
@echo " <activity android:name=\".$(PROJECT_NAME2)\" " >> $@
|
||||
@echo " android:label=\"$(CONFIG___EWOL_APPL_BASIC_TITLE__)\" " >> $@
|
||||
@echo " android:label=\"$(__EWOL_APPL_BASIC_TITLE__)\" " >> $@
|
||||
@echo " android:icon=\"@drawable/icon\" " >> $@
|
||||
@echo " android:configChanges=\"orientation\"> " >> $@
|
||||
@echo " <intent-filter> " >> $@
|
||||
@ -77,43 +70,43 @@ endif
|
||||
@echo " </intent-filter> " >> $@
|
||||
@echo " </activity> " >> $@
|
||||
@echo " </application> " >> $@
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__WRITE_EXTERNAL_STORAGE__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__WRITE_EXTERNAL_STORAGE__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__CAMERA__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__CAMERA__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.CAMERA\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__INTERNET__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__INTERNET__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.INTERNET\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__MODIFY_AUDIO_SETTINGS__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__MODIFY_AUDIO_SETTINGS__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__READ_CALENDAR__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__READ_CALENDAR__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.READ_CALENDAR\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__READ_CONTACTS__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__READ_CONTACTS__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.READ_CONTACTS\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__READ_FRAME_BUFFER__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__READ_FRAME_BUFFER__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.READ_FRAME_BUFFER\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__READ_PROFILE__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__READ_PROFILE__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.READ_PROFILE\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__RECORD_AUDIO__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__RECORD_AUDIO__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.RECORD_AUDIO\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__SET_ORIENTATION__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__SET_ORIENTATION__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.SET_ORIENTATION\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__VIBRATE__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__VIBRATE__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.VIBRATE\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__ACCESS_COARSE_LOCATION__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__ACCESS_COARSE_LOCATION__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" /> " >> $@
|
||||
endif
|
||||
ifeq ("$(CONFIG___ANDROID_PERMISSION__ACCESS_FINE_LOCATION__)","y")
|
||||
ifeq ("$(__ANDROID_PERMISSION__ACCESS_FINE_LOCATION__)","y")
|
||||
@echo " <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" /> " >> $@
|
||||
endif
|
||||
@echo "</manifest> " >> $@
|
||||
|
@ -8,12 +8,12 @@
|
||||
###############################################################################
|
||||
|
||||
# Tools (absolute path)
|
||||
CONF := KCONFIG_NOTIMESTAMP=1 $(call fullpath,$(BUILD_SYSTEM)/conf)
|
||||
QCONF := KCONFIG_NOTIMESTAMP=1 $(call fullpath,$(BUILD_SYSTEM)/qconf)
|
||||
CONF := KCONFIG_NOTIMESTAMP=1 $(call fullpath,$(BUILD_SYSTEM)/../tools/conf)
|
||||
MCONF := KCONFIG_NOTIMESTAMP=1 $(call fullpath,$(BUILD_SYSTEM)/../tools/mconf)
|
||||
|
||||
|
||||
###############################################################################
|
||||
## Begin conf/qconf by copying configuration file to a temp .config file.
|
||||
## Begin conf/mconf by copying configuration file to a temp .config file.
|
||||
## $1 : configuration file.
|
||||
###############################################################################
|
||||
__begin-conf = \
|
||||
@ -24,7 +24,7 @@ __begin-conf = \
|
||||
fi;
|
||||
|
||||
###############################################################################
|
||||
## End conf/qconf by copying temp .config file to configuration file.
|
||||
## End conf/mconf by copying temp .config file to configuration file.
|
||||
## $1 : configuration file.
|
||||
###############################################################################
|
||||
__end-conf = \
|
||||
@ -34,12 +34,12 @@ __end-conf = \
|
||||
rm -rf $${__tmpconfdir};
|
||||
|
||||
###############################################################################
|
||||
## Exceute qconf/conf.
|
||||
## Exceute mconf/conf.
|
||||
## $1 : Config.in file.
|
||||
## $2 : options.
|
||||
###############################################################################
|
||||
__exec-conf = (cd $$(dirname $${__tmpconf}) && $(CONF) $2 $1);
|
||||
__exec-qconf = (cd $$(dirname $${__tmpconf}) && $(QCONF) $2 $1);
|
||||
__exec-mconf = (cd $$(dirname $${__tmpconf}) && $(MCONF) $2 $1);
|
||||
|
||||
|
||||
#TODO : REMOVED
|
||||
@ -156,8 +156,6 @@ endef
|
||||
## $1 : input config file.
|
||||
## $2 : output autoconf.h file.
|
||||
##
|
||||
## Remove CONFIG_ prefix.
|
||||
## Remove CONFIG_ in commented lines.
|
||||
## Put lines begining with '#' between '/*' '*/'.
|
||||
## Replace 'key=value' by '#define key value'.
|
||||
## Replace leading ' y' by ' 1'.
|
||||
@ -168,8 +166,6 @@ define generate-autoconf-file
|
||||
echo "conf: $(call path-from-top,$2) <== $(call path-from-top,$1)"; \
|
||||
mkdir -p $(dir $2); \
|
||||
sed \
|
||||
-e 's/^CONFIG_//' \
|
||||
-e 's/^\# CONFIG_/\# /' \
|
||||
-e 's/^\#\(.*\)/\/*\1 *\//' \
|
||||
-e 's/\(.*\)=\(.*\)/\#define \1 \2/' \
|
||||
-e 's/ y$$/ 1/' \
|
||||
@ -192,7 +188,7 @@ config:
|
||||
$(eval __config := $(CONFIG_GLOBAL_FILE)) \
|
||||
$(call __generate-config,$${__tmpconfigin}) \
|
||||
$(call __begin-conf,$(__config)) \
|
||||
$(call __exec-qconf,$${__tmpconfigin}) \
|
||||
$(call __exec-mconf,$${__tmpconfigin}) \
|
||||
$(call __end-conf,$(__config)) \
|
||||
rm -f $${__tmpconfigin}; \
|
||||
)
|
||||
@ -226,11 +222,6 @@ $(shell mkdir -p $(CONFIG_GLOBAL_FOLDER))
|
||||
# TODO ...
|
||||
-include $(CONFIG_GLOBAL_FILE)
|
||||
|
||||
#automatic generation of the config file when not existed (default case):
|
||||
#.PHONY: $(CONFIG_GLOBAL_FILE)
|
||||
#$(CONFIG_GLOBAL_FILE): config-update
|
||||
# echo "generating basic confing .. please restart"
|
||||
|
||||
$(CONFIG_GLOBAL_FILE):
|
||||
@#$(e rror "need to generate config : make ... config")
|
||||
@$(error "need to generate config : make ... config")
|
||||
|
||||
|
@ -278,7 +278,7 @@ is-module-registered = \
|
||||
## $1 : module to check.
|
||||
###############################################################################
|
||||
is-module-in-build-config = \
|
||||
$(if $(CONFIG_BUILD_$(call get-define,$1)),$(true))
|
||||
$(if $(BUILD_$(call get-define,$1)),$(true))
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
BIN
core/qconf
BIN
core/qconf
Binary file not shown.
BIN
tools/conf
Executable file
BIN
tools/conf
Executable file
Binary file not shown.
BIN
tools/mconf
Executable file
BIN
tools/mconf
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user