]> git.sur5r.net Git - freertos/blob - Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/Makefile
Update to V4.7.0.
[freertos] / Demo / ARM7_AT91SAM7X256_Eclipse / RTOSDemo / Makefile
1 #       FreeRTOS.org V4.7.0 - Copyright (C) 2003-2007 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 \r
32 RTOS_SOURCE_DIR=../../../Source\r
33 DEMO_COMMON_DIR=../../Common/Minimal\r
34 DEMO_INCLUDE_DIR=../../Common/include\r
35 UIP_COMMON_DIR=../../Common/ethernet/uIP/uip-1.0/uip\r
36 \r
37 CC=arm-elf-gcc\r
38 OBJCOPY=arm-elf-objcopy\r
39 LDSCRIPT=atmel-rom.ld\r
40 \r
41 LINKER_FLAGS=-mthumb -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map\r
42 \r
43 DEBUG=-g\r
44 OPTIM=-O3\r
45 \r
46 \r
47 CFLAGS= $(DEBUG) \\r
48                 $(OPTIM) \\r
49                 -T$(LDSCRIPT) \\r
50                 -I . \\r
51                 -I $(RTOS_SOURCE_DIR)/include \\r
52                 -I $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S \\r
53                 -I $(DEMO_INCLUDE_DIR) \\r
54                 -I ./webserver \\r
55                 -I $(UIP_COMMON_DIR) \\r
56                 -I ./SrcAtmel \\r
57                 -I ./USB \\r
58                 -D SAM7_GCC \\r
59                 -D THUMB_INTERWORK \\r
60                 -mcpu=arm7tdmi \\r
61                 -D PACK_STRUCT_END=__attribute\(\(packed\)\) \\r
62                 -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \\r
63                 -fomit-frame-pointer \\r
64                 -mthumb-interwork\r
65                                                                                 \r
66 THUMB_SOURCE= \\r
67                 main.c \\r
68                 ./ParTest/ParTest.c \\r
69                 $(DEMO_COMMON_DIR)/BlockQ.c \\r
70                 $(DEMO_COMMON_DIR)/blocktim.c \\r
71                 $(DEMO_COMMON_DIR)/flash.c \\r
72                 $(DEMO_COMMON_DIR)/integer.c \\r
73                 $(DEMO_COMMON_DIR)/GenQTest.c \\r
74                 $(DEMO_COMMON_DIR)/QPeek.c \\r
75                 $(DEMO_COMMON_DIR)/dynamic.c \\r
76                 ./webserver/uIP_Task.c \\r
77                 ./webserver/httpd.c \\r
78                 ./webserver/httpd-cgi.c \\r
79                 ./webserver/httpd-fs.c \\r
80                 ./webserver/http-strings.c \\r
81                 ./webserver/SAM7_EMAC.c \\r
82                 $(UIP_COMMON_DIR)/uip_arp.c \\r
83                 $(UIP_COMMON_DIR)/psock.c \\r
84                 $(UIP_COMMON_DIR)/timer.c \\r
85                 $(UIP_COMMON_DIR)/uip.c \\r
86                 $(RTOS_SOURCE_DIR)/list.c \\r
87                 $(RTOS_SOURCE_DIR)/queue.c \\r
88                 $(RTOS_SOURCE_DIR)/tasks.c \\r
89                 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S/port.c \\r
90                 $(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \\r
91                 ./USB/USBSample.c\r
92 \r
93 ARM_SOURCE= \\r
94                 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S/portISR.c \\r
95                 ./webserver/emac_isr.c \\r
96                 ./SrcAtmel/Cstartup_SAM7.c \\r
97                 ./USB/USB_ISR.c\r
98 \r
99 THUMB_OBJS = $(THUMB_SOURCE:.c=.o)\r
100 ARM_OBJS = $(ARM_SOURCE:.c=.o)\r
101 \r
102 \r
103 all: RTOSDemo.bin\r
104 \r
105 RTOSDemo.bin : RTOSDemo.hex\r
106         $(OBJCOPY) RTOSDemo.elf -O binary RTOSDemo.bin\r
107          \r
108 RTOSDemo.hex : RTOSDemo.elf\r
109         $(OBJCOPY) RTOSDemo.elf -O ihex RTOSDemo.hex\r
110 \r
111 RTOSDemo.elf : $(THUMB_OBJS) $(ARM_OBJS) boot.s Makefile\r
112         $(CC) $(CFLAGS) $(ARM_OBJS) $(THUMB_OBJS) $(LIBS) boot.s $(LINKER_FLAGS) \r
113 \r
114 $(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
115         $(CC) -c $(CFLAGS) -mthumb $< -o $@\r
116 \r
117 $(ARM_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
118         $(CC) -c $(CFLAGS) $< -o $@\r
119 \r
120 clean :\r
121         rm $(THUMB_OBJS)\r
122         rm $(ARM_OBJS)\r
123         touch Makefile\r
124         rm RTOSDemo.elf\r
125         rm RTOSDemo.hex\r
126         \r
127         \r
128         \r
129 \r
130 \r
131 \r
132 \r