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 841

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 800 filepang
DEMO_SRC = main.c serial/serial.c ParTest/ParTest.c dma/or32_dma.c
29 620 jeremybenn
ARCH_ASM = ./arch/reset.S
30 584 jeremybenn
 
31 800 filepang
INC             = -I. -I../../Source/include -I./arch -I./drivers -I./dma \
32
                  -I../Common/include \
33 584 jeremybenn
                  -I$(RTOS_SOURCE_DIR)/portable/GCC/OpenRISC
34
 
35 800 filepang
CFLAGS  += $(WARNINGS) $(INC) $(DEBUG) \
36 584 jeremybenn
                -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 800 filepang
        @$(SIZE) $(PORT_ASM_OBJ) $(PORT_OBJ) $(RTOS_OBJ) $(DEMO_OBJ) $(APP_OBJ) $(PROG).or32
68 584 jeremybenn
 
69 649 filepang
$(PROG).or32 : $(PORT_ASM_OBJ) $(PORT_OBJ) $(RTOS_OBJ) $(DEMO_OBJ) $(APP_OBJ) Makefile arch drivers
70 584 jeremybenn
        @echo Link....
71 649 filepang
        @$(LD) -o $@ $(LDFLAGS) --start-group $(ARCH_ASM_OBJ) $(PORT_ASM_OBJ) $(PORT_OBJ) $(RTOS_OBJ) $(DEMO_OBJ) $(APP_OBJ) $(LIBS) --end-group
72 584 jeremybenn
        @$(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 800 filepang
        @rm -f $(RTOS_OBJ) $(DEMO_OBJ) $(PORT_OBJ) $(PORT_ASM_OBJ)
83 584 jeremybenn
        @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 649 filepang
sim: $(PROG).or32
95 584 jeremybenn
        or32-elf-sim --nosrv -f sim.cfg $(PROG).or32
96
 
97 649 filepang
debug: $(PROG).or32
98 584 jeremybenn
        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.