summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetar.Dimoski <petar.dimoski@seavus.com>2012-03-22 11:33:17 +0100
committerViktor Mladenovski <viktor.mladenovski@seavus.com>2012-05-25 14:44:48 +0200
commit7e04f85c92288df4b70dd64891fd50a2cf18bb8e (patch)
tree3a33582c205cec199d181ec4a7bea0b6c74e0c22
parent097f8ed81e50b5efda28c6a2837e75e15b5812e4 (diff)
Restructure Makefile
ST-Ericsson ID: 413195 ST-Ericsson FOSS-OUT ID: NA Change-Id: Ibab2c43cb6f7fedd83767814b0f3cfcf3fa659d5 Depends-On: I1a29583da74f590ee1c54fc546702d72cd637a11 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/51221 Reviewed-by: Zoran ANCEVSKI <zoran.ancevski@seavus.com> Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com> Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com> Tested-by: Blaze MILADINOV <blaze.miladinov@seavus.com>
-rw-r--r--Android.mk2
-rw-r--r--lcmodule/Makefile142
2 files changed, 26 insertions, 118 deletions
diff --git a/Android.mk b/Android.mk
index 92f1b08..c3c1bb6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -36,7 +36,7 @@ PRIVATE_LC_LCD_FLAGS := LCD_INSTALLDIR=$(PRIVATE_LC_LCD_INSTALLDIR) PATH=$(PATH)
PRIVATE_LC_LCM_FLAGS := LCM_PATH=$(PRIVATE_LC_LCM_DIR) LOADER_DIR=$(PRIVATE_LC_LOADERS_DIR) \
LCMLIB_INSTALLDIR=$(PRIVATE_LC_LCMLIB_INSTALLDIR) \
- LCMLDR_INSTALLDIR=$(PRIVATE_LC_LCM_INSTALLDIR) PATH=$(PATH)
+ PATH=$(PATH)
#LCM TARGETS
.PHONY: config-lcm
diff --git a/lcmodule/Makefile b/lcmodule/Makefile
index e464e8b..b028397 100644
--- a/lcmodule/Makefile
+++ b/lcmodule/Makefile
@@ -293,12 +293,6 @@ $(BUILDFOLDER): | configfile
$(BUILDFOLDER)/.builddummy: | $(BUILDFOLDER)
@touch $@
-$(LCMLDR_INSTALLDIR): | configfile
- @mkdir -p $@ 2> /dev/null
-
-$(LCMLDR_INSTALLDIR)/.ldrinstalldummy: | $(LCMLDR_INSTALLDIR)
- @touch $@
-
$(LCMLIB_INSTALLDIR): | configfile
@mkdir -p $@ 2> /dev/null
@@ -325,7 +319,6 @@ $(LCM_AUTO_DIR)/.autodirdummy : | $(LCM_AUTO_DIR)
.PHONY: setup_folders
setup_folders: validatevariables
-setup_folders: $(BUILDFOLDER)/.builddummy $(LCMLDR_INSTALLDIR)/.ldrinstalldummy $(LCMLIB_INSTALLDIR)/.libinstalldummy
setup_folders: $(AUTO_DIR_LOADER)/.autodirldrdummy $(AUTO_DIR_LIB)/.autodirlibdummy $(LCM_AUTO_DIR)/.autodirdummy
@echo $< > /dev/null
@@ -341,7 +334,6 @@ validatevariables: configfile
$(if $(LCM_AUTO_DIR),, $(error "LCM_AUTO_DIR not set"))
$(if $(AUTO_DIR_LOADER),, $(error "AUTO_DIR_LOADER not set"))
$(if $(LCMLIB_INSTALLDIR),, $(error "LCMLIB_INSTALLDIR not set"))
- $(if $(LCMLDR_INSTALLDIR),, $(error "LCMLDR_INSTALLDIR not set"))
$(if $(LIB_x32),, $(error "LIB_x32 not set"))
$(if $(LIB_x64),, $(error "LIB_x64 not set"))
$(if $(LIB_x32_OBJ_DIR),, $(error "LIB_x32_OBJ_DIR not set"))
@@ -361,8 +353,6 @@ configfile: $(if $(wildcard $(config_file)),,config)
@echo $< > /dev/null
.PHONY: config
-config: LCMLIB_INSTALLDIR := /tmp/
-config: LCMLDR_INSTALLDIR := /tmp/
config: LIB_x32_OBJ_DIR := x32
config: LIB_x64_OBJ_DIR := x64
config: LOADER_DIR := ./
@@ -403,20 +393,11 @@ config:
@echo "AUTO_DIR_LOADER := \$$(LCM_AUTO_DIR)/loader" >> $(config_file)
@echo "LOADER_DIR := $(LOADER_DIR)" >> $(config_file)
@echo "LCMLIB_INSTALLDIR := $(LCMLIB_INSTALLDIR)" >> $(config_file)
- @echo "LCMLDR_INSTALLDIR := $(LCMLDR_INSTALLDIR)" >> $(config_file)
@echo "LIB_x32_OBJ_DIR := $(LIB_x32_OBJ_DIR)" >> $(config_file)
@echo "LIB_x64_OBJ_DIR := $(LIB_x64_OBJ_DIR)" >> $(config_file)
@echo CONFIG_DIR : $(CONFIG_DIR)
install:
- install -p -m 0555 ${AUTO_DIR_LOADER}/* ${LCMLDR_INSTALLDIR}
- install -p -m 0555 ${TRANSPORT_PATH}/source/*.c ${LCMLDR_INSTALLDIR}
- install -p -m 0555 ${NETWORK_PATH}/source/*.c ${LCMLDR_INSTALLDIR}
- install -p -m 0555 ${LCM_CNH_PATH}/source/*.c ${LCMLDR_INSTALLDIR}
- install -p -m 0555 ${TRANSPORT_PATH}/include/*.h ${LCMLDR_INSTALLDIR}
- install -p -m 0555 ${NETWORK_PATH}/include/*.h ${LCMLDR_INSTALLDIR}
- install -p -m 0555 ${LCM_CNH_PATH}/include/*.h ${LCMLDR_INSTALLDIR}
- install -p -m 0555 ${LCM_PATH}/source/serialization.c ${LCMLDR_INSTALLDIR}
$(MAKE) -C . start-install
ifeq ($(USE_MINGW_X32),1)
@@ -440,6 +421,28 @@ ifeq ($(BUILD_WIN),2)
install -p -m 0755 $(LIB_x64) ${LCMLIB_INSTALLDIR}
endif
endif
+ $(MAKE) -C . start-install
+ifeq ($(USE_MINGW_X32),1)
+ $(MAKE) -C . start-install BUILD_WIN=1
+endif
+ifeq ($(USE_MINGW_X64),1)
+ $(MAKE) -C . start-install BUILD_WIN=2
+endif
+
+start-install: start-build
+ifeq ($(BUILD_WIN),)
+ install -p -m 0755 $(LIB_x32) ${LCMLIB_INSTALLDIR}
+ifeq ($(LBITS),64)
+ install -p -m 0755 $(LIB_x64) ${LCMLIB_INSTALLDIR}
+endif
+else
+ifeq ($(BUILD_WIN),1)
+ install -p -m 0755 $(LIB_x32) ${LCMLIB_INSTALLDIR}
+endif
+ifeq ($(BUILD_WIN),2)
+ install -p -m 0755 $(LIB_x64) ${LCMLIB_INSTALLDIR}
+endif
+endif
clean:
$(MAKE) -C . start-clean
@@ -468,106 +471,11 @@ endif
@rm -rf ${BUILDOUT},)
distclean: clean
- $(if ${LCMLDR_INSTALLDIR}, \
- @rm -f ${LCMLDR_INSTALLDIR}/a2_family.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_a2_family.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_a2_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/a2_header.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_a2_header.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_a2_transport.h \
- @rm -f ${LCMLDR_INSTALLDIR}/a2_network.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_a2_network.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_bulk_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/a2_protocol.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_a2_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_command_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/a2_transport.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_a2_transport.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_communication_service.h \
- @rm -f ${LCMLDR_INSTALLDIR}/audit.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_bulk_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/ti_family.c \
- @rm -f ${LCMLDR_INSTALLDIR}/audit.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_command_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/ti_header.c \
- @rm -f ${LCMLDR_INSTALLDIR}/bulk_protocol.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_communication_service.h \
- @rm -f ${LCMLDR_INSTALLDIR}/ti_network.c \
- @rm -f ${LCMLDR_INSTALLDIR}/command_ids.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_measurement_tool.h \
- @rm -f ${LCMLDR_INSTALLDIR}/ti_protocol.c \
- @rm -f ${LCMLDR_INSTALLDIR}/command_marshal.c \
- @rm -f ${LCMLDR_INSTALLDIR}/ces_commands.c \
- @rm -f ${LCMLDR_INSTALLDIR}/ces_commands.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_protrom_family.h \
- @rm -f ${LCMLDR_INSTALLDIR}/ti_transport.c \
- @rm -f ${LCMLDR_INSTALLDIR}/command_protocol.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_protrom_header.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_measurement_tool.h \
- @rm -f ${LCMLDR_INSTALLDIR}/commands.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_protrom_network.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_protrom_header.h \
- @rm -f ${LCMLDR_INSTALLDIR}/commands_impl.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_protrom_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_protrom_network.h \
- @rm -f ${LCMLDR_INSTALLDIR}/communication_service.c \
- @rm -f ${LCMLDR_INSTALLDIR}/lcm_version.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_protrom_transport.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_protrom_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/custom_command_ids.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_r15_family.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_protrom_transport.h \
- @rm -f ${LCMLDR_INSTALLDIR}/custom_command_marshal.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_r15_header.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_r15_family.h \
- @rm -f ${LCMLDR_INSTALLDIR}/custom_commands.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_r15_network_layer.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_r15_header.h \
- @rm -f ${LCMLDR_INSTALLDIR}/custom_commands_impl.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_r15_transport_layer.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_r15_network_layer.h \
- @rm -f ${LCMLDR_INSTALLDIR}/error_codes.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_ti_family.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_r15_transport_layer.h \
- @rm -f ${LCMLDR_INSTALLDIR}/measurement_tool.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_ti_header.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_ti_header.h \
- @rm -f ${LCMLDR_INSTALLDIR}/memmap.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r_ti_network.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_ti_network.h \
- @rm -f ${LCMLDR_INSTALLDIR}/protrom_family.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_ti_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_ti_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/protrom_header.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_ti_transport.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_ti_transport.h \
- @rm -f ${LCMLDR_INSTALLDIR}/protrom_network.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_z_family.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_z_header.h \
- @rm -f ${LCMLDR_INSTALLDIR}/protrom_protocol.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_z_network.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_z_network.h \
- @rm -f ${LCMLDR_INSTALLDIR}/protrom_transport.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_z_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/t_z_protocol.h \
- @rm -f ${LCMLDR_INSTALLDIR}/r15_family.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r_z_transport.h \
- @rm -f ${LCMLDR_INSTALLDIR}/z_family.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r15_header.c \
- @rm -f ${LCMLDR_INSTALLDIR}/serialization.c \
- @rm -f ${LCMLDR_INSTALLDIR}/z_network.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r15_network_layer.c \
- @rm -f ${LCMLDR_INSTALLDIR}/t_a2_header.h \
- @rm -f ${LCMLDR_INSTALLDIR}/z_transport.c \
- @rm -f ${LCMLDR_INSTALLDIR}/r15_transport_layer.c \
- @rm -f ${LCMLDR_INSTALLDIR}/t_a2_network.h \
+
+ @rm -f ${LCMLIB_INSTALLDIR}/LCM.dll \
+ @rm -f $(LCMLIB_INSTALLDIR)/LCM_x64.dll \
@rm -f ${LCMLIB_INSTALLDIR}/LCM.dll \
@rm -f $(LCMLIB_INSTALLDIR)/LCM_x64.dll \
- @rm -f ${LCMLIB_INSTALLDIR}/liblcm.$(LIB_EXTENSION),)
-ifeq ($(LBITS),64)
- $(if ${LCMLDR_INSTALLDIR}, \
- @rm -f ${LCMLIB_INSTALLDIR}/liblcm_x64.$(LIB_EXTENSION),)
-endif
$(if ${LCM_AUTO_DIR}, \
@rm -rf ${LCM_AUTO_DIR},)
$(if $(config_file), \