diff options
Diffstat (limited to 'arch/sandbox/os/Makefile')
-rw-r--r-- | arch/sandbox/os/Makefile | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile index 75baa34a83..055ce1a316 100644 --- a/arch/sandbox/os/Makefile +++ b/arch/sandbox/os/Makefile @@ -1,22 +1,27 @@ +# SPDX-License-Identifier: GPL-2.0-only + machine-y := sandbox machdirs := $(patsubst %,arch/sandbox/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -CPPFLAGS := $(patsubst %,-I%include,$(machdirs)) -else -CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif +KBUILD_CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs)) + +KBUILD_CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE) -D_FILE_OFFSET_BITS=64 \ + -DCONFIG_STACK_SIZE=$(CONFIG_STACK_SIZE) -CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE) +KBUILD_CFLAGS := -Wall -CFLAGS := -Wall NOSTDINC_FLAGS := -obj-y = common.o tap.o +ifeq ($(CONFIG_SANDBOX_LINUX_I386),y) +KBUILD_CFLAGS += -m32 +endif + +obj-y = common.o tap.o setjmp.o +obj-$(CONFIG_MALLOC_LIBC) += libc_malloc.o -CFLAGS_sdl.o = $(shell pkg-config sdl --cflags) -obj-$(CONFIG_DRIVER_VIDEO_SDL) += sdl.o +CFLAGS_sdl.o = $(shell $(PKG_CONFIG) sdl2 --cflags) +obj-$(CONFIG_SDL) += sdl.o -CFLAGS_ftdi.o = $(shell pkg-config libftdi1 --cflags) +CFLAGS_ftdi.o = $(shell $(PKG_CONFIG) libftdi1 --cflags) obj-$(CONFIG_GPIO_LIBFTDI1) += ftdi.o |