OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ColdFire_MCF5282_Eclipse/] [RTOSDemo/] [Makefile] - Blame information for rev 649

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 jeremybenn
RM := rm -rf
2
 
3
# Set the optimisation level - this should be set to 0, 1, 2, 3 or s (s for size).
4
OPTIM=s
5
 
6
###############################################################################
7
# List the directories that contain files to be built.
8
###############################################################################
9
 
10
# These two directories contain the FreeRTOS.org kernel source files.
11
FREERTOS_SOURCE_DIR=./../../../Source
12
PORT_SOURCE_DIR=./../../../Source/portable/GCC/ColdFire_V2
13
 
14
# This directory contains the standard demo files that get included in every
15
# FreeRTOS.org demo.  They define tasks that demonstrate the API usage and
16
# test the FreeRTOS.org port.
17
COMMON_DEMO_SOURCE_DIR=./../../Common/Minimal
18
 
19
# The lwIP stack source files.
20
LWIP_ROOT_DIR=./../../Common/ethernet/lwIP_130
21
 
22
VPATH=          $(FREERTOS_SOURCE_DIR) : \
23
                        $(PORT_SOURCE_DIR) : \
24
                        $(COMMON_DEMO_SOURCE_DIR) : \
25
                        $(FREERTOS_SOURCE_DIR)/portable/MemMang : \
26
                        . : \
27
                        ./ParTest : \
28
                        ./serial
29
 
30
 
31
###############################################################################
32
# Define a few constants to be used during the build.
33
###############################################################################
34
 
35
OUTPUT_DIR=./bin
36
CPU=528x
37
LINKER_SCRIPT=m5282evb-dram_code-rambar_data-hosted.ld
38
OUTPUT_FILENAME=RTOSDemo.elf
39
CC=m68k-elf-gcc
40
AS=m68K-elf-as
41
 
42
 
43
###############################################################################
44
# List the files to include in the build.  These files will be located from the
45
# VPATH defined above.
46
###############################################################################
47
 
48
# The FreeRTOS.org source files.
49
FreeRTOS_OBJS=                  $(OUTPUT_DIR)/portasm.o \
50
                                                $(OUTPUT_DIR)/port.o \
51
                                                $(OUTPUT_DIR)/list.o \
52
                                                $(OUTPUT_DIR)/tasks.o \
53
                                                $(OUTPUT_DIR)/queue.o \
54
                                                $(OUTPUT_DIR)/heap_2.o
55
 
56
# The demo app source files.
57
Demo_OBJS=                              $(OUTPUT_DIR)/main.o \
58
                                                $(OUTPUT_DIR)/serial.o \
59
                                                $(OUTPUT_DIR)/comtest.o \
60
                                                $(OUTPUT_DIR)/flash.o \
61
                                                $(OUTPUT_DIR)/ParTest.o \
62
                                                $(OUTPUT_DIR)/BlockQ.o \
63
                                                $(OUTPUT_DIR)/death.o \
64
                                                $(OUTPUT_DIR)/integer.o \
65
                                                $(OUTPUT_DIR)/PollQ.o \
66
                                                $(OUTPUT_DIR)/semtest.o \
67
                                                $(OUTPUT_DIR)/GenQTest.o \
68
                                                $(OUTPUT_DIR)/QPeek.o \
69
                                                $(OUTPUT_DIR)/recmutex.o \
70
                                                $(OUTPUT_DIR)/IntQueueTimer.o \
71
                                                $(OUTPUT_DIR)/IntQueue.o \
72
                                                $(OUTPUT_DIR)/FreeRTOS_Tick_Setup.o
73
 
74
OBJS = $(FreeRTOS_OBJS) $(Demo_OBJS)
75
 
76
C_DEPS = $(OBJS:.o=.d)
77
 
78
INCLUDE_PATHS=  -I"$(FREERTOS_SOURCE_DIR)/include" \
79
                                -I"include" \
80
                                -I"$(COMMON_DEMO_SOURCE_DIR)/../include" \
81
                                -I"$(PORT_SOURCE_DIR)" \
82
                                -I./MCF5282 \
83
                                -I.
84
 
85
CFLAGS=         $(INCLUDE_PATHS) \
86
                        -D COLDFIRE_V2_GCC \
87
                        -O$(OPTIM) \
88
                        -fno-strict-aliasing \
89
                        -g3 \
90
                        -Wall \
91
                        -Wextra \
92
                        -c \
93
                        -ffunction-sections \
94
                        -fdata-sections \
95
                        -fmessage-length=0 \
96
                        -funsigned-char \
97
                        -Wextra \
98
                        -mcpu=$(CPU) \
99
                        -MMD \
100
                        -MP \
101
                        -MF"$(@:%.o=%.d)" \
102
                        -MT"$(@:%.o=%.d)"
103
 
104
ASFLAGS=        -m528x \
105
                        -g3 \
106
                        --register-prefix-optional \
107
            --bitwise-or
108
 
109
LIBS=
110
 
111
# Add inputs and outputs from these tool invocations to the build variables
112
 
113
# All Target
114
all: $(OUTPUT_DIR)/$(OUTPUT_FILENAME)
115
 
116
# Tool invocations
117
$(OUTPUT_DIR)/$(OUTPUT_FILENAME): $(OBJS)
118
        $(CC) -nostartfiles --gc-sections -Xlinker -Map=$(OUTPUT_DIR)/output.map -mcpu=$(CPU) -T $(LINKER_SCRIPT) -o"$(OUTPUT_DIR)/$(OUTPUT_FILENAME)"  $(OBJS) $(USER_OBJS) $(LIBS)
119
 
120
$(OUTPUT_DIR)/%.o: %.c Makefile
121
        $(CC) $(CFLAGS) -o"$@" "$<"
122
 
123
$(OUTPUT_DIR)/%.o: %.S
124
        $(AS) $(ASFLAGS) -o"$@" "$<"
125
 
126
# Other Targets
127
clean:
128
        -$(RM) $(OBJS) $(C_DEPS) $(EXECUTABLES) $(OUTPUT_DIR)/$(OUTPUT_FILENAME)
129
        -@echo ' '
130
 
131
#
132
# The rule to create the target directory
133
#
134
$(OUTPUT_DIR):
135
        @mkdir $(OUTPUT_DIR)
136
 
137
 
138
.PHONY: all clean dependents
139
.SECONDARY: post-build
140
 
141
-include $(wildcard $(OUTPUT_DIR)/*.d) __dummy__
142
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.