diff options
Diffstat (limited to 'cros_ec/Makefile')
-rw-r--r-- | cros_ec/Makefile | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/cros_ec/Makefile b/cros_ec/Makefile index 33433fd1f1..ac2ac5b264 100644 --- a/cros_ec/Makefile +++ b/cros_ec/Makefile @@ -9,7 +9,8 @@ TESTDIR = $(CROS_EC_TOP)/test BUILD_ROOT := ${BUILD}/$(shell basename ${CROS_EC_TOP}) LIBS = $(CROS_EC_LIB) # Firmware library must be self-contained -INCLUDES += -I$(LIBDIR)/include +INCLUDES += -I$(LIBDIR)/include \ + -I$(TOP) ifeq ($(FIRMWARE_ARCH),) INCLUDES += -I$(STUBDIR)/include @@ -17,20 +18,28 @@ else INCLUDES += -I$(FWDIR)/arch/$(FIRMWARE_ARCH)/include endif +CORE_SRCS = \ + main.c + # find ./lib -iname '*.c' | sort + +CORE_OBJS = $(CORE_SRCS:%.c=${BUILD_ROOT}/%.o) + LIB_SRCS = \ ./lib/ec_console.c \ - ./lib/ec_host_command.c + ./lib/ec_host_command.c \ + ./lib/ec_keyboard.c LIB_OBJS = $(LIB_SRCS:%.c=${BUILD_ROOT}/%.o) STUB_SRCS = \ ./chip_stub/ec_os.c \ - ./chip_stub/ec_uart.c + ./chip_stub/ec_uart.c \ + ./chip_stub/keyboard.c STUB_OBJS = $(STUB_SRCS:%.c=${BUILD_ROOT}/%.o) -ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS} +ALL_SRCS = ${CORE_SRCS} ${LIB_SRCS} ${STUB_SRCS} ifeq ($(FIRMWARE_ARCH),) all : $(CROS_EC_LIB) $(CHIP_STUB_LIB) @@ -40,7 +49,7 @@ endif include ../common.mk -$(CROS_EC_LIB) : $(LIB_OBJS) +$(CROS_EC_LIB) : $(CORE_OBJS) $(LIB_OBJS) rm -f $@ ar qc $@ $^ |