blob: 84a30d7fd7126769035c7cf4d5742d8f719f7de5 [file] [log] [blame]
EXPORT_DIR = ../../../exports
IMPORT_DIR = ../../../imports
PACKAGE_NAME = xdccore
EXPORTS = xdccore-Windows.zip xdccore-Linux.zip xdccore-Linux_arm.zip xdccore-MacOS.zip \
xdchost-Windows.zip xdchost-Linux.zip xdchost-Linux_arm.zip xdchost-MacOS.zip
JRE_Linux = $(XDCTOOLS_JAVA_HOME)
JRE_Windows = $(JRE_Linux:Linux=Windows)
JRE_Linx_arm =
JRE_MacOS = $(TOOLS)/vendors/oracle/jdk/jdk1.7.0_55/MacOS/jre
SWT_Linux = $(IMPORT_DIR)/xdc/tools/sg/swt_linux
SWT_Windows = $(subst linux,win32,$(SWT_Linux))
SWT_Linx_arm =
SWT_MacOS = $(subst linux,macos,$(SWT_Linux))
release: $(foreach d,$(EXPORTS),$(EXPORT_DIR)/$(d))
.SECONDARY: Windows/.install Linux/.install Linux_arm/.install MacOS/.install
## create OS-specific xdctools product image (minus ./packages)
%/.install:
@$(MSG) installing host-specific tools into $*/$(PACKAGE_NAME) ...
$(SH) XDCTOOLS_JAVA_HOME="$(JRE_$*)" ./get_iliad.ksh -h $* $*/$(PACKAGE_NAME)
@$(if $(SWT_$*),$(MSG) " adding $(SWT_$*) ...")
$(if $(SWT_$*),mkdir $*/$(PACKAGE_NAME)/packages; $(XDCCPP) $(SWT_$*) $*/$(PACKAGE_NAME)/packages)
$(SH) ./get_host.ksh -h $* $*/xdchost/local
$(RM) $@; $(TOUCH) $@
## create and export OS-specific zips to exports
$(EXPORT_DIR)/xdccore-%.zip: $(PACKAGE_NAME).zip %/.install
@$(MSG) creating $@ ...
$(RM) $@; $(CP) $< $@
if [ -r $*/xdccore/jre ]; then chmod a-w $*/xdccore/jre; fi
cd $*; $(ZIP) ../$@ -q -r -u $(PACKAGE_NAME)
if [ -r $*/xdccore/jre ]; then chmod u+w $*/xdccore/jre; fi
$(EXPORT_DIR)/xdchost-%.zip: %/.install
@$(MSG) creating $@ ...
$(RM) $@;
cd $*; $(ZIP) ../$@ -q -r xdchost
clean::
$(RMDIR) Windows Linux Linux_arm MacOS
$(MKDIR) Windows Linux Linux_arm MacOS