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 649

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

powered by: WebSVN 2.1.0

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