################################################################# # 2005-08-22 # This is a makefile for compiling E3 in the floppyFW dev-kit. # # Kai Ove Gran # kaiove@humla.no ################################################################# # Setting our variables. E3_SOURCE_URL=http://mitglied.lycos.de/albkleine/ E3_VERSION=2.7.1 E3_SOURCE=e3-$(E3_VERSION).tar.gz E3_DIR=$(BUILD_DIR)/e3-$(E3_VERSION) E3_PKG_DIR=$(PACKAGES_DIR)/e3 # Downloading the source. $(DL_DIR)/$(E3_SOURCE): $(WGET) -P $(DL_DIR) $(E3_SOURCE_URL)$(E3_SOURCE) # Makes it possible to write 'make e3-source' from floppyfw # directory to download source only. e3-source: $(DL_DIR)/$(E3_SOURCE) # Unpacks the source from the download directory to the # BUILD_DIR. The reason we unpack to the BUILD_DIR and not the # E3_DIR is because the files are packed in a folder within # the tarball, thus ending up in the E3_DIR when unpacked. $(E3_DIR)/.unpacked: $(DL_DIR)/$(E3_SOURCE) # PLEASE NOTE! This is a temporary patch which can be removed when this bug is fixed in the general makefile!! @mkdir -p $(E3_PKG_DIR)/bin # ^-- This one that is ;) zcat $(DL_DIR)/$(E3_SOURCE) | \ tar $(TAR_VERBOSE) -C $(BUILD_DIR) -xf - touch $(E3_DIR)/.unpacked # Runs the make. Copies the finished binary to the package dir. $(E3_PKG_DIR)/bin/e3: $(E3_DIR)/.unpacked $(MAKE) -C $(E3_DIR) if [ ! -d $(E3_PKG_DIR)/bin ]; then mkdir -p $(E3_PKG_DIR)/bin;fi mv $(E3_DIR)/e3 $(E3_PKG_DIR)/bin/e3 mv $(E3_DIR)/e3em $(E3_PKG_DIR)/bin/e3em mv $(E3_DIR)/e3ne $(E3_PKG_DIR)/bin/e3ne mv $(E3_DIR)/e3pi $(E3_PKG_DIR)/bin/e3pi mv $(E3_DIR)/e3vi $(E3_PKG_DIR)/bin/e3vi mv $(E3_DIR)/e3ws $(E3_PKG_DIR)/bin/e3ws # Makes the bz2 and ffw files and places them under # /floppyfw/packages. $(PACKAGES_DIR)/e3.bz2: $(E3_PKG_DIR)/bin/e3 (cd $(PACKAGES_DIR); sh mkpack e3) # Makes it possible to write 'make e3' from the floppyfw dir. e3: $(PACKAGES_DIR)/e3.bz2 # Makes it possible to write 'make e3-clean' from the floppyfw # dir to remove everything related to e3. e3-clean: $(MAKE) -C $(E3_DIR) clean $(RM) -r $(E3_PKG_DIR) e3-dirclean: $(RM) -r $(E3_DIR) $(RM) -r $(E3_PKG_DIR) $(RM) -r $(DL_DIR)/$(E3_SOURCE)