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_MCF52233_Eclipse/] [RTOSDemo/] [Makefile] - Blame information for rev 578

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=0
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
# This directory contains the modified uIP code
20
FREERTOS_uIP_DIR=./../../Common/ethernet/FreeRTOS-uIP
21
 
22
VPATH=          $(FREERTOS_SOURCE_DIR) : \
23
                        $(PORT_SOURCE_DIR) : \
24
                        $(COMMON_DEMO_SOURCE_DIR) : \
25
                        $(FREERTOS_SOURCE_DIR)/portable/MemMang : \
26
                        $(FREERTOS_uIP_DIR) : \
27
                        . : \
28
                        ./webserver : \
29
                        ./ParTest : \
30
                        ./serial
31
 
32
 
33
###############################################################################
34
# Define a few constants to be used during the build.
35
###############################################################################
36
 
37
OUTPUT_DIR=./bin
38
CPU=52235
39
LINKER_SCRIPT=m52235evb-rom-hosted.ld
40
SREC_FILENAME=RTOSDemo.s19
41
ELF_FILENAME=RTOSDemo.elf
42
CC=m68k-elf-gcc
43
AS=m68k-elf-as
44
OBJCOPY=m68k-elf-objcopy
45
 
46
 
47
###############################################################################
48
# List the files to include in the build.  These files will be located from the
49
# VPATH defined above.
50
###############################################################################
51
 
52
# The FreeRTOS.org source files.
53
FreeRTOS_OBJS=                  $(OUTPUT_DIR)/portasm.o \
54
                                                $(OUTPUT_DIR)/port.o \
55
                                                $(OUTPUT_DIR)/list.o \
56
                                                $(OUTPUT_DIR)/tasks.o \
57
                                                $(OUTPUT_DIR)/queue.o \
58
                                                $(OUTPUT_DIR)/heap_1.o
59
 
60
# The demo app source files, including the basic WEB server.
61
Demo_OBJS=                              $(OUTPUT_DIR)/main.o \
62
                                                $(OUTPUT_DIR)/ParTest.o \
63
                                                $(OUTPUT_DIR)/flash.o \
64
                                                $(OUTPUT_DIR)/FreeRTOS_Tick_Setup.o \
65
                                                $(OUTPUT_DIR)/BlockQ.o \
66
                                                $(OUTPUT_DIR)/PollQ.o \
67
                                                $(OUTPUT_DIR)/semtest.o \
68
                                                $(OUTPUT_DIR)/GenQTest.o \
69
                                                $(OUTPUT_DIR)/QPeek.o \
70
                                                $(OUTPUT_DIR)/FEC.o \
71
                                                $(OUTPUT_DIR)/blocktim.o \
72
                                                $(OUTPUT_DIR)/recmutex.o \
73
                                                $(OUTPUT_DIR)/printf-stdarg.o
74
 
75
HTTP_OBJS=                              $(OUTPUT_DIR)/uIP_Task.o \
76
                                                $(OUTPUT_DIR)/httpd.o \
77
                                                $(OUTPUT_DIR)/httpd-cgi.o \
78
                                                $(OUTPUT_DIR)/httpd-fs.o \
79
                                                $(OUTPUT_DIR)/http-strings.o
80
 
81
# uIP source files
82
uIP_OBJS=                               $(OUTPUT_DIR)/timer.o \
83
                                                $(OUTPUT_DIR)/uip.o \
84
                                                $(OUTPUT_DIR)/uip_arp.o \
85
                                                $(OUTPUT_DIR)/uiplib.o \
86
                                                $(OUTPUT_DIR)/uip-split.o \
87
                                                $(OUTPUT_DIR)/psock.o
88
 
89
OBJS = $(Demo_OBJS) $(FreeRTOS_OBJS) $(uIP_OBJS) $(HTTP_OBJS)
90
 
91
C_DEPS = $(OBJS:.o=.d)
92
 
93
INCLUDE_PATHS=  -I./webserver \
94
                                -I"$(FREERTOS_uIP_DIR)" \
95
                                -I"$(FREERTOS_SOURCE_DIR)/include" \
96
                                -I"include" \
97
                                -I"$(COMMON_DEMO_SOURCE_DIR)/../include" \
98
                                -I"$(PORT_SOURCE_DIR)" \
99
                                -I./MCF5223x \
100
                                -I.
101
 
102
CFLAGS=         $(INCLUDE_PATHS) \
103
                        -D COLDFIRE_V2_GCC \
104
                        -D PACK_STRUCT_END=__attribute\(\(packed\)\) \
105
                        -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \
106
                        -O$(OPTIM) \
107
                        -D bktPRIMARY_PRIORITY=4 \
108
                        -D bktSECONDARY_PRIORITY=3 \
109
                        -fno-strict-aliasing \
110
                        -g3 \
111
                        -gdwarf-2 \
112
                        -Wall \
113
                        -Wextra \
114
                        -c \
115
                        -ffunction-sections \
116
                        -fdata-sections \
117
                        -fmessage-length=0 \
118
                        -funsigned-char \
119
                        -Wextra \
120
                        -mcpu=$(CPU) \
121
                        -MMD \
122
                        -MP \
123
                        -MF"$(@:%.o=%.d)" \
124
                        -MT"$(@:%.o=%.d)"
125
 
126
ASFLAGS=        -m52235 \
127
                        -g3 \
128
                        --register-prefix-optional \
129
            --bitwise-or
130
 
131
LIBS=
132
 
133
# Add inputs and outputs from these tool invocations to the build variables
134
 
135
# All Target
136
all: $(OUTPUT_DIR)/$(SREC_FILENAME)
137
 
138
# Tool invocations
139
$(OUTPUT_DIR)/$(SREC_FILENAME): $(OUTPUT_DIR)/$(ELF_FILENAME)
140
        $(OBJCOPY) $(OUTPUT_DIR)/$(ELF_FILENAME) -O srec $(OUTPUT_DIR)/$(SREC_FILENAME)
141
 
142
$(OUTPUT_DIR)/$(ELF_FILENAME): $(OBJS)
143
        $(CC) -nostartfiles --gc-sections -Xlinker -Map=$(OUTPUT_DIR)/output.map -mcpu=$(CPU) -T $(LINKER_SCRIPT) -o"$(OUTPUT_DIR)/$(ELF_FILENAME)"  $(OBJS) $(USER_OBJS) $(LIBS)
144
 
145
$(OUTPUT_DIR)/%.o: %.c Makefile
146
        $(CC) $(CFLAGS) -o"$@" "$<"
147
 
148
$(OUTPUT_DIR)/%.o: %.S
149
        $(AS) $(ASFLAGS) -o"$@" "$<"
150
 
151
# Other Targets
152
clean:
153
        -$(RM) $(OBJS) $(C_DEPS) $(EXECUTABLES) $(OUTPUT_DIR)/$(ELF_FILENAME) $(OUTPUT_DIR)/$(SREC_FILENAME)
154
        -@echo ' '
155
 
156
#
157
# The rule to create the target directory
158
#
159
$(OUTPUT_DIR):
160
        @mkdir $(OUTPUT_DIR)
161
 
162
 
163
.PHONY: all clean dependents
164
.SECONDARY: post-build
165
 
166
-include $(wildcard $(OUTPUT_DIR)/*.d) __dummy__
167
 

powered by: WebSVN 2.1.0

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