############################################################# # # utrobot # ############################################################# UTROBOT_SOURCE:=utrobot-1.0.tar.gz UTROBOT_SITE:=http://socialtapestries.net/feralrobots/software UTROBOT_DIR:=$(BUILD_DIR)/utrobot-1.0 COMPILED_BINARY:=$(UTROBOT_DIR)/src/utrobot TARGET_BINARY:=$(TARGET_DIR)/usr/bin/utrobot $(DL_DIR)/$(UTROBOT_SOURCE): $(WGET) -P $(DL_DIR) $(UTROBOT_SITE)/$(UTROBOT_SOURCE) utrobot-source: $(DL_DIR)/$(UTROBOT_SOURCE) $(UTROBOT_DIR)/.unpacked: $(DL_DIR)/$(UTROBOT_SOURCE) zcat $(DL_DIR)/$(UTROBOT_SOURCE) | tar -C $(BUILD_DIR) -xf - touch $(UTROBOT_DIR)/.unpacked $(UTROBOT_DIR)/Makefile: $(UTROBOT_DIR)/.unpacked (cd $(UTROBOT_DIR); rm -rf config.cache; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ ./configure \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ --build=$(GNU_HOST_NAME) \ --prefix=/usr \ --sysconfdir=/etc \ --datadir=/usr/share \ --localstatedir=/var \ ); touch $(UTROBOT_DIR)/.configured # Ensure that gps.h and libgps.a are properly located # (should be taken care of automatically by buildroot) LIBGPS=-I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib # Add '-DDUMMY_ADC' to CFLAGS to test without robostix's ADC $(COMPILED_BINARY): $(UTROBOT_DIR)/Makefile -$(MAKE) -C $(UTROBOT_DIR) CFLAGS="$(CFLAGS) $(LIBGPS)" # This stuff is needed to work around GNU make deficiencies utrobot-target_binary: $(COMPILED_BINARY) @if [ -L $(TARGET_BINARY) ] ; then \ rm -f $(TARGET_BINARY); fi; @if [ ! -f $(COMPILED_BINARY) -o $(TARGET_BINARY) -ot $(COMPILED_BINARY) ] ; then \ set -x; \ rm -f $(TARGET_BINARY); \ cp -a $(COMPILED_BINARY) $(TARGET_BINARY); \ $(STRIP) $(TARGET_BINARY); \ fi utrobot: uclibc gpsd libgps utrobot-target_binary utrobot-clean: rm -f $(TARGET_BINARY) -$(MAKE) -C $(UTROBOT_DIR) clean utrobot-dirclean: rm -rf $(UTROBOT_DIR)