From 16493e37f53de5f0950ed8feb38d0c3a1ef70656 Mon Sep 17 00:00:00 2001 From: "ho.namkoong" Date: Thu, 6 Dec 2012 20:46:20 +0900 Subject: [PATCH] [Title] Add makefile template in CLI [Type] [Module] [Priority] [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] Change-Id: I60ff51c3ad25c3ea1f769094d2d6f43e59c008c3 --- package/addingFiles/template/makefile/build_data | 9 ++ .../template/makefile/makefile_app_template | 110 +++++++++++++++++++++ .../template/makefile/makefile_shared_template | 106 ++++++++++++++++++++ .../template/makefile/makefile_static_template | 106 ++++++++++++++++++++ 4 files changed, 331 insertions(+) create mode 100644 package/addingFiles/template/makefile/build_data create mode 100644 package/addingFiles/template/makefile/makefile_app_template create mode 100644 package/addingFiles/template/makefile/makefile_shared_template create mode 100644 package/addingFiles/template/makefile/makefile_static_template diff --git a/package/addingFiles/template/makefile/build_data b/package/addingFiles/template/makefile/build_data new file mode 100644 index 0000000..8998440 --- /dev/null +++ b/package/addingFiles/template/makefile/build_data @@ -0,0 +1,9 @@ +target:emulator:$(emulTarget) +target:device:$(devTarget) +target:emulator:includepath:$(emulInc) +target:device:includepath:$(devInc) +target:emulator:cflags:$(emulCf) +target:device:cflags:$(devCf) +target:emulator:lflags:$(emulLf) +target:device:lflags:$(devLf) + diff --git a/package/addingFiles/template/makefile/makefile_app_template b/package/addingFiles/template/makefile/makefile_app_template new file mode 100644 index 0000000..b530223 --- /dev/null +++ b/package/addingFiles/template/makefile/makefile_app_template @@ -0,0 +1,110 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +-include ../makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +# -include sources.mk +O_SRCS := +PO_SRCS := +CPP_SRCS := +C_UPPER_SRCS := +C_SRCS := +S_UPPER_SRCS := +OBJ_SRCS := +EDC_SRCS := +ASM_SRCS := +CXX_SRCS := +C++_SRCS := +CC_SRCS := +MO_FILES := +OBJS := +C++_DEPS := +C_DEPS := +CC_DEPS := +EDJ_FILES := +CPP_DEPS := +EXECUTABLES := +C_UPPER_DEPS := +CXX_DEPS := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +src \ + +# -include src/subdir.mk +# Add inputs and outputs from these tool invocations to the build variables +CPP_SRCS += \ +$(CLI_SRC) + +OBJS += \ +$(CLI_OBJ) + +CPP_DEPS += \ +$(CLI_DEPS) + +# Each subdirectory must supply rules for building sources it contributes +src/%.o: ../src/%.cpp + @echo 'Building file: $<' + @echo 'Invoking: C++ Compiler' + $(CC) -I"pch" -D_DEBUG -O0 -g3 -Wall -c -fmessage-length=0 $(INCLUDE_PATH) $(CFLAG) -D_APP_LOG -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + +# -include objects.mk +USER_OBJS := + +LIBS := + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(C++_DEPS)),) +-include $(C++_DEPS) +endif +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +ifneq ($(strip $(CC_DEPS)),) +-include $(CC_DEPS) +endif +ifneq ($(strip $(CPP_DEPS)),) +-include $(CPP_DEPS) +endif +ifneq ($(strip $(CXX_DEPS)),) +-include $(CXX_DEPS) +endif +ifneq ($(strip $(C_UPPER_DEPS)),) +-include $(C_UPPER_DEPS) +endif +endif + +-include ../makefile.defs + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: $(CLI_BINARY) secondary-outputs + +# Tool invocations +$(CLI_BINARY): $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: C++ Linker' + $(CC) -o"$(CLI_BINARY)" $(OBJS) $(USER_OBJS) $(LIBS) $(LFLAG) + @echo 'Finished building target: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) $(MO_FILES)$(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(EDJ_FILES)$(CPP_DEPS)$(EXECUTABLES)$(C_UPPER_DEPS)$(CXX_DEPS) $(CLI_BINARY) + -@echo ' ' + +secondary-outputs: $(MO_FILES) $(EDJ_FILES) + +.PHONY: all clean dependents +.SECONDARY: + +-include ../makefile.targets + diff --git a/package/addingFiles/template/makefile/makefile_shared_template b/package/addingFiles/template/makefile/makefile_shared_template new file mode 100644 index 0000000..4bd5c36 --- /dev/null +++ b/package/addingFiles/template/makefile/makefile_shared_template @@ -0,0 +1,106 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +-include ../makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +# -include sources.mk +O_SRCS := +CPP_SRCS := +C_UPPER_SRCS := +C_SRCS := +S_UPPER_SRCS := +OBJ_SRCS := +ASM_SRCS := +CXX_SRCS := +C++_SRCS := +CC_SRCS := +OBJS := +C++_DEPS := +C_DEPS := +CC_DEPS := +LIBRARIES := +CPP_DEPS := +C_UPPER_DEPS := +CXX_DEPS := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +src \ + +# -include src/subdir.mk +# Add inputs and outputs from these tool invocations to the build variables +CPP_SRCS += \ +$(CLI_SRC) + +OBJS += \ +$(CLI_OBJ) + +CPP_DEPS += \ +$(CLI_DEPS) + + +# Each subdirectory must supply rules for building sources it contributes +src/%.o: ../src/%.cpp + @echo 'Building file: $<' + @echo 'Invoking: C++ Compiler' + $(CC) -I"pch" -D_DEBUG -O0 -g3 -Wall -c -fmessage-length=0 $(INCLUDE_PATH) $(CFLAG) -D_APP_LOG -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + +# -include objects.mk +USER_OBJS := + +LIBS := + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(C++_DEPS)),) +-include $(C++_DEPS) +endif +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +ifneq ($(strip $(CC_DEPS)),) +-include $(CC_DEPS) +endif +ifneq ($(strip $(CPP_DEPS)),) +-include $(CPP_DEPS) +endif +ifneq ($(strip $(CXX_DEPS)),) +-include $(CXX_DEPS) +endif +ifneq ($(strip $(C_UPPER_DEPS)),) +-include $(C_UPPER_DEPS) +endif +endif + +-include ../makefile.defs + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: $(CLI_BINARY) secondary-outputs + +# Tool invocations +$(CLI_BINARY): $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: C++ Linker' + $(CC) -o"$(CLI_BINARY)" $(OBJS) $(USER_OBJS) $(LIBS) $(LFLAG) + @echo 'Finished building target: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(LIBRARIES)$(CPP_DEPS)$(C_UPPER_DEPS)$(CXX_DEPS) $(CLI_BINARY) + -@echo ' ' + +secondary-outputs: + +.PHONY: all clean dependents +.SECONDARY: + +-include ../makefile.targets diff --git a/package/addingFiles/template/makefile/makefile_static_template b/package/addingFiles/template/makefile/makefile_static_template new file mode 100644 index 0000000..6834036 --- /dev/null +++ b/package/addingFiles/template/makefile/makefile_static_template @@ -0,0 +1,106 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +-include ../makefile.init + +RM := rm -f + +# All of the sources participating in the build are defined here +# -include sources.mk +O_SRCS := +CPP_SRCS := +C_UPPER_SRCS := +C_SRCS := +S_UPPER_SRCS := +OBJ_SRCS := +ASM_SRCS := +CXX_SRCS := +C++_SRCS := +CC_SRCS := +OBJS := +C++_DEPS := +C_DEPS := +CC_DEPS := +ARCHIVES := +CPP_DEPS := +C_UPPER_DEPS := +CXX_DEPS := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +src \ + +# -include src/subdir.mk +# Add inputs and outputs from these tool invocations to the build variables +CPP_SRCS += \ +$(CLI_SRC) + +OBJS += \ +$(CLI_OBJ) + +CPP_DEPS += \ +$(CLI_DEPS) + + +# Each subdirectory must supply rules for building sources it contributes +src/%.o: ../src/%.cpp + @echo 'Building file: $<' + @echo 'Invoking: C++ Compiler' + $(CC) -I"pch" -D_DEBUG $(INCLUDE_PATH) -O0 -g3 -Wall -c -fmessage-length=0 $(CFLAG) -D_APP_LOG -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + + +# -include objects.mk +USER_OBJS := + +LIBS := + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(C++_DEPS)),) +-include $(C++_DEPS) +endif +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +ifneq ($(strip $(CC_DEPS)),) +-include $(CC_DEPS) +endif +ifneq ($(strip $(CPP_DEPS)),) +-include $(CPP_DEPS) +endif +ifneq ($(strip $(CXX_DEPS)),) +-include $(CXX_DEPS) +endif +ifneq ($(strip $(C_UPPER_DEPS)),) +-include $(C_UPPER_DEPS) +endif +endif + +-include ../makefile.defs + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: $(CLI_BINARY) secondary-outputs + +# Tool invocations +$(CLI_BINARY): $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: Archiver' + ar -r "$(CLI_BINARY)" $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(ARCHIVES)$(CPP_DEPS)$(C_UPPER_DEPS)$(CXX_DEPS) $(CLI_BINARY) + -@echo ' ' + +secondary-outputs: + +.PHONY: all clean dependents +.SECONDARY: + +-include ../makefile.targets -- 2.7.4