]> git.sur5r.net Git - freertos/blob - Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile
c4d662c4391f098ddf27e65aa9991f246e0bba96
[freertos] / Demo / ARM7_LPC2368_Eclipse / RTOSDemo / 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 \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=lpc2368.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=-O1\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_LPC23xx \\r
53                 -I $(DEMO_INCLUDE_DIR) \\r
54                 -I ./webserver \\r
55                 -I $(UIP_COMMON_DIR) \\r
56                 -D ROWLEY_LPC23xx \\r
57                 -D THUMB_INTERWORK \\r
58                 -mcpu=arm7tdmi \\r
59                 -D PACK_STRUCT_END=__attribute\(\(packed\)\) \\r
60                 -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \\r
61                 -fomit-frame-pointer \\r
62                 -mthumb-interwork\r
63                                                                                 \r
64 THUMB_SOURCE= \\r
65                 main.c \\r
66                 ./ParTest/ParTest.c \\r
67                 ./LCD/portlcd.c \\r
68                 $(DEMO_COMMON_DIR)/BlockQ.c \\r
69                 $(DEMO_COMMON_DIR)/blocktim.c \\r
70                 $(DEMO_COMMON_DIR)/flash.c \\r
71                 $(DEMO_COMMON_DIR)/integer.c \\r
72                 $(DEMO_COMMON_DIR)/GenQTest.c \\r
73                 $(DEMO_COMMON_DIR)/QPeek.c \\r
74                 $(DEMO_COMMON_DIR)/dynamic.c \\r
75                 ./webserver/uIP_Task.c \\r
76                 ./webserver/emac.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                 $(UIP_COMMON_DIR)/uip_arp.c \\r
82                 $(UIP_COMMON_DIR)/psock.c \\r
83                 $(UIP_COMMON_DIR)/timer.c \\r
84                 $(UIP_COMMON_DIR)/uip.c \\r
85                 $(RTOS_SOURCE_DIR)/list.c \\r
86                 $(RTOS_SOURCE_DIR)/queue.c \\r
87                 $(RTOS_SOURCE_DIR)/tasks.c \\r
88                 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/port.c \\r
89                 $(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c\r
90 \r
91 ARM_SOURCE= \\r
92                 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/portISR.c \\r
93                 ./webserver/EMAC_ISR.c\r
94 \r
95 THUMB_OBJS = $(THUMB_SOURCE:.c=.o)\r
96 ARM_OBJS = $(ARM_SOURCE:.c=.o)\r
97 \r
98 \r
99 all: RTOSDemo.bin\r
100 \r
101 RTOSDemo.bin : RTOSDemo.hex\r
102         $(OBJCOPY) RTOSDemo.elf -O binary RTOSDemo.bin\r
103          \r
104 RTOSDemo.hex : RTOSDemo.elf\r
105         $(OBJCOPY) RTOSDemo.elf -O ihex RTOSDemo.hex\r
106 \r
107 RTOSDemo.elf : $(THUMB_OBJS) $(ARM_OBJS) boot.s Makefile\r
108         $(CC) $(CFLAGS) $(ARM_OBJS) $(THUMB_OBJS) $(LIBS) boot.s $(LINKER_FLAGS) \r
109 \r
110 $(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
111         $(CC) -c $(CFLAGS) -mthumb $< -o $@\r
112 \r
113 $(ARM_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
114         $(CC) -c $(CFLAGS) $< -o $@\r
115 \r
116 clean :\r
117         rm $(THUMB_OBJS)\r
118         rm $(ARM_OBJS)\r
119         touch Makefile\r
120         rm RTOSDemo.elf\r
121         rm RTOSDemo.hex\r
122         \r
123         \r
124         \r
125 \r
126 \r
127 \r
128 \r