added driver framework to prepare for driver unification, fixed USB driver, added...
[rpi-open-firmware.git] / Makefile
index d7123a3..3f79093 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,12 +10,17 @@ SRCS = \
        romstage.c \
        sdram.c \
        arm_loader.c \
-       arm_monitor.c \
+       arm_monitor.cc \
        trap.c \
        lib/xprintf.c \
        lib/panic.c \
        lib/udelay.c \
        lib/memcpy.c \
+       lib/cxx_runtime.c \
+       drivers/IODevice.cc \
+       drivers/BCM2708PowerManagement.cc \
+       drivers/BCM2708UsbPhy.cc \
+       BCM2708PlatformStartup.cc \
        chainloader_inc.s
 
 ARCH = vc4
@@ -38,11 +43,14 @@ OBJ := $(addprefix $(TARGET_BUILD_DIR)/, $(addsuffix .o, $(basename $(SRCS))))
 # the cross compiler should already be in your path
 CROSS_COMPILE = vc4-elf-
 CC = $(CROSS_COMPILE)gcc
+CXX = $(CROSS_COMPILE)g++
 AS = $(CC)
 OBJCOPY = $(CROSS_COMPILE)objcopy
-LINKFLAGS = -nostdlib -nostartfiles
-CFLAGS = -c -nostdlib -std=c11 -fsingle-precision-constant -Wdouble-promotion -D__VIDEOCORE4__ -I./vc4_include/
-ASFLAGS = -c -nostdlib -x assembler-with-cpp -D__VIDEOCORE4__ -I./vc4_include/
+LINKFLAGS = -nostdlib -nostartfiles -Wl,--build-id=none -T linker.lds
+
+CFLAGS = -c -nostdlib -Wno-multichar -std=c11 -fsingle-precision-constant -Wdouble-promotion -D__VIDEOCORE4__ -I./vc4_include/ -I./
+ASFLAGS = -c -nostdlib -x assembler-with-cpp -D__VIDEOCORE4__ -I./vc4_include/ -I./
+CXXFLAGS = -c -nostdlib -Wno-multichar -std=c++11 -fno-exceptions -fno-rtti -D__VIDEOCORE4__ -I./vc4_include/ -I./
 
 HEADERS := \
        $(shell find . -type f -name '*.h') \
@@ -65,6 +73,11 @@ $(TARGET_BUILD_DIR)/%.o: %.c $(HEADERS)
        @echo $(WARN_COLOR)CC  $(NO_COLOR) $@
        @$(CC) $(CFLAGS) $< -o $@
 
+$(TARGET_BUILD_DIR)/%.o: %.cc $(HEADERS)
+       $(CREATE_SUBDIR)
+       @echo $(WARN_COLOR)CXX $(NO_COLOR) $@
+       @$(CXX) $(CXXFLAGS) $< -o $@
+
 $(TARGET_BUILD_DIR)/%.o: %.s $(HEADERS)
        $(CREATE_SUBDIR)
        @echo $(WARN_COLOR)AS  $(NO_COLOR) $@
This page took 0.02469 seconds and 4 git commands to generate.