https://bitbucket.org/hudson/magic-lantern
Raw File
Tip revision: 11a4fa34d7afdfeb1939357d1bef1560f930dd4e authored by a1ex on 22 October 2013, 21:26:54 UTC
Close branch ppluciennik/makefile_zip_fixes2.
Tip revision: 11a4fa3
Makefile.modules
TOP_DIR?=../..
ML_SETUP_DISABLE_USER_CONFIGS=y
ML_SETUP_EXTENSION=modules

include $(TOP_DIR)/Makefile.setup

# should we define a platform for modules? for now use 'all' platform
PLATFORM_INC=$(TOP_DIR)/platform/all
CFLAGS += -DMODULE -DMODULE_NAME=$(MODULE_NAME) $(MODULE_CFLAGS)

MODULE_OUTPUT = $(MODULE_NAME).mo

all:: $(MODULE_OUTPUT)

clean::
	$(call rm_files, $(MODULE_OBJS) $(MODULE_OUTPUT) *.o *.d)

$(MODULE_OUTPUT): $(MODULE_OBJS)
	$(call build,MODULE,$(LD_REAL) -r -o $@ $^)
	$(call build,STRIP,$(STRIP) --strip-debug --strip-unneeded --discard-all --discard-locals $@)

install:: all
	$(CP) $(PWD)/$(MODULE_OUTPUT) $(INSTALL_MODULES_DIR)/

FORCE:

include $(TOP_DIR)/Makefile.filerules
back to top