Path: blob/master/stream/ipro-adam-app/Makefile
643 views
### Makefile for AdamApp ### Please write Makefile using this format ifndef ADAMAPP_TOP_DIR ADAMAPP_TOP_DIR = .. endif ### Include common settings of each directory ### ADAM 各ディレクトリ共通設定をここでinclude ifeq ($(findstring ambaCV5XC,$(TARGET_FOR_ADAM)), ambaCV5XC) include $(PF_BASEDIR)/build_config/adamapp_setting_python.mk include $(PF_BASEDIR)/build_config/adam_version_setting.mk else include $(ADAMAPP_TOP_DIR)/adamapp_setting.mk include $(ADAMAPP_TOP_DIR)/adam_version_setting.mk endif # PROG_NAME: Name of program file that is generated by this Makefile. # 作成されるプログラムの名前です。 # # Name of program file is determined according to the PROG_TYPE. # PROG_TYPEによって、本変数の使われ方が異なります。 # # PROG_TYPE # exec Value of PROG_NAME is the same as execution file name. # 実行ファイル名になります # lib Value of PROG_NAME is expanded to "lib(PROG_NAME).a" and static library file is generated with that name. # lib(PROG_NAME).a という静的ライブラリが作成されます # solib Value of PROG_NAME is expanded to "lib(PROG_NAME).so " and shared library file is generated with that name. # lib(PROG_NAME).so という共有(動的)ライブラリが作成されます # none Value of PROG_NAME isn't used. (When PROG_TYPE is "none", program isn't generated.) # この変数は使用されません(何が定義されていても無視されます) PROG_NAME= $(shell grep -E "^APPLICATION" configuration.txt | sed -e 's/^APPLICATION\s*//') # PROG_TYPE: Type of program (file) that is generated by this Makefile. # このMakefileでどんなプログラムを作成するのかを定義します。 # # Linker options or type of binary file generated is determined by the value of PROG_TYPE. # この定義によって、リンカの挙動や作成されたバイナリのインストール先が変化します。 # # PROG_TYPE # exec Executable file is generated (C program). # 実行ファイルを作成します。 # In this type, C++ library(libstdc++ etc.) is NOT linked in standard. # (because of using C complier while linking.) # $(CC)を使用してリンクを行うため、C++ライブラリは標準ではリンクされません。 # execcxx Executable file is generated (C++ program). # 実行ファイルを作成します。 # In this type, C++ library(libstdc++ etc.) is linked in standard. # $(CXX)を使用してリンクを行うため、C++ライブラリが標準でリンクされます。 # lib Static library file (lib*.a) is generated. # 静的ライブラリ(lib*.a)を作成します。 # (Library file is generated using $(AR)) # $(AR)を使用してライブラリを作成します。 # solib Dynamic library file (lib*.so) is generated. # 共有(動的)ライブラリ(lib*.so)を作成します。 # ("$(CC) -shared" is used to make library file) # $(CC) -shared を使用してライブラリを作成します。 # none Binary file is NOT generated. # このMakefileではバイナリを作成しません。 # MUST use this type, when you compile sub directories # サブディレクトリのコンパイルを行うときに使用します。 PROG_TYPE= execcxx # PROG_SUBDIRS: Directories to execute 'make' recursively. # この変数にディレクトリ名を設定すると、設定されたディレクトリに対して # 再帰的にmakeが実行されます。 # # When setting more than one directory, separate these directory names by space. # 複数のディレクトリを指定する場合は、半角スペースで区切ってください。 # # [Attention!!] # [注意!!] # If you set a value to this variable, you MUST set 'none' to PROG_TYPE. # この変数に値を設定する場合は、PROG_TYPEを'none'にしてください。 PROG_SUBDIRS= # BUILD_DIR: Directory to generate object files. # ソースファイルがコンパイルされ、オブジェクトファイルが生成される場所です。 # # You have to set directory name using relative path (to Makefile location). # ディレクトリ名の指定は、Makefileがある場所からの相対パスで指定してください。 # # When executing 'make', an object file is created in the directory. A new directory # is automatically created in case the directory didn't exist earlier. # この変数に値を設定した場合、コンパイル時に設定された値のディレクトリが # 生成され、その中にオブジェクトファイルや各種バイナリが作成されます。 # # If this variable is undefined, object files are created in same directory as the Makefile. # この変数が未定義、もしくは空の場合は、Makefileと同一ディレクトリに作成されます。 BUILD_DIR= $(C_CXX_SRC_DIR)/$(ADAM_OBJ_DIR) # SRC_FILES: Source files to be compiled. # コンパイルするソースファイルを定義します。 # # In this variable, set c files(.c), C++ files(.cpp), or assembler files(.s). # この変数には、Cファイル(.c) C++ファイル(.cpp) アセンブラファイル(.s)を指定できます # # When setting more than one file, separate the definition by a space. # 複数のファイルを指定する場合は、半角スペースで区切って指定してください。 # # If you want to specify a file existing in other directory, # specify relative path of the file from this Makefile. # 相対パスをつけたファイル名を指定することで、Makefileとは別のディレクトリに # あるソースファイルをコンパイルすることが可能です。 SRC_FILES= $(C_CXX_SRC_DIR)/main.cpp # PROG_PUBLIC_HEADERS: Define public header files which are used by other programs for compiling. # コンパイル後、他のプログラムコンパイル時に必要なヘッダファイルの # インストールが必要な場合に、ヘッダファイル名を定義します。 # # In making AdamApp, this variable does NOT need to be specified basically. # AdamAppのmakeでは、この変数は基本的に指定する必要はありません。 # # Header files are installed in $(INSTALL_INC_DIR). # ヘッダファイルは、$(INSTALL_INC_DIR)へインストールされます。 # # (Default value is $(PF_BASEDIR)/root/usr/include) # (デフォルトでは、$(PF_BASEDIR)/root/usr/includeです) # # If you want to specify a file existing in other directory, # specify relative path of the file from this Makefile. # 相対パスをつけたファイル名を指定することで、Makefileとは別のディレクトリに # あるヘッダファイルをインストールすることが可能です。 PROG_PUBLIC_HEADERS= # PROG_PUBLIC_CONFIGFILES: Configuration files that a program refers to when starting. # プログラム動作時に必要なコンフィグファイルがあれば、この変数に設定します。 # # Configuration files are installed in $(INSTALL_CONFIG_DIR). # 設定ファイルは、$(INSTALL_CONFIG_DIR)へインストールされます。 # # (Default value is $(PF_BASEDIR)/root/etc) # (デフォルトでは、$(PF_BASEDIR)/root/etcです) # # If you want to specify a file existing in other directory, # specify relative path of the file from this Makefile. # 相対パスをつけたファイル名を指定することで、Makefileとは別のディレクトリに # ある設定ファイルをインストールすることが可能です。 # PROG_PUBLIC_CONFIGFILES= # ADD_LIB_PATH: Path of library files that needs to be linked when generating an object file. # コンパイル時に使用するライブラリのパスを設定します。 # # This variable needs to be specified as relative path name. # パスは相対パスで記載してください。 # # And when setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # This variable is added in LDFLAGS variable, after prefixing "-L" to each value of the variable while compile(link). # コンパイル(リンク)時に、本変数に設定されている各値の先頭に # "-L"をつけた上でLDFLAGSに設定されます。 # # Example) If this value is ". ../libs", it is expanded to "-L. -L../libs". # 例) ". ../libs"と設定していた場合は、"-L. -L../libs"と展開されます。 # ADD_LIB_PATH=$(ADAM_ADD_LIB_PATH) ADD_LIB_PATH+= # ADD_LIBS: Short name of library files that needs to be linked when generating an object file. # コンパイル時に使用するライブラリの名前を設定します。 # (if you want to set -lxxx, please set "xxx") # # In this variable, you need to specify a library file name without the prefix "lib" and without # any file extension(".so" or ".a") # この変数には、リンクしたいライブラリファイルの名前から # パス名や先頭の"lib"、拡張子の".so"".a"を除いた名前を指定してください。 # # And when setting more than one library name, separate those library names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # Example: If you want to link "libcommon.a", set "common" in this variable. # 例: "libcommon.a"をリンクしたい場合は、"common"を指定してください。 # # This variable is added in LDFLAGS variable, after prefixing "-l" to each value of variable. # コンパイル(リンク)時に、本変数に設定されている各値の先頭に # "-l"をつけた上でLDFLAGSに設定されます。 # # Example) If this value is "common FW", it is expanded to "-lcommon -lFW". # 例) "common FW"と設定していた場合は、"-lcommon -lFW"と展開されます。 # ADD_LIBS=$(ADAM_ADD_LIBS) ADD_LIBS+= # ADD_INCLUDE_PATH: Path of header files that needs to be referred when compiling. # コンパイル時に使用するインクルードファイルのパスを設定します。 # (if you want to set -Ixxx, please set "xxx") # # This variable needs to be specified as relative path name. # パスは相対パスで記載してください。 # # And when setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # This variable is added in CPPFLAGS variable, after prefixing "-I" to each value of variable. # コンパイル時に、本変数に設定されている各値の先頭に、"-I"をつけた上でCPPFLAGSに設定されます。 # (This variable is applied in C and C++.) # (C/C++のどちらのコンパイル時にも定義されるフラグです) # # Example: If this value is ". ../include", it is expanded to "-I. -I../include". # 例: ". ../include"と設定していた場合は、"-I. -I../include"と展開されます。 # ADD_INCLUDE_PATH=$(ADAM_ADD_INCLUDE_PATH) ADD_INCLUDE_PATH+= # ADD_DEFINES: Macro names to predefine when compiling. # コンパイラの引数として追加する定義を指定します。 # (-Dxxx の"xxx"の部分です) # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # This variable is added in CPPFLAGS variable, after prefixing "-D" to each value of variable. # コンパイル時に、本変数に設定されている各値の先頭に"-D"をつけた上でCPPFLAGSに設定されます。 # # (This variable is applied in C and C++.) # (C/C++のどちらのコンパイル時にも定義されるフラグです) # # Example: If variable value is "__owl__ __DEBUG", it is expanded to "-D__owl__ -D__DEBUG". # 例: "__owl__ __DEBUG"と設定していた場合は、"-D__owl__ -D__DEBUG"と展開されます。 ADD_DEFINES= # PROG_CPPFLAGS: Flags to specify when preprocessing. # プリプロセッサ実行時に引数へ追加されるフラグです。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # These values of variable are passed to the preprocessor as it is. # ("-I" etc. are necessary along with the include path) # このフラグに値が指定された場合、そのまま追加されます。 # (インクルードパス等も、パス名だけではなく"-I"等が必要です) # # This variable is applied in C and C++. # このフラグの値は、C/C++のどちらのコンパイル時にも適用されます。 # PROG_CPPFLAGS= $(ADAM_DFLAGS) PROG_CPPFLAGS+= -std=c++11 # PROG_CFLAGS: Options to specify when compiling in C. # Cコンパイラ実行時に引数へ追加されるフラグです。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # These values of variable are passed to the C compiler as it is. # このフラグに値が指定された場合、そのまま追加されます。 # (インクルードパス等も、パス名だけではなく"-I"等が必要です) # # This variable is applied in C, but isn't applied in C++. # このフラグの値は、C++コンパイル時は適用されません。 # PROG_CFLAGS= $(ADAM_CFLAGS) PROG_CFLAGS+= # PROG_CXXFLAGS: Options to specify when compiling in C++. # C++コンパイラ実行時に引数へ追加されるフラグです。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # These values of variable are passed to the C++ compiler as it is. # このフラグに値が指定された場合、そのまま追加されます。 # (インクルードパス等も、パス名だけではなく"-I"等が必要です)M # # This variable is applied in C++, but isn't applied in C. # このフラグの値は、Cコンパイル時は適用されません。 # # If use RTTI function of C++ in AdamApp, comment out PROG_CXXFLAGS+= -fno-rtti # もし、AdamAppの中でC++のRTTI機能を使う場合には、PROG_CXXFLAGS+= -fno-rtti をコメ # ントアウトしてください # PROG_CXXFLAGS= $(ADAM_CXXFLAGS) PROG_CXXFLAGS+= -fno-rtti PROG_CXXFLAGS+= -std=c++11 # PROG_ASFLAGS: Options to specify when assembling. # アセンブル時に引数へ追加されるフラグです。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # These values of variable are passed to the assembler as it is. # このフラグに値が指定された場合、そのまま追加されます。 # (インクルードパス等も、パス名だけではなく"-I"等が必要です) # # This variable isn't applied in C and C++. # このフラグの値は、C/C++コンパイル時は適用されません。 PROG_ASFLAGS= # PROG_LDFLAGS: Options to specify when linking. # バイナリリンク時に引数へ追加されるフラグです。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # These values of variable are passed to the linker as it is. # このフラグに値が指定された場合、そのまま追加されます。 # (ライブラリパス等も、パス名だけではなく"-L"等が必要です) PROG_LDFLAGS= $(ADAM_PROG_LDFLAGS) PROG_LDFLAGS+= # The following is to include common settings. # Don't change it! # # baseの設定ファイルを読み込みます。 # 変更しないでください。 include $(PF_BASEDIR)/build_config/config.mk # TARGET_CLEAN: Targets that is additionally executed when you execute "make clean". # "make clean"実行時に追加実行されるターゲットを指定します。 # # By "make clean", object files and binary files are removed. # If you additionally want to delete other files too, then # add those processes. # "make clean"実行時には、オブジェクトファイルおよび作成されたバイナリファイルは削除 # されますが、それ以外のファイルを削除する場合や、その他必要な処理を追加してください。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # [Attention!!] # [注意!!] # Targets that are specified in this variable must be separately defined. # ここで指定するターゲットは、別途定義が必要です。 TARGET_CLEAN+=clean_package # TARGET_DEPS: Targets that are additionally executed immediately before compiling # when you execute "make all" or "make build". # "make all""make build"実行時で、ソースファイルがコンパイルされる前に # 追加実行されるターゲットを指定します。 # # Targets that specified in this variable are executed before compiling the source file. # ここで指定したターゲットは、ソースファイルがコンパイルされる前に実行されます。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # [Attention!!] # [注意!!] # Targets that are specified in this variable must be separately defined. # ここで指定するターゲットは、別途定義が必要です。 TARGET_DEPS+= # TARGET_BUILD: Targets that are additionally executed immediately after linking or making library # when you execute "make all" or "make build". # "make all""make build"実行時で、バイナリファイルが作成された後 # (リンクまで終了した後)追加実行されるターゲットを指定します。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # [Attention!!] # [注意!!] # Targets that are specified in this variable must be separately defined. # ここで指定するターゲットは、別途定義が必要です。 TARGET_BUILD+=make_package # TARGET_INSTALL: Targets that are additionally executed immediately before installing # when you execute "make install". # "make install"実行時、バイナリファイルがインストールされる前に # 実行されるターゲットを指定します。 # # In making AdamApp, this variable does NOT needs to specified basically. # AdamAppのmakeでは、この変数は基本的に指定する必要はありません。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # [Attention!!] # [注意!!] # Targets that are specified in this variable must be separately defined. # ここで指定するターゲットは、別途定義が必要です。 TARGET_INSTALL+= # TARGET_UNINSTALL: Targets that are additionally executed immediately before uninstalling. # "make uninstall"実行時、バイナリファイルがアンインストールされる前に # 実行されるターゲットを指定します。 # # In making AdamApp, this variable does NOT needs to be specified basically. # AdamAppのmakeでは、この変数は基本的に指定する必要はありません。 # # When setting more than one path name, separate those path names by a space. # 複数指定する場合は、半角スペースで区切ってください。 # # [Attention!!] # [注意!!] # Targets that are specified in this variable must be separately defined. # ここで指定するターゲットは、別途定義が必要です。 TARGET_UNINSTALL+= # The following is to include common settings. # Don't change it! # # systemの設定ファイルを読み込みます。 # 変更しないでください。 include $(SYSTEM_RULES_FILE) ifeq ($(findstring ambaCV5XC,$(TARGET_FOR_ADAM)), ambaCV5XC) include $(PF_BASEDIR)/build_config/adam_make_package_python.mk else include $(ADAMAPP_TOP_DIR)/adam_make_package.mk endif