Makefile 1.44 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
include ../../variables.mk

PORTMAP_VERSION	=	6.0
PORTMAP_PATH	=	$(TARGET_BUILD_PATH)/portmap-$(PORTMAP_VERSION)

.PHONY: extract patch config \
	portmap install clean all

all: portmap

extract: $(PORTMAP_PATH)/.extract-stamp

patch: $(PORTMAP_PATH)/.patch-stamp

config: $(PORTMAP_PATH)/.config-stamp

portmap: config
	PATH=$(STAGING_DIR)/usr/bin:$(PATH) \
	        CC=$(TARGET_CC) \
		NO_TCP_WRAPPER=true \
	        $(MAKE) -C $(PORTMAP_PATH) \
		LDFLAGS=-fPIE
		$(TARGET_CONFIGURE_OPTS) LD=i386-linux-uclibc-gcc

install:
	install -m 755 $(PORTMAP_PATH)/portmap $(TARGET_PATH)/sbin
	install -m 755 $(PORTMAP_PATH)/pmap_dump $(TARGET_PATH)/sbin
	install -m 755 $(PORTMAP_PATH)/pmap_set $(TARGET_PATH)/sbin
	install -m 755 $(SOURCE_PATH)/portmap/S45portmap \
		$(TARGET_PATH)/etc/init.d
	$(STRIPCMD) --strip-unneeded $(TARGET_PATH)/sbin/portmap
	$(STRIPCMD) --strip-unneeded $(TARGET_PATH)/sbin/pmap_dump
	$(STRIPCMD) --strip-unneeded $(TARGET_PATH)/sbin/pmap_set

clean:
	rm -rf $(PORTMAP_PATH)

$(PORTMAP_PATH)/.extract-stamp:
	mkdir -p $(TARGET_BUILD_PATH)
	cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/portmap/portmap-$(PORTMAP_VERSION).tar.gz
	touch $@

$(PORTMAP_PATH)/.patch-stamp: $(PORTMAP_PATH)/.extract-stamp
	$(SCRIPTS_PATH)/patch-kernel.sh $(PORTMAP_PATH) $(SOURCE_PATH)/portmap/ '*.patch'
	touch $@

$(PORTMAP_PATH)/.config-stamp: $(PORTMAP_PATH)/.patch-stamp
	touch $@

#--enable-elf-shlibs --enable-dynamic-e2fsck --disable-swapfs \

#--enable-elf-shlibs \