OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [OpenRISC_SIM_GCC/] [Makefile] - Blame information for rev 584

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 584 jeremybenn
include ./Makefile.inc
2
 
3
PROG    = rtosdemo
4
DEBUG   = -g
5
 
6
RTOS_SOURCE_DIR = ../../Source
7
 
8
RTOS_SRC = \
9
        $(RTOS_SOURCE_DIR)/croutine.c \
10
        $(RTOS_SOURCE_DIR)/list.c \
11
        $(RTOS_SOURCE_DIR)/queue.c \
12
        $(RTOS_SOURCE_DIR)/tasks.c \
13
        $(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c
14
 
15
APP_SOURCE_DIR  = ../Common/Minimal
16
 
17
APP_SRC = \
18
        $(APP_SOURCE_DIR)/integer.c \
19
        $(APP_SOURCE_DIR)/flash.c \
20
        $(APP_SOURCE_DIR)/PollQ.c \
21
        $(APP_SOURCE_DIR)/comtest.c \
22
        $(APP_SOURCE_DIR)/flop.c \
23
        $(APP_SOURCE_DIR)/semtest.c \
24
        $(APP_SOURCE_DIR)/dynamic.c \
25
        $(APP_SOURCE_DIR)/BlockQ.c
26
 
27
PORT_SRC = $(RTOS_SOURCE_DIR)/portable/GCC/OpenRISC/port.c
28
PORT_ASM = $(RTOS_SOURCE_DIR)/portable/GCC/OpenRISC/portasm.S
29
 
30
DEMO_SRC = main.c ./drivers/uart.c
31
 
32
INC             = -I. -I../../Source/include -I./arch -I./drivers -I../Common/include \
33
                  -I$(RTOS_SOURCE_DIR)/portable/GCC/OpenRISC
34
 
35
CFLAGS  = $(WARNINGS) $(INC) \
36
                -I../Common/include $(DEBUG) \
37
                -D__GCC_OpenRISC__ \
38
                -fomit-frame-pointer -fno-strict-aliasing -fno-builtin
39
 
40
GCCVER  = $(shell $(CC) --version | grep gcc | cut -d" " -f9)
41
CCPATH  = /home/dmw/works/or32/tools/or32-new
42
 
43
#
44
# Define all object files.
45
#
46
RTOS_OBJ = $(RTOS_SRC:.c=.o)
47
APP_OBJ  = $(APP_SRC:.c=.o)
48
PORT_OBJ = $(PORT_SRC:.c=.o)
49
DEMO_OBJ = $(DEMO_SRC:.c=.o)
50
PORT_ASM_OBJ = $(PORT_ASM:.S=.o)
51
ARCH_OBJ = ./arch/reset.o ./arch/int.o ./arch/support.o ./arch/interrupts.o
52
 
53
LDFLAGS  = -T ./arch/link.ld -Map $(PROG).map
54
LIBS     = -L./drivers -ldrivers \
55
                   -L$(CCPATH)/lib/gcc/$(TARGET)/$(GCCVER) \
56
                   -L$(CCPATH)/$(TARGET)/lib \
57
                   -lgcc -lc -lm
58
 
59
%.o: %.c
60
        @echo "    CC $<"
61
        @$(CC) -c $(CFLAGS) -o $@ $<
62
 
63
%.o: %.S
64
        @echo "    CC $<"
65
        @$(CC) -c $(CFLAGS) -o $@ $<
66
 
67
all: $(PROG).or32
68
 
69
$(PROG).or32 : $(PORT_ASM_OBJ) $(PORT_OBJ) $(RTOS_OBJ) $(DEMO_OBJ) Makefile arch drivers
70
        @echo Link....
71
        @$(LD) -o $@ $(LDFLAGS) --start-group $(ARCH_OBJ) $(PORT_ASM_OBJ) $(PORT_OBJ) $(RTOS_OBJ) $(DEMO_OBJ) $(LIBS) --end-group
72
        @$(OBJDUMP) -S $(PROG).or32 >> $(PROG).asm
73
        @echo Complete $@
74
 
75
arch: force_true
76
        @(cd $@; make)
77
 
78
drivers: force_true
79
        @(cd $@; make)
80
 
81
clean :
82
        @rm -f $(RTOS_OBJ) $(DEMO_OBJ) $(PORT_OBJ) $(PORT_ASM_OBJ)
83
        @rm -f rtosdemo.or32
84
        @rm -f rtosdemo.map
85
        @rm -f rtosdemo.asm
86
        @rm -f eth0.tx
87
        @(cd arch;make --no-print-directory clean)
88
        @(cd drivers;make --no-print-directory clean)
89
 
90
force_true:
91
        @true
92
 
93
#-------------------------------------------------------------
94
sim:
95
        or32-elf-sim --nosrv -f sim.cfg $(PROG).or32
96
 
97
debug:
98
        xterm -e or32-elf-sim -f sim.cfg --srv=9999 &
99
        xterm -e or32-elf-gdb $(PROG).or32 &
100
 
101
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.