make file moved to root dir

This commit is contained in:
tkl 2016-07-29 09:42:06 +02:00
parent f6733ae0d8
commit 153e5f652b
3 changed files with 41 additions and 147 deletions

160
.cproject
View File

@ -66,7 +66,7 @@
<folderInfo id="0.1571827594.511870544." name="/" resourcePath="">
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.541156446" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.eclipse.cdt.build.core.prefbase.toolchain.541156446.585830490" name=""/>
<builder buildPath="${workspace_loc:/engine_control/source}" cleanBuildTarget="APP=test BOARD=stm32f4-discovery clean" id="org.eclipse.cdt.build.core.settings.default.builder.298702710" incrementalBuildTarget="APP=test BOARD=stm32f4-discovery all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
<builder buildPath="${workspace_loc:/engine_control}" cleanBuildTarget="BOARD=stm32f4-discovery clean" id="org.eclipse.cdt.build.core.settings.default.builder.298702710" incrementalBuildTarget="BOARD=stm32f4-discovery all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.232481989" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.562391475" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1491856129" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
@ -110,6 +110,8 @@
<configuration configurationName="Test Stm Debug">
<resource resourceType="PROJECT" workspacePath="/kosmos"/>
</configuration>
<configuration configurationName="Debug"/>
<configuration configurationName="Release"/>
<configuration configurationName="Test msp Debug"/>
<configuration configurationName="ex_rx msp Debug"/>
</storageModule>
@ -128,82 +130,13 @@
<scannerConfigBuildInfo instanceId="0.1571827594.174997613.1900689539.492450098">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="0.1571827594.511870544">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
<buildTargets>
<target name="msp430-ccrf example_radio_rx all" path="software/source/test" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=example_radio_rx BOARD=msp430-ccrf DEBUG=y</buildArguments>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="msp430-ccrf example_radio_rx clean" path="software/source/test" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=example_radio_rx BOARD=msp430-ccrf DEBUG=y</buildArguments>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="msp430-ccrf example_radio_rx install" path="software/source/test" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=example_radio_rx BOARD=msp430-ccrf DEBUG=y</buildArguments>
<buildTarget>install</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="all" path="software/source/test/firmware/kernel/list" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="software/source/test/firmware/kernel/list" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="all" path="software/test/firmware/kernel/list" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="all" path="software/source/test/firmware/kernel/ringbuffer" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="software/source/test/firmware/kernel/ringbuffer" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="distclean" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>distclean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="debug all" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<target name="debug all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>BOARD=stm32f4-discovery DEBUG=y</buildArguments>
<buildTarget>all</buildTarget>
@ -211,15 +144,7 @@
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="debug install" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=test BOARD=stm32f4-discovery DEBUG=y</buildArguments>
<buildTarget>install</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="debug clean" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<target name="debug clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments> APP=test BOARD=stm32f4-discovery DEBUG=y</buildArguments>
<buildTarget>clean</buildTarget>
@ -227,7 +152,23 @@
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="release all" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<target name="debug install" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=test BOARD=stm32f4-discovery DEBUG=y</buildArguments>
<buildTarget>install</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="distclean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>distclean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="release all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments> APP=test BOARD=stm32f4-discovery</buildArguments>
<buildTarget>all</buildTarget>
@ -235,7 +176,7 @@
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="release clean" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<target name="release clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments> APP=test BOARD=stm32f4-discovery</buildArguments>
<buildTarget>clean</buildTarget>
@ -243,7 +184,7 @@
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="release install" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<target name="release install" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=test BOARD=stm32f4-discovery</buildArguments>
<buildTarget>install</buildTarget>
@ -251,53 +192,6 @@
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="distclean" path="software/source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>distclean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="test all" path="software/source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments> APP=test BOARD=stm32f4-discovery DEBUG=y</buildArguments>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="test install" path="software/source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=test BOARD=stm32f4-discovery DEBUG=y</buildArguments>
<buildTarget>install</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="example_semaphore install" path="software/source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=example_semaphore BOARD=stm32f4-discovery DEBUG=y</buildArguments>
<buildTarget>install</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="example_semaphore all" path="software/source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=example_semaphore BOARD=stm32f4-discovery DEBUG=y</buildArguments>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="example_semaphore clean" path="software/source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>APP=example_semaphore BOARD=stm32f4-discovery DEBUG=y</buildArguments>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
</buildTargets>
</storageModule>
</cproject>

View File

@ -2,7 +2,7 @@
#
##############################################################
include ../config/make/rules.mk
include config/make/rules.mk
MAINFILE = $(EXE_DIR)/$(APP)$(ELF_EXT)
BINFILE = $(EXE_DIR)/$(APP)$(BIN_EXT)
@ -16,16 +16,16 @@ CHECK_FOLDER :=
SOURCES := $(wildcard $(SRC_DIR)/*.c)
ASM_SOURCES := $(wildcard $(SRC_DIR)/*.s)
OBJECTS = $(SOURCES:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
ASM_OBJECTS = $(ASMSOURCES:$(SRC_DIR)/%.s=$(OBJ_DIR)/%.o)
DEPS = $(SOURCES:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.d)
OBJECTS = $(SOURCES:$(ROOT_DIR)/%.c=$(OBJ_DIR)/%.o)
ASM_OBJECTS = $(ASMSOURCES:$(ROOT_DIR)/%.s=$(OBJ_DIR)/%.o)
DEPS = $(SOURCES:$(ROOT_DIR)/%.c=$(OBJ_DIR)/%.d)
#include subfolders
include application/application.mk
include source/application/application.mk
SOURCES += $(foreach folder, $(SUB_FOLDER), $(wildcard $(SRC_DIR)/$(folder)/*.c))
CHECKSOURCES += $(foreach folder, $(CHECK_FOLDER), $(wildcard $(SRC_DIR)/$(folder)/*.c))
ASMSOURCES += $(foreach folder, $(SUB_FOLDER), $(wildcard $(SRC_DIR)/$(folder)/*.s))
SOURCES += $(foreach folder, $(SUB_FOLDER), $(wildcard $(ROOT_DIR)/$(folder)/*.c))
CHECKSOURCES += $(foreach folder, $(CHECK_FOLDER), $(wildcard $(ROOT_DIR)/$(folder)/*.c))
ASMSOURCES += $(foreach folder, $(SUB_FOLDER), $(wildcard $(ROOT_DIR)/$(folder)/*.s))
all: check $(MAINFILE)
@ -45,13 +45,13 @@ $(MAINFILE): $(OBJECTS) $(ASM_OBJECTS)
@$(SIZE) --format=berkeley -x $(MAINFILE)
@echo
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
$(OBJ_DIR)/%.o: $(ROOT_DIR)/%.c
@$(MKDIR) $(OBJ_DIR)
@$(foreach folder, $(SUB_FOLDER), $(shell mkdir -p $(OBJ_DIR)/$(folder)))
$(call makedep,$<,$@,$(subst .o,.d,$@))
$(CC) $(CFLAGS) -c $< -o $@
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.s
$(OBJ_DIR)/%.o: $(ROOT_DIR)/%.s
@$(MKDIR) $(OBJ_DIR)
@$(foreach folder, $(SUB_FOLDER), $(shell mkdir -p $(OBJ_DIR)/$(folder)))
$(CC) $(CFLAGS) -c $< -o $@

View File

@ -1,4 +1,4 @@
CHECK_FOLDER += application
SUB_FOLDER += application
INCLUDES += application
DOC_SRC += application
CHECK_FOLDER += source/application
SUB_FOLDER += source/application
INCLUDES += source/application
DOC_SRC += source/application