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 620

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 620 jeremybenn
DEMO_SRC = main.c
31
ARCH_ASM = ./arch/reset.S
32 584 jeremybenn
 
33
INC             = -I. -I../../Source/include -I./arch -I./drivers -I../Common/include \
34
                  -I$(RTOS_SOURCE_DIR)/portable/GCC/OpenRISC
35
 
36
CFLAGS  = $(WARNINGS) $(INC) \
37
                -I../Common/include $(DEBUG) \
38
                -D__GCC_OpenRISC__ \
39
                -fomit-frame-pointer -fno-strict-aliasing -fno-builtin
40
 
41
GCCVER  = $(shell $(CC) --version | grep gcc | cut -d" " -f9)
42
CCPATH  = /home/dmw/works/or32/tools/or32-new
43
 
44
#
45
# Define all object files.
46
#
47
RTOS_OBJ = $(RTOS_SRC:.c=.o)
48
APP_OBJ  = $(APP_SRC:.c=.o)
49
PORT_OBJ = $(PORT_SRC:.c=.o)
50
DEMO_OBJ = $(DEMO_SRC:.c=.o)
51
PORT_ASM_OBJ = $(PORT_ASM:.S=.o)
52 620 jeremybenn
ARCH_ASM_OBJ = $(ARCH_ASM:.S=.o)
53 584 jeremybenn
 
54
LDFLAGS  = -T ./arch/link.ld -Map $(PROG).map
55 620 jeremybenn
LIBS     = -L./arch -larch -L./drivers -ldrivers \
56 584 jeremybenn
                   -L$(CCPATH)/lib/gcc/$(TARGET)/$(GCCVER) \
57
                   -L$(CCPATH)/$(TARGET)/lib \
58
                   -lgcc -lc -lm
59
 
60
%.o: %.c
61
        @echo "    CC $<"
62
        @$(CC) -c $(CFLAGS) -o $@ $<
63
 
64
%.o: %.S
65 620 jeremybenn
        @echo "    ASM $<"
66 584 jeremybenn
        @$(CC) -c $(CFLAGS) -o $@ $<
67
 
68
all: $(PROG).or32
69
 
70
$(PROG).or32 : $(PORT_ASM_OBJ) $(PORT_OBJ) $(RTOS_OBJ) $(DEMO_OBJ) Makefile arch drivers
71
        @echo Link....
72 620 jeremybenn
        @$(LD) -o $@ $(LDFLAGS) --start-group $(ARCH_ASM_OBJ) $(PORT_ASM_OBJ) $(PORT_OBJ) $(RTOS_OBJ) $(DEMO_OBJ) $(LIBS) --end-group
73 584 jeremybenn
        @$(OBJDUMP) -S $(PROG).or32 >> $(PROG).asm
74
        @echo Complete $@
75
 
76
arch: force_true
77
        @(cd $@; make)
78
 
79
drivers: force_true
80
        @(cd $@; make)
81
 
82
clean :
83
        @rm -f $(RTOS_OBJ) $(DEMO_OBJ) $(PORT_OBJ) $(PORT_ASM_OBJ)
84
        @rm -f rtosdemo.or32
85
        @rm -f rtosdemo.map
86
        @rm -f rtosdemo.asm
87
        @rm -f eth0.tx
88
        @(cd arch;make --no-print-directory clean)
89
        @(cd drivers;make --no-print-directory clean)
90
 
91
force_true:
92
        @true
93
 
94
#-------------------------------------------------------------
95
sim:
96
        or32-elf-sim --nosrv -f sim.cfg $(PROG).or32
97
 
98
debug:
99
        xterm -e or32-elf-sim -f sim.cfg --srv=9999 &
100
        xterm -e or32-elf-gdb $(PROG).or32 &
101
 
102
 

powered by: WebSVN 2.1.0

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