kumquat-buildroot/package/setserial/setserial.mk

81 lines
2.6 KiB
Makefile
Raw Normal View History

2007-02-06 10:04:44 +01:00
#############################################################
#
# Setserial
#
#############################################################
SETSERIAL_VERSION:=2.17
2008-12-21 16:34:38 +01:00
SETSERIAL_PATCH_VERSION:=.orig
SETSERIAL_PATCH_FILE:=setserial_2.17-45.diff.gz
2007-04-17 19:02:15 +02:00
SETSERIAL_SOURCE:=setserial_$(SETSERIAL_VERSION)$(SETSERIAL_PATCH_VERSION).tar.gz
2007-12-27 13:00:12 +01:00
SETSERIAL_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/s/setserial/
2007-02-06 10:04:44 +01:00
SETSERIAL_DIR:=$(BUILD_DIR)/setserial-$(SETSERIAL_VERSION)
SETSERIAL_BINARY:=setserial
SETSERIAL_TARGET_BINARY:=usr/bin/setserial
$(DL_DIR)/$(SETSERIAL_SOURCE):
2009-01-16 12:42:52 +01:00
$(call DOWNLOAD,$(SETSERIAL_SITE),$(SETSERIAL_SOURCE))
2007-02-06 10:04:44 +01:00
2007-03-24 12:47:00 +01:00
ifneq ($(SETSERIAL_PATCH_FILE),)
SETSERIAL_PATCH:=$(DL_DIR)/$(SETSERIAL_PATCH_FILE)
$(SETSERIAL_PATCH):
$(call DOWNLOAD,$(SETSERIAL_SITE),$(SETSERIAL_PATCH_FILE))
2007-03-24 12:47:00 +01:00
else
SETSERIAL_PATCH:=
endif
$(SETSERIAL_DIR)/.unpacked: $(DL_DIR)/$(SETSERIAL_SOURCE) $(SETSERIAL_PATCH)
2007-02-06 10:04:44 +01:00
$(ZCAT) $(DL_DIR)/$(SETSERIAL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(CONFIG_UPDATE) $(SETSERIAL_DIR)
toolchain/patch-kernel.sh $(SETSERIAL_DIR) package/setserial setserial\*.patch
2007-03-24 12:47:00 +01:00
ifneq ($(SETSERIAL_PATCH_FILE),)
toolchain/patch-kernel.sh $(SETSERIAL_DIR) $(DL_DIR) $(SETSERIAL_PATCH_FILE)
2007-02-06 10:04:44 +01:00
if [ -d $(SETSERIAL_DIR)/debian/patches ]; then \
2007-08-22 11:56:41 +02:00
toolchain/patch-kernel.sh $(SETSERIAL_DIR) $(SETSERIAL_DIR)/debian/patches \*.patch; \
2007-02-06 10:04:44 +01:00
fi
endif
2007-04-17 19:02:15 +02:00
touch $(SETSERIAL_DIR)/gorhack.h
2007-02-06 10:04:44 +01:00
touch $@
$(SETSERIAL_DIR)/.configured: $(SETSERIAL_DIR)/.unpacked
2007-08-22 11:56:41 +02:00
(cd $(SETSERIAL_DIR); rm -rf config.cache; \
2007-02-06 10:04:44 +01:00
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
2007-02-06 10:04:44 +01:00
CFLAGS="$(TARGET_CFLAGS) $(SETSERIAL_CFLAGS)" \
./configure $(QUIET) \
2007-02-06 10:04:44 +01:00
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--sysconfdir=/etc \
)
2007-02-06 10:04:44 +01:00
touch $@
$(SETSERIAL_DIR)/$(SETSERIAL_BINARY): $(SETSERIAL_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(SETSERIAL_DIR)
$(TARGET_DIR)/$(SETSERIAL_TARGET_BINARY): $(SETSERIAL_DIR)/$(SETSERIAL_BINARY)
install -c $(SETSERIAL_DIR)/$(SETSERIAL_BINARY) $(TARGET_DIR)/$(SETSERIAL_TARGET_BINARY)
$(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/$(SETSERIAL_TARGET_BINARY)
2007-02-06 10:04:44 +01:00
setserial: $(TARGET_DIR)/$(SETSERIAL_TARGET_BINARY)
2007-02-06 10:04:44 +01:00
2007-03-24 12:47:00 +01:00
setserial-source: $(DL_DIR)/$(SETSERIAL_SOURCE) $(SETSERIAL_PATCH)
2007-02-06 10:04:44 +01:00
2008-12-21 16:34:38 +01:00
setserial-unpacked: $(SETSERIAL_DIR)/.unpacked
2007-02-06 10:04:44 +01:00
setserial-clean:
rm -f $(TARGET_DIR)/$(SETSERIAL_TARGET_BINARY)
-$(MAKE) -C $(SETSERIAL_DIR) clean
setserial-dirclean:
rm -rf $(SETSERIAL_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_SETSERIAL),y)
2007-02-06 10:04:44 +01:00
TARGETS+=setserial
endif