Moving OpenAMP sources to GIT repo.
[processor-sdk/open-amp.git] / Makefile.commons
1 \r
2 TOOLSET          := csgnu\r
3 CROSS            := arm-xilinx-eabi-\r
4 CFLAGS           := -Wall -ffunction-sections -fdata-sections -O0 -g3 -MMD \r
5 CXXFLAGS         := -Wall -fno-enforce-eh-specs -MMD\r
6 ASFLAGS          := -gdwarf2 -meabi=4 -mcpu=cortex-a9 -mfpu=neon\r
7 ARFLAGS          := \r
8 ARCH_CFLAGS      := -gdwarf-2 -mthumb-interwork -mcpu=cortex-a9\r
9 ARCH_CXXFLAGS    := -gdwarf-2 -mthumb-interwork -mcpu=cortex-a9\r
10 ARCH_ASFLAGS     := -gdwarf-2 -mthumb-interwork -mcpu=cortex-a9\r
11 ARCH_ARFLAGS     := \r
12 CC               = $(CROSS)gcc\r
13 CXX              = $(CROSS)g++\r
14 AS               = $(CROSS)as\r
15 AR               = $(CROSS)ar\r
16 LD               = $(CROSS)gcc\r
17 OBJCPY           = $(CROSS)objcopy\r
18 INCLUDE          := \r
19 RM               := rm -f\r
20 CP               := cp\r
21 OHOME            := $(OPENAMP)\r
22 \r
23 ifeq ($(PLAT),)\r
24 export PLAT := zc702evk\r
25 endif\r
26 \r
27 ifeq ($(OS),)\r
28 export OS := nucleus\r
29 endif\r
30 \r
31 BAREMETAL_INCLUDES := -I"$(OHOME)/libs/system/$(PLAT)/baremetal"\r
32 NUCLEUS_INCLUDES := -I"$(OHOME)/libs/system/$(PLAT)/nucleus/arch/arm/tool-csgnu_arm" -I"$(OHOME)/libs/system/$(PLAT)/nucleus/bsp/arch/plat-zynq7000" -I"$(OHOME)/libs/system/$(PLAT)/nucleus" -I"$(OHOME)/libs/system/$(PLAT)/nucleus/arch/arm" \r
33 GENERAL_INCLUDES := -I"$(OHOME)/include"\r
34 \r
35 ifeq ($(OS),nucleus)\r
36 CFLAGS += $(NUCLEUS_INCLUDES)\r
37 CFLAGS +=-D"ENV=0"\r
38 ifeq ($(ROLE),master)\r
39 CFLAGS +=-I"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master"\r
40 CFLAGS+=-D"MASTER=1"\r
41 else\r
42 CFLAGS +=-I"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/remote"\r
43 CFLAGS+=-D"MASTER=0"\r
44 endif\r
45 endif\r
46 \r
47 ifeq ($(OS),baremetal)\r
48 CFLAGS += $(BAREMETAL_INCLUDES)\r
49 CFLAGS +=-D"ENV=1"\r
50 \r
51 ifeq ($(ROLE),master)\r
52 CFLAGS+=-D"MASTER=1"\r
53 else\r
54 CFLAGS+=-D"MASTER=0"\r
55 endif\r
56 endif\r
57 \r
58 ifeq ($(BENCHMARK),1)\r
59 CFLAGS+=-D"OPENAMP_BENCHMARK_ENABLE"\r
60 endif\r
61 \r
62 ifeq ($(LINUXREMOTE),1)\r
63 CFLAGS+=-D"OPENAMP_REMOTE_LINUX_ENABLE"\r
64 endif\r
65 \r
66 CFLAGS += $(GENERAL_INCLUDES)\r
67 \r
68 #The example make file for csgnu and zynq platform would look like below\r
69 \r
70 #TOOLSET          := csgnu\r
71 #CROSS            := arm-none-eabi-\r
72 #CFLAGS           := -Wall -ffunction-sections -fdata-sections -O0 -g3\r
73 #CXXFLAGS         := -Wall -fno-enforce-eh-specs\r
74 #ASFLAGS          := -gdwarf2 -meabi=4 -mcpu=cortex-a9 -mfpu=neon\r
75 #ARFLAGS          := \r
76 #ARCH_CFLAGS      := -gdwarf-2 -mthumb-interwork -mcpu=cortex-a9\r
77 #ARCH_CXXFLAGS    := -gdwarf-2 -mthumb-interwork -mcpu=cortex-a9\r
78 #ARCH_ASFLAGS     := -gdwarf-2 -mthumb-interwork -mcpu=cortex-a9\r
79 #ARCH_ARFLAGS     := \r
80 #CC               = $(CROSS)gcc\r
81 #CXX              = $(CROSS)g++\r
82 #AS               = $(CROSS)as\r
83 #AR               = $(CROSS)ar\r
84 #INCLUDE          := \r
85 #RM               := rm -f\r