pass ARCH down to uClibc
[buildroot.git] / package / microcom / microcom.mk
blob1b555cbc3ff63eb3a3d810df12ef624afc21a155
1 #############################################################
3 # microcom terminal emulator
5 # Maintainer: Tim Riker <Tim@Rikers.org>
7 #############################################################
8 # Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
9 # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU Library General Public License as
13 # published by the Free Software Foundation; either version 2 of the
14 # License, or (at your option) any later version.
16 # This program is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 # Library General Public License for more details.
21 # You should have received a copy of the GNU Library General Public
22 # License along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24 # USA
26 # TARGETS
27 # http://microcom.port5.com/m102.tar.gz
28 MICROCOM_VERSION:=1.02
29 MICROCOM_SITE:=http://microcom.port5.com/
30 MICROCOM_SOURCE:=m102.tar.gz
31 MICROCOM_DIR:=$(BUILD_DIR)/microcom-$(MICROCOM_VERSION)
33 $(DL_DIR)/$(MICROCOM_SOURCE):
34 $(WGET) -P $(DL_DIR) $(MICROCOM_SITE)/$(MICROCOM_SOURCE)
36 microcom-source: $(DL_DIR)/$(MICROCOM_SOURCE)
38 $(MICROCOM_DIR)/.unpacked: $(DL_DIR)/$(MICROCOM_SOURCE)
39 mkdir -p $(MICROCOM_DIR)
40 $(ZCAT) $(DL_DIR)/$(MICROCOM_SOURCE) | tar -C $(MICROCOM_DIR) $(TAR_OPTIONS) -
41 toolchain/patch-kernel.sh $(MICROCOM_DIR) package/microcom/ \*.patch
42 touch $@
44 $(MICROCOM_DIR)/.configured: $(MICROCOM_DIR)/.unpacked
45 $(SED) 's~gcc~$$(CC)~' -e 's~-O~$$(CFLAGS)~' $(MICROCOM_DIR)/Makefile
46 touch $@
48 $(MICROCOM_DIR)/microcom: $(MICROCOM_DIR)/.configured
49 ifeq ($(BR2_PREFER_IMA),y)
50 (cd $(MICROCOM_DIR); \
51 $(TARGET_CC) $(TARGET_CC_FLAGS) $(TARGET_CFLAGS) $(CFLAGS_COMBINE) \
52 $(CFLAGS_WHOLE_PROGRAM) -o $@ $(wildcard $(MICROCOM_DIR)/*.c); \
54 else
55 $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(MICROCOM_DIR)
56 endif
57 $(STRIPCMD) $(STRIP_STRIP_ALL) $@
59 $(TARGET_DIR)/usr/bin/microcom: $(MICROCOM_DIR)/microcom
60 install -c $(MICROCOM_DIR)/microcom $(TARGET_DIR)/usr/bin/microcom
62 microcom-clean:
63 rm -f $(MICROCOM_DIR)/*.o $(MICROCOM_DIR)/microcom \
64 $(TARGET_DIR)/usr/bin/microcom
66 microcom-dirclean:
67 rm -rf $(MICROCOM_DIR)
69 microcom: $(TARGET_DIR)/usr/bin/microcom
71 #############################################################
73 # Toplevel Makefile options
75 #############################################################
76 ifeq ($(BR2_PACKAGE_MICROCOM),y)
77 TARGETS+=microcom
78 endif