]> git.sur5r.net Git - freertos/blob - Demo/lwIP_Demo_Rowley_ARM7/makefile
Update to V5.4.2. See http://www.freertos.org/History.txt .
[freertos] / Demo / lwIP_Demo_Rowley_ARM7 / makefile
1 #/*\r
2 #       FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.\r
3 #\r
4 #       This file is part of the FreeRTOS distribution.\r
5 #\r
6 #       FreeRTOS is free software; you can redistribute it and/or modify it     under \r
7 #       the terms of the GNU General Public License (version 2) as published by the \r
8 #       Free Software Foundation and modified by the FreeRTOS exception.\r
9 #       **NOTE** The exception to the GPL is included to allow you to distribute a\r
10 #       combined work that includes FreeRTOS without being obliged to provide the \r
11 #       source code for proprietary components outside of the FreeRTOS kernel.  \r
12 #       Alternative commercial license and support terms are also available upon \r
13 #       request.  See the licensing section of http://www.FreeRTOS.org for full \r
14 #       license details.\r
15 #\r
16 #       FreeRTOS is distributed in the hope that it will be useful,     but WITHOUT\r
17 #       ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
18 #       FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
19 #       more details.\r
20 #\r
21 #       You should have received a copy of the GNU General Public License along\r
22 #       with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59\r
23 #       Temple Place, Suite 330, Boston, MA  02111-1307  USA.\r
24 #\r
25 #\r
26 #       ***************************************************************************\r
27 #       *                                                                         *\r
28 #       * Looking for a quick start?  Then check out the FreeRTOS eBook!          *\r
29 #       * See http://www.FreeRTOS.org/Documentation for details                   *\r
30 #       *                                                                         *\r
31 #       ***************************************************************************\r
32 #\r
33 #       1 tab == 4 spaces!\r
34 #\r
35 #       Please ensure to read the configuration and relevant port sections of the\r
36 #       online documentation.\r
37 #\r
38 #       http://www.FreeRTOS.org - Documentation, latest information, license and\r
39 #       contact details.\r
40 #\r
41 #       http://www.SafeRTOS.com - A version that is certified for use in safety\r
42 #       critical systems.\r
43 #\r
44 #       http://www.OpenRTOS.com - Commercial support, development, porting,\r
45 #       licensing and training services.\r
46 #*/\r
47 \r
48 CC=arm-elf-gcc\r
49 OBJCOPY=arm-elf-objcopy\r
50 ARCH=arm-elf-ar\r
51 CRT0=boot.s\r
52 DEBUG=-g\r
53 OPTIM=-O0\r
54 LDSCRIPT=atmel-rom.ld\r
55 \r
56 #\r
57 # CFLAGS common to both the THUMB and ARM mode builds\r
58 #\r
59 \r
60 CFLAGS= \\r
61 -I.  \\r
62 -I./EMAC  \\r
63 -I../Common/include  \\r
64 -I./USB  \\r
65 -I./lwip-1.1.0/src/include  \\r
66 -I./lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X  \\r
67 -I../../Source/include  \\r
68 -I../../Source/portable/GCC/ARM7_AT91SAM7S  \\r
69 -I./lwip-1.1.0/src/include/ipv4 \\r
70 -Wall  \\r
71 -Wextra  \\r
72 -Wstrict-prototypes  \\r
73 -Wmissing-prototypes  \\r
74 -Wmissing-declarations  \\r
75 -Wno-strict-aliasing  \\r
76 -D SAM7_GCC  \\r
77 -D THUMB_INTERWORK \\r
78 -mthumb-interwork \\r
79 -mcpu=arm7tdmi  \\r
80 -T$(LDSCRIPT) \\r
81 $(DEBUG)  \\r
82 $(OPTIM) \\r
83 -fomit-frame-pointer\r
84 \r
85 THUMB_FLAGS=-mthumb\r
86 LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map\r
87 \r
88 #\r
89 # Source files that can be built to THUMB mode.\r
90 #\r
91 FREERTOS_THUMB_SRC= \\r
92   ../../Source/tasks.c \\r
93   ../../Source/queue.c \\r
94   ../../Source/list.c \\r
95   ../../Source/portable/GCC/ARM7_AT91SAM7S/port.c\r
96 \r
97 DEMO_APP_THMUB_SRC= \\r
98   ../../Source/portable/MemMang/heap_2.c \\r
99   ParTest/ParTest.c \\r
100   main.c \\r
101   ../Common/Minimal/flash.c \\r
102   ../Common/Minimal/BlockQ.c \\r
103   ../Common/Minimal/integer.c \\r
104   ../Common/Minimal/PollQ.c \\r
105   ../Common/Minimal/semtest.c \\r
106   BasicWEB.c \\r
107   USB/USB-CDC.c \r
108 \r
109 LWIP_THUMB_SRC= \\r
110   lwip-1.1.0/src/core/tcp_out.c \\r
111   lwip-1.1.0/src/core/inet.c \\r
112   lwip-1.1.0/src/core/mem.c \\r
113   lwip-1.1.0/src/core/memp.c \\r
114   lwip-1.1.0/src/core/netif.c \\r
115   lwip-1.1.0/src/core/pbuf.c \\r
116   lwip-1.1.0/src/core/raw.c \\r
117   lwip-1.1.0/src/core/stats.c \\r
118   lwip-1.1.0/src/core/sys.c \\r
119   lwip-1.1.0/src/core/tcp.c \\r
120   lwip-1.1.0/src/core/tcp_in.c \\r
121   lwip-1.1.0/src/core/ipv4/ip.c \\r
122   lwip-1.1.0/src/core/ipv4/ip_addr.c \\r
123   lwip-1.1.0/src/core/ipv4/icmp.c \\r
124   lwip-1.1.0/src/api/tcpip.c \\r
125   lwip-1.1.0/src/api/api_msg.c \\r
126   lwip-1.1.0/src/api/err.c \\r
127   lwip-1.1.0/src/api/api_lib.c \\r
128   lwip-1.1.0/src/netif/etharp.c \\r
129   lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c \\r
130   lwip-1.1.0/src/netif/ethernetif.c \\r
131   EMAC/SAM7_EMAC.c \\r
132   lwip-1.1.0/src/core/udp.c \\r
133   lwip-1.1.0/src/core/ipv4/ip_frag.c\r
134 \r
135 #\r
136 # Source files that must be built to ARM mode.\r
137 #\r
138 ARM_SRC= \\r
139   ../../Source/portable/GCC/ARM7_AT91SAM7S/portISR.c \\r
140   EMAC/SAM7_EMAC_ISR.c \\r
141   USB/USBIsr.c \\r
142   Cstartup_SAM7.c  \r
143 \r
144 \r
145 #\r
146 # Define all object files.\r
147 #\r
148 ARM_OBJ = $(ARM_SRC:.c=.o)\r
149 FREERTOS_THUMB_OBJ = $(FREERTOS_THUMB_SRC:.c=.o)\r
150 DEMO_APP_THMUB_OBJ = $(DEMO_APP_THMUB_SRC:.c=.o)\r
151 LWIP_THUMB_OBJ = $(LWIP_THUMB_SRC:.c=.o)\r
152 \r
153 rtosdemo.bin : rtosdemo.elf\r
154         $(OBJCOPY) rtosdemo.elf -O binary rtosdemo.bin\r
155 \r
156 rtosdemo.hex : rtosdemo.elf\r
157         $(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex\r
158 \r
159 rtosdemo.elf : $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) $(CRT0) Makefile FreeRTOSConfig.h\r
160         $(CC) $(CFLAGS) $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)\r
161 \r
162 $(DEMO_APP_THMUB_OBJ)  : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h\r
163         $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@\r
164 \r
165 $(LWIP_THUMB_OBJ)  : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h\r
166         $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@\r
167 \r
168 $(FREERTOS_THUMB_OBJ)  : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h\r
169         $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@\r
170 \r
171 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h\r
172         $(CC) -c $(CFLAGS) $< -o $@\r
173 \r
174 clean :\r
175         touch Makefile\r
176 \r