-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build: replace scons with makefile (#235)
* Build: transform scons into Makefile * Build: add Makefile dependencies * Build: remove some tabs from Makefile * Build: Make builds out of source, move wait for event to kernel port * Test: update the full test to print status messages * Build: replace lpthread with pthread Co-authored-by: Alfred Gedeon <[email protected]>
- Loading branch information
Showing
9 changed files
with
114 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
CC := gcc | ||
BIN := posix_demo | ||
|
||
BUILD_DIR := build | ||
|
||
FREERTOS_DIR_REL := ../../../FreeRTOS | ||
FREERTOS_DIR := $(abspath $(FREERTOS_DIR_REL)) | ||
|
||
FREERTOS_PLUS_DIR_REL := ../../../FreeRTOS-Plus | ||
FREERTOS_PLUS_DIR := $(abspath $(FREERTOS_PLUS_DIR_REL)) | ||
|
||
INCLUDE_DIRS := -I. | ||
INCLUDE_DIRS += -I${FREERTOS_DIR}/Source/include | ||
INCLUDE_DIRS += -I${FREERTOS_DIR}/Source/portable/ThirdParty/GCC/Posix | ||
INCLUDE_DIRS += -I${FREERTOS_DIR}/Source/portable/ThirdParty/GCC/Posix/utils | ||
INCLUDE_DIRS += -I${FREERTOS_DIR}/Demo/Common/include | ||
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/Include | ||
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/linux/ | ||
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/include/ | ||
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC/ | ||
|
||
SOURCE_FILES := $(wildcard *.c) | ||
SOURCE_FILES += $(wildcard ${FREERTOS_DIR}/Source/*.c) | ||
# Memory manager (use malloc() / free() ) | ||
SOURCE_FILES += ${FREERTOS_DIR}/Source/portable/MemMang/heap_3.c | ||
# posix port | ||
SOURCE_FILES += ${FREERTOS_DIR}/Source/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Source/portable/ThirdParty/GCC/Posix/port.c | ||
|
||
# FreeRTOS TCP | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/FreeRTOS_Stream_Buffer.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/FreeRTOS_IP.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/FreeRTOS_UDP_IP.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/linux/NetworkInterface.c | ||
|
||
# Demo library. | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/AbortDelay.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/BlockQ.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/blocktim.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/countsem.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/death.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/dynamic.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/EventGroupsDemo.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/flop.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/GenQTest.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/integer.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/IntSemTest.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/MessageBufferAMP.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/MessageBufferDemo.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/PollQ.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/QPeek.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/QueueOverwrite.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/QueueSet.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/QueueSetPolling.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/recmutex.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/semtest.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/StaticAllocation.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/StreamBufferDemo.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/StreamBufferInterrupt.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/TaskNotify.c | ||
SOURCE_FILES += ${FREERTOS_DIR}/Demo/Common/Minimal/TimerDemo.c | ||
|
||
# Trace library. | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/trcKernelPort.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/trcSnapshotRecorder.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/trcStreamingRecorder.c | ||
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/streamports/File/trcStreamingPort.c | ||
|
||
|
||
CFLAGS := -ggdb3 -Og -DprojCOVERAGE_TEST=0 | ||
LDFLAGS := -ggdb3 -Og -pthread -lpcap | ||
|
||
OBJ_FILES = $(SOURCE_FILES:%.c=$(BUILD_DIR)/%.o) | ||
|
||
DEP_FILE = $(OBJ_FILES:%.o=%.d) | ||
|
||
${BIN} : $(BUILD_DIR)/$(BIN) | ||
|
||
${BUILD_DIR}/${BIN} : ${OBJ_FILES} | ||
-mkdir -p ${@D} | ||
$(CC) $(CFLAGS) $(INCLUDE_DIRS) ${LDFLAGS} $^ -o $@ | ||
|
||
|
||
-include ${DEP_FILE} | ||
|
||
${BUILD_DIR}/%.o : %.c | ||
-mkdir -p $(@D) | ||
$(CC) $(CFLAGS) ${INCLUDE_DIRS} -MMD -c $< -o $@ | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
-rm -rf $(BUILD_DIR) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.