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