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