################################################################# # 2005-08-06 # This is a makefile for compiling noip2 in the floppyFW dev-kit. # # Kai Ove Gran # kaiove@humla.no ################################################################# # Setting our variables. NOIP2_SOURCE_URL=http://www.onevista.com/ NOIP2_SOURCE=noip-2.1.tgz NOIP2_DIR=$(BUILD_DIR)/noip-2.0 NOIP2_PKG_DIR=$(PACKAGES_DIR)/noip2 # Downloading the source. $(DL_DIR)/$(NOIP2_SOURCE): $(WGET) -P $(DL_DIR) $(NOIP2_SOURCE_URL)$(NOIP2_SOURCE) # Makes it possible to write 'make noip2-source' from floppyfw # directory to download source only. noip2-source: $(DL_DIR)/$(NOIP2_SOURCE) # Unpacks the source from the download directory to the # BUILD_DIR. The reason we unpack to the BUILD_DIR and not the # NOIP2_DIR is because the files are packed in a folder within # the tarball, thus ending up in the NOIP2_DIR when unpacked. $(NOIP2_DIR)/.unpacked: $(DL_DIR)/$(NOIP2_SOURCE) # PLEASE NOTE! This is a temporary patch which can be removed when this bug is fixed in the general makefile!! if [ ! -d $(BUILD_DIR) ]; then mkdir -p $(BUILD_DIR);fi # ^-- This one that is ;) tar -C $(BUILD_DIR) -xvzf $(DL_DIR)/$(NOIP2_SOURCE) touch $(NOIP2_DIR)/.unpacked # Makes floppyfw-specific changes to noip2's Makefile. $(NOIP2_DIR)/.configured: $(NOIP2_DIR)/.unpacked $(SED) "s/^PREFIX=\/usr\/local/PREFIX=\//;" $(NOIP2_DIR)/Makefile $(SED) 's/^CONFDIR=\$$\{PREFIX\}\/etc/CONFDIR=\/etc/;' $(NOIP2_DIR)/Makefile $(SED) 's/^BINDIR=\$$\{PREFIX\}\/bin/BINDIR=\/bin/;' $(NOIP2_DIR)/Makefile touch $(NOIP2_DIR)/.configured # Runs the make. Copies the finished binary to the package dir. $(NOIP2_PKG_DIR)/bin/noip2: $(NOIP2_DIR)/.configured $(MAKE) -C $(NOIP2_DIR) if [ ! -d $(NOIP2_PKG_DIR)/bin ]; then mkdir -p $(NOIP2_PKG_DIR)/bin;fi cp $(NOIP2_DIR)/noip2 $(NOIP2_PKG_DIR)/bin/noip2 # Makes the bz2, ffw and post-noip2 files and places them under # /floppyfw/packages. $(PACKAGES_DIR)/noip2.bz2: $(NOIP2_PKG_DIR)/bin/noip2 (cd $(PACKAGES_DIR); sh mkpack noip2) # Makes it possible to write 'make noip2' from the floppyfw dir. noip2: $(PACKAGES_DIR)/noip2.bz2 # Makes it possible to write 'make noip2-clean' from the floppyfw # dir to remove everything related to noip2. noip2-clean: $(RM) -r $(NOIP2_DIR) $(RM) -r $(NOIP2_PKG_DIR) noip2-distclean: $(RM) -r $(DL_DIR)/$(NOIP2_SOURCE)