makefile moved to root folder
This commit is contained in:
parent
9f845eb691
commit
ff8edf8c51
78
.cproject
78
.cproject
@ -197,7 +197,39 @@
|
|||||||
<useDefaultCommand>false</useDefaultCommand>
|
<useDefaultCommand>false</useDefaultCommand>
|
||||||
<runAllBuilders>true</runAllBuilders>
|
<runAllBuilders>true</runAllBuilders>
|
||||||
</target>
|
</target>
|
||||||
<target name="distclean" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
<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="debug all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
<buildCommand>make</buildCommand>
|
||||||
|
<buildArguments>BOARD=stm32f4-discovery DEBUG=y</buildArguments>
|
||||||
|
<buildTarget>all</buildTarget>
|
||||||
|
<stopOnError>true</stopOnError>
|
||||||
|
<useDefaultCommand>false</useDefaultCommand>
|
||||||
|
<runAllBuilders>true</runAllBuilders>
|
||||||
|
</target>
|
||||||
|
<target name="debug clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
<buildCommand>make</buildCommand>
|
||||||
|
<buildArguments> BOARD=stm32f4-discovery DEBUG=y</buildArguments>
|
||||||
|
<buildTarget>clean</buildTarget>
|
||||||
|
<stopOnError>true</stopOnError>
|
||||||
|
<useDefaultCommand>false</useDefaultCommand>
|
||||||
|
<runAllBuilders>true</runAllBuilders>
|
||||||
|
</target>
|
||||||
|
<target name="debug deploy" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
<buildCommand>make</buildCommand>
|
||||||
|
<buildArguments> BOARD=stm32f4-discovery DEBUG=y</buildArguments>
|
||||||
|
<buildTarget>deploy</buildTarget>
|
||||||
|
<stopOnError>true</stopOnError>
|
||||||
|
<useDefaultCommand>false</useDefaultCommand>
|
||||||
|
<runAllBuilders>true</runAllBuilders>
|
||||||
|
</target>
|
||||||
|
<target name="distclean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
<buildCommand>make</buildCommand>
|
<buildCommand>make</buildCommand>
|
||||||
<buildArguments/>
|
<buildArguments/>
|
||||||
<buildTarget>distclean</buildTarget>
|
<buildTarget>distclean</buildTarget>
|
||||||
@ -205,31 +237,7 @@
|
|||||||
<useDefaultCommand>false</useDefaultCommand>
|
<useDefaultCommand>false</useDefaultCommand>
|
||||||
<runAllBuilders>true</runAllBuilders>
|
<runAllBuilders>true</runAllBuilders>
|
||||||
</target>
|
</target>
|
||||||
<target name="debug all" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
<target name="release all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
<buildCommand>make</buildCommand>
|
|
||||||
<buildArguments>BOARD=stm32f4-discovery DEBUG=y</buildArguments>
|
|
||||||
<buildTarget>all</buildTarget>
|
|
||||||
<stopOnError>true</stopOnError>
|
|
||||||
<useDefaultCommand>false</useDefaultCommand>
|
|
||||||
<runAllBuilders>true</runAllBuilders>
|
|
||||||
</target>
|
|
||||||
<target name="debug clean" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
|
||||||
<buildCommand>make</buildCommand>
|
|
||||||
<buildArguments> BOARD=stm32f4-discovery DEBUG=y</buildArguments>
|
|
||||||
<buildTarget>clean</buildTarget>
|
|
||||||
<stopOnError>true</stopOnError>
|
|
||||||
<useDefaultCommand>false</useDefaultCommand>
|
|
||||||
<runAllBuilders>true</runAllBuilders>
|
|
||||||
</target>
|
|
||||||
<target name="debug deploy" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
|
||||||
<buildCommand>make</buildCommand>
|
|
||||||
<buildArguments> BOARD=stm32f4-discovery DEBUG=y</buildArguments>
|
|
||||||
<buildTarget>deploy</buildTarget>
|
|
||||||
<stopOnError>true</stopOnError>
|
|
||||||
<useDefaultCommand>false</useDefaultCommand>
|
|
||||||
<runAllBuilders>true</runAllBuilders>
|
|
||||||
</target>
|
|
||||||
<target name="release all" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
|
||||||
<buildCommand>make</buildCommand>
|
<buildCommand>make</buildCommand>
|
||||||
<buildArguments>BOARD=stm32f4-discovery</buildArguments>
|
<buildArguments>BOARD=stm32f4-discovery</buildArguments>
|
||||||
<buildTarget>all</buildTarget>
|
<buildTarget>all</buildTarget>
|
||||||
@ -237,15 +245,7 @@
|
|||||||
<useDefaultCommand>false</useDefaultCommand>
|
<useDefaultCommand>false</useDefaultCommand>
|
||||||
<runAllBuilders>true</runAllBuilders>
|
<runAllBuilders>true</runAllBuilders>
|
||||||
</target>
|
</target>
|
||||||
<target name="release deploy" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
<target name="release clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
<buildCommand>make</buildCommand>
|
|
||||||
<buildArguments> BOARD=stm32f4-discovery</buildArguments>
|
|
||||||
<buildTarget>deploy</buildTarget>
|
|
||||||
<stopOnError>true</stopOnError>
|
|
||||||
<useDefaultCommand>false</useDefaultCommand>
|
|
||||||
<runAllBuilders>true</runAllBuilders>
|
|
||||||
</target>
|
|
||||||
<target name="release clean" path="source" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
|
||||||
<buildCommand>make</buildCommand>
|
<buildCommand>make</buildCommand>
|
||||||
<buildArguments> BOARD=stm32f4-discovery</buildArguments>
|
<buildArguments> BOARD=stm32f4-discovery</buildArguments>
|
||||||
<buildTarget>clean</buildTarget>
|
<buildTarget>clean</buildTarget>
|
||||||
@ -253,12 +253,12 @@
|
|||||||
<useDefaultCommand>false</useDefaultCommand>
|
<useDefaultCommand>false</useDefaultCommand>
|
||||||
<runAllBuilders>true</runAllBuilders>
|
<runAllBuilders>true</runAllBuilders>
|
||||||
</target>
|
</target>
|
||||||
<target name="all" path="software/test/firmware/kernel/list" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
<target name="release deploy" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
<buildCommand>make</buildCommand>
|
<buildCommand>make</buildCommand>
|
||||||
<buildArguments/>
|
<buildArguments> BOARD=stm32f4-discovery</buildArguments>
|
||||||
<buildTarget>all</buildTarget>
|
<buildTarget>deploy</buildTarget>
|
||||||
<stopOnError>true</stopOnError>
|
<stopOnError>true</stopOnError>
|
||||||
<useDefaultCommand>true</useDefaultCommand>
|
<useDefaultCommand>false</useDefaultCommand>
|
||||||
<runAllBuilders>true</runAllBuilders>
|
<runAllBuilders>true</runAllBuilders>
|
||||||
</target>
|
</target>
|
||||||
<target name="msp430-ccrf example_radio_rx all" path="software/source/test" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
<target name="msp430-ccrf example_radio_rx all" path="software/source/test" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
@ -22,7 +22,6 @@ stages:
|
|||||||
|
|
||||||
build_job:
|
build_job:
|
||||||
script:
|
script:
|
||||||
- "cd source"
|
|
||||||
- "make all BOARD=stm32f4-discovery"
|
- "make all BOARD=stm32f4-discovery"
|
||||||
stage: build
|
stage: build
|
||||||
except:
|
except:
|
||||||
@ -30,19 +29,16 @@ build_job:
|
|||||||
|
|
||||||
check_job:
|
check_job:
|
||||||
script:
|
script:
|
||||||
- "cd source"
|
|
||||||
- "make check BOARD=stm32f4-discovery"
|
- "make check BOARD=stm32f4-discovery"
|
||||||
stage: check
|
stage: check
|
||||||
|
|
||||||
#deploy_job:
|
#deploy_job:
|
||||||
# script:
|
# script:
|
||||||
# - "cd source"
|
|
||||||
# - "make deploy BOARD=stm32f4-discovery"
|
# - "make deploy BOARD=stm32f4-discovery"
|
||||||
# stage: deploy
|
# stage: deploy
|
||||||
|
|
||||||
#test_job:
|
#test_job:
|
||||||
# script:
|
# script:
|
||||||
# - "cd source"
|
|
||||||
# - "make install APP=test BOARD=stm32f4-discovery"
|
# - "make install APP=test BOARD=stm32f4-discovery"
|
||||||
# stage: test
|
# stage: test
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
include ../config/make/rules.mk
|
include config/make/rules.mk
|
||||||
|
|
||||||
OS_NAME = kosmos
|
OS_NAME = kosmos
|
||||||
|
|
||||||
@ -15,16 +15,16 @@ CHECK_FOLDER :=
|
|||||||
SOURCES := $(wildcard $(SRC_DIR)/*.c)
|
SOURCES := $(wildcard $(SRC_DIR)/*.c)
|
||||||
ASM_SOURCES := $(wildcard $(SRC_DIR)/*.s)
|
ASM_SOURCES := $(wildcard $(SRC_DIR)/*.s)
|
||||||
|
|
||||||
OBJECTS = $(SOURCES:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
|
OBJECTS = $(SOURCES:$(ROOT_DIR)/%.c=$(OBJ_DIR)/%.o)
|
||||||
ASM_OBJECTS = $(ASMSOURCES:$(SRC_DIR)/%.s=$(OBJ_DIR)/%.o)
|
ASM_OBJECTS = $(ASMSOURCES:$(ROOT_DIR)/%.s=$(OBJ_DIR)/%.o)
|
||||||
DEPS = $(SOURCES:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.d)
|
DEPS = $(SOURCES:$(ROOT_DIR)/%.c=$(OBJ_DIR)/%.d)
|
||||||
|
|
||||||
#include subfolders
|
#include subfolders
|
||||||
include firmware/firmware.mk
|
include source/firmware/firmware.mk
|
||||||
|
|
||||||
SOURCES += $(foreach folder, $(SUB_FOLDER), $(wildcard $(SRC_DIR)/$(folder)/*.c))
|
SOURCES += $(foreach folder, $(SUB_FOLDER), $(wildcard $(ROOT_DIR)/$(folder)/*.c))
|
||||||
CHECKSOURCES += $(foreach folder, $(CHECK_FOLDER), $(wildcard $(SRC_DIR)/$(folder)/*.c))
|
CHECKSOURCES += $(foreach folder, $(CHECK_FOLDER), $(wildcard $(ROOT_DIR)/$(folder)/*.c))
|
||||||
ASMSOURCES += $(foreach folder, $(SUB_FOLDER), $(wildcard $(SRC_DIR)/$(folder)/*.s))
|
ASMSOURCES += $(foreach folder, $(SUB_FOLDER), $(wildcard $(ROOT_DIR)/$(folder)/*.s))
|
||||||
|
|
||||||
all: check $(MAINFILE)
|
all: check $(MAINFILE)
|
||||||
|
|
||||||
@ -35,6 +35,8 @@ deploy: all
|
|||||||
cp $(SRC_DIR)/firmware/kernel/interface/*.* $(EXE_DIR)/include/
|
cp $(SRC_DIR)/firmware/kernel/interface/*.* $(EXE_DIR)/include/
|
||||||
|
|
||||||
check:
|
check:
|
||||||
|
echo $(CHECK_FOLDER)
|
||||||
|
echo $(CHECKSOURCES)
|
||||||
$(CPPCHECK) $(CPPCHECK_FLAGS) $(CHECKSOURCES)
|
$(CPPCHECK) $(CPPCHECK_FLAGS) $(CHECKSOURCES)
|
||||||
|
|
||||||
|
|
||||||
@ -42,14 +44,14 @@ $(MAINFILE): $(OBJECTS) $(ASM_OBJECTS)
|
|||||||
@$(MKDIR) $(EXE_DIR)
|
@$(MKDIR) $(EXE_DIR)
|
||||||
$(AR) rcs $(MAINFILE) $(OBJECTS) $(ASM_OBJECTS)
|
$(AR) rcs $(MAINFILE) $(OBJECTS) $(ASM_OBJECTS)
|
||||||
|
|
||||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
|
$(OBJ_DIR)/%.o: $(ROOT_DIR)/%.c
|
||||||
@rm -rf $(LIB)
|
@rm -rf $(LIB)
|
||||||
@$(MKDIR) $(OBJ_DIR)
|
@$(MKDIR) $(OBJ_DIR)
|
||||||
@$(foreach folder, $(SUB_FOLDER), $(shell mkdir -p $(OBJ_DIR)/$(folder)))
|
@$(foreach folder, $(SUB_FOLDER), $(shell mkdir -p $(OBJ_DIR)/$(folder)))
|
||||||
$(call makedep,$<,$@,$(subst .o,.d,$@))
|
$(call makedep,$<,$@,$(subst .o,.d,$@))
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.s
|
$(OBJ_DIR)/%.o: $(ROOT_DIR)/%.s
|
||||||
@$(MKDIR) $(OBJ_DIR)
|
@$(MKDIR) $(OBJ_DIR)
|
||||||
@$(foreach folder, $(SUB_FOLDER), $(shell mkdir -p $(OBJ_DIR)/$(folder)))
|
@$(foreach folder, $(SUB_FOLDER), $(shell mkdir -p $(OBJ_DIR)/$(folder)))
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
@ -58,6 +60,7 @@ clean:
|
|||||||
$(foreach folder, $(SUB_FOLDER), $(shell rm -f $(OBJ_DIR)/$(folder)/*.o))
|
$(foreach folder, $(SUB_FOLDER), $(shell rm -f $(OBJ_DIR)/$(folder)/*.o))
|
||||||
$(foreach folder, $(SUB_FOLDER), $(shell rm -f $(OBJ_DIR)/$(folder)/*.d))
|
$(foreach folder, $(SUB_FOLDER), $(shell rm -f $(OBJ_DIR)/$(folder)/*.d))
|
||||||
-rm -f $(OBJ_DIR)/*.o \
|
-rm -f $(OBJ_DIR)/*.o \
|
||||||
|
$(EXE_DIR)/include/* \
|
||||||
$(OBJ_DIR)/*.d \
|
$(OBJ_DIR)/*.d \
|
||||||
$(MAINFILE)
|
$(MAINFILE)
|
||||||
|
|
@ -1,3 +1,3 @@
|
|||||||
ifeq ($(CPU), stm32f4xx)
|
ifeq ($(CPU), stm32f4xx)
|
||||||
include firmware/arch/stm32f4xx/stm32f4xx.mk
|
include source/firmware/arch/stm32f4xx/stm32f4xx.mk
|
||||||
endif
|
endif
|
@ -1,6 +1,6 @@
|
|||||||
INCLUDES += firmware/arch/stm32f4xx/board
|
INCLUDES += source/firmware/arch/stm32f4xx/board
|
||||||
DOC_SRC += firmware/arch/stm32f4xx/board
|
DOC_SRC += source/firmware/arch/stm32f4xx/board
|
||||||
|
|
||||||
ifeq ($(BOARD), stm32f4-discovery)
|
ifeq ($(BOARD), stm32f4-discovery)
|
||||||
include firmware/arch/stm32f4xx/board/stm32f4-discovery/stm32f4-discovery.mk
|
include source/firmware/arch/stm32f4xx/board/stm32f4-discovery/stm32f4-discovery.mk
|
||||||
endif
|
endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CHECK_FOLDER += firmware/arch/stm32f4xx/board/stm32f4-discovery
|
CHECK_FOLDER += source/firmware/arch/stm32f4xx/board/stm32f4-discovery
|
||||||
SUB_FOLDER += firmware/arch/stm32f4xx/board/stm32f4-discovery
|
SUB_FOLDER += source/firmware/arch/stm32f4xx/board/stm32f4-discovery
|
||||||
INCLUDES += firmware/arch/stm32f4xx/board/stm32f4-discovery/include
|
INCLUDES += source/firmware/arch/stm32f4xx/board/stm32f4-discovery/include
|
||||||
DOC_SRC += firmware/arch/stm32f4xx/board/stm32f4-discovery
|
DOC_SRC += source/firmware/arch/stm32f4xx/board/stm32f4-discovery
|
@ -1,3 +1,3 @@
|
|||||||
INCLUDES += firmware/arch/stm32f4xx/cpu
|
INCLUDES += source/firmware/arch/stm32f4xx/cpu
|
||||||
DOC_SRC += firmware/arch/stm32f4xx/cpu
|
DOC_SRC += source/firmware/arch/stm32f4xx/cpu
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
CHECK_FOLDER += firmware/arch/stm32f4xx/driver
|
CHECK_FOLDER += source/firmware/arch/stm32f4xx/driver
|
||||||
SUB_FOLDER += firmware/arch/stm32f4xx/driver
|
SUB_FOLDER += source/firmware/arch/stm32f4xx/driver
|
||||||
INCLUDES += firmware/arch/stm32f4xx/driver/include
|
INCLUDES += source/firmware/arch/stm32f4xx/driver/include
|
||||||
DOC_SRC += firmware/arch/stm32f4xx/driver
|
DOC_SRC += source/firmware/arch/stm32f4xx/driver
|
||||||
DOC_SRC += firmware/arch/stm32f4xx/driver/include
|
DOC_SRC += source/firmware/arch/stm32f4xx/driver/include
|
||||||
|
@ -1 +1 @@
|
|||||||
include firmware/arch/stm32f4xx/lib/stdperiph/stdperiph.mk
|
include source/firmware/arch/stm32f4xx/lib/stdperiph/stdperiph.mk
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SUB_FOLDER += firmware/arch/stm32f4xx/lib/stdperiph/src
|
SUB_FOLDER += source/firmware/arch/stm32f4xx/lib/stdperiph/src
|
||||||
INCLUDES += firmware/arch/stm32f4xx/lib/stdperiph/inc
|
INCLUDES += source/firmware/arch/stm32f4xx/lib/stdperiph/inc
|
||||||
INCLUDES += firmware/arch/stm32f4xx/lib/stdperiph/CMSIS/ST/STM32F4xx/Include
|
INCLUDES += source/firmware/arch/stm32f4xx/lib/stdperiph/CMSIS/ST/STM32F4xx/Include
|
||||||
INCLUDES += firmware/arch/stm32f4xx/lib/stdperiph/CMSIS/Include
|
INCLUDES += source/firmware/arch/stm32f4xx/lib/stdperiph/CMSIS/Include
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
CHECK_FOLDER += firmware/arch/stm32f4xx
|
CHECK_FOLDER += source/firmware/arch/stm32f4xx
|
||||||
SUB_FOLDER += firmware/arch/stm32f4xx
|
SUB_FOLDER += source/firmware/arch/stm32f4xx
|
||||||
INCLUDES += firmware/arch/stm32f4xx/include
|
INCLUDES += source/firmware/arch/stm32f4xx/include
|
||||||
DOC_SRC += firmware/arch/stm32f4xx
|
DOC_SRC += source/firmware/arch/stm32f4xx
|
||||||
|
|
||||||
include firmware/arch/stm32f4xx/board/board.mk
|
include source/firmware/arch/stm32f4xx/board/board.mk
|
||||||
include firmware/arch/stm32f4xx/cpu/cpu.mk
|
include source/firmware/arch/stm32f4xx/cpu/cpu.mk
|
||||||
include firmware/arch/stm32f4xx/driver/driver.mk
|
include source/firmware/arch/stm32f4xx/driver/driver.mk
|
||||||
include firmware/arch/stm32f4xx/lib/lib.mk
|
include source/firmware/arch/stm32f4xx/lib/lib.mk
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
include firmware/arch/arch.mk
|
include source/firmware/arch/arch.mk
|
||||||
include firmware/kernel/kernel.mk
|
include source/firmware/kernel/kernel.mk
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CHECK_FOLDER += firmware/kernel/driver
|
CHECK_FOLDER += source/firmware/kernel/driver
|
||||||
SUB_FOLDER += firmware/kernel/driver
|
SUB_FOLDER += source/firmware/kernel/driver
|
||||||
INCLUDES += firmware/kernel/driver/include
|
INCLUDES += source/firmware/kernel/driver/include
|
||||||
DOC_SRC += firmware/kernel/driver
|
DOC_SRC += source/firmware/kernel/driver
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
CHECK_FOLDER += firmware/kernel
|
CHECK_FOLDER += source/firmware/kernel
|
||||||
SUB_FOLDER += firmware/kernel
|
SUB_FOLDER += source/firmware/kernel
|
||||||
INCLUDES += firmware/kernel/include
|
INCLUDES += source/firmware/kernel/include
|
||||||
INCLUDES += firmware/kernel/interface
|
INCLUDES += source/firmware/kernel/interface
|
||||||
DOC_SRC += firmware/kernel
|
DOC_SRC += source/firmware/kernel
|
||||||
|
|
||||||
include firmware/kernel/driver/driver.mk
|
include source/firmware/kernel/driver/driver.mk
|
||||||
|
Loading…
Reference in New Issue
Block a user