Revision e5a9df6c8724cf2da2442a26e26145c58d206c98 authored by alex@thinkpad on 14 September 2017, 15:58:30 UTC, committed by alex@thinkpad on 14 September 2017, 15:58:30 UTC
1 parent b92d89e
Makefile.src.config
#
# Here are Magic Lantern Core additional CONFIG_ defines
#
ifeq ($(CONFIG_PIC), y)
CFLAGS += -fPIC -DPOSITION_INDEPENDENT
AFLAGS += -fPIC -DPOSITION_INDEPENDENT
LFLAGS += -fPIC
# fixme: dietlib with -fPIC
endif
ifeq ($(CONFIG_GDB),y)
CFLAGS += -DCONFIG_GDB
ML_OBJS-y += \
gdb.o
endif
ifeq ($(CONFIG_GDBSTUB),y)
CFLAGS += -DCONFIG_GDB -DCONFIG_GDBSTUB
endif
ifeq ($(CONFIG_PTP),y)
CFLAGS += -DCONFIG_PTP
ML_OBJS-y += \
ptp.o
endif
ML_OBJS-$(CONFIG_PTP_CHDK) += \
ptp-chdk.o
ML_OBJS-$(CONFIG_PTP_ML) += \
ptp-ml.o
ifeq ($(CONFIG_CONSOLE),y)
CFLAGS += -DCONFIG_CONSOLE
ML_OBJS-y += \
console.o
endif
ifeq ($(CONFIG_TCC),y)
ifneq ($(CONFIG_CONSOLE),y)
$(error CONFIG_TCC requires CONFIG_CONSOLE = y, please enable it)
endif
CFLAGS += -DCONFIG_TCC
ML_OBJS-y += \
tcc-glue.o \
$(TOP_DIR)/tcc/libtccx.o
endif
ifeq ($(CONFIG_MODULES),y)
ifneq ($(CONFIG_TCC),y)
$(error CONFIG_MODULES requires CONFIG_TCC = y, please enable it)
endif
CFLAGS += -DCONFIG_MODULES
ML_OBJS-y += \
module.o
ML_MODULES_SYM_NAME ?= $(MODEL)_$(FW_VERSION).sym
CFLAGS += -DCONFIG_MODULES_MODEL_SYM=\"$(ML_MODULES_SYM_NAME)\"
$(ML_MODULES_SYM_NAME): magiclantern.sym
$(call build,CP,$(CP) magiclantern.sym $(ML_MODULES_SYM_NAME))
all:: $(ML_MODULES_SYM_NAME)
install:: prepare_install_dir $(ML_MODULES_SYM_NAME)
$(call build,CP,$(CP) $(ML_MODULES_SYM_NAME) $(INSTALL_MODULES_DIR)/)
clean::
$(call rm_files, $(ML_MODULES_SYM_NAME) magiclantern.sym)
endif
ifeq ($(CONFIG_QEMU),y)
CFLAGS += -DCONFIG_QEMU
ifeq ($(CONFIG_QEMU_MENU_SCREENSHOTS),y)
CFLAGS += -DCONFIG_QEMU_MENU_SCREENSHOTS
endif
ML_OBJS-y += \
qemu-util.o
qemu-helper: qemu-helper.o stubs.o
$(call build,LD,$(LD) \
-o $@ \
-nostdlib \
-e _start \
-Ttext 0x30000000 \
$^ \
); \
endif # CONFIG_QEMU
ifeq ($(CONFIG_TINYPY),y)
LFLAGS += \
-u pow \
-u qsort \
-u strstr \
-u atof
endif
ifeq ($(CONFIG_LVAPP_HACK_RELOC),y)
ML_OBJS-y += \
liveview.o \
reloc.o
endif
# force some common functions not used in core, but required by modules
LFLAGS += \
-u strcasecmp \
-u memmove \
-u strstr \
-u strtof \
-u log10f \
-u localeconv \
-u asinf \
-u strerror \
-u strpbrk \
-u ceilf \
-u tanf \
-u strspn \
-u fmodf \
-u acosf \
-u atan2f \
-u expf \
-u memchr \
-u frexpf
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...