fixup and simplify check for powerpc-*-*-uclibc*
[buildroot.git] / package / microwin / microwin.mk
blob2951415aa60c2e299bee0a8a8074d6c55c310b1f
1 #############################################################
3 # Microwindows - 2003/11/17 Greg Haerr
4 # (requires CVS 2003/11/17 or later)
6 #############################################################
7 MICROWIN_SITE:=ftp://ftp.microwindows.org/pub/microwindows
8 MICROWIN_SOURCE:=microwindows-src-snapshot.tar.gz
9 MICROWIN_DIR:=$(BUILD_DIR)/microwin
10 #MICROWIN_SOURCE:=microwindows-0.91.tar.gz
11 #MICROWIN_DIR:=$(BUILD_DIR)/microwindows-0.91
13 MICROWIN_CAT:=$(ZCAT)
14 MICROWIN_BINARY:=$(MICROWIN_DIR)/src/bin/nano-X
15 MICROWIN_TARGET_BINARY:=$(TARGET_DIR)/usr/bin/nano-X
16 MICROWIN_VERSION=$(subst $(MICROWIN_DIR)/microwindows-,,$(wildcard $(MICROWIN_DIR)/microwindows-*))
18 MICROWIN_CONFIG:=$(MICROWIN_DIR)/src/Configs/config.uclibc
20 $(DL_DIR)/$(MICROWIN_SOURCE):
21 $(WGET) -P $(DL_DIR) $(MICROWIN_SITE)/$(MICROWIN_SOURCE)
23 microwin-source: $(DL_DIR)/$(MICROWIN_SOURCE)
25 $(MICROWIN_DIR)/.unpacked: $(DL_DIR)/$(MICROWIN_SOURCE)
26 [ -d $(MICROWIN_DIR) ] || mkdir $(MICROWIN_DIR)
27 $(MICROWIN_CAT) $(DL_DIR)/$(MICROWIN_SOURCE) | tar -C $(MICROWIN_DIR) $(TAR_OPTIONS) -
28 touch $(MICROWIN_DIR)/.unpacked
30 $(MICROWIN_DIR)/.prepared: $(MICROWIN_DIR)/.unpacked
31 mv $(MICROWIN_DIR)/microwindows-$(MICROWIN_VERSION)/* $(MICROWIN_DIR)
32 toolchain/patch-kernel.sh $(MICROWIN_DIR) package/microwin/ microwindows-$(MICROWIN_VERSION)\*.patch
33 touch $(MICROWIN_DIR)/.prepared
35 $(MICROWIN_DIR)/.configured: $(MICROWIN_DIR)/.prepared
36 (cd $(MICROWIN_DIR); \
38 touch $(MICROWIN_DIR)/.configured
40 $(MICROWIN_BINARY): $(MICROWIN_DIR)/.configured
41 $(MAKE) ARCH=LINUX-$(shell echo $(ARCH) | tr a-z A-Z) $(shell echo $(ARCH) | tr a-z A-Z)TOOLSPREFIX=$(TARGET_CROSS) CC=$(TARGET_CC) -C $(MICROWIN_DIR)/src CONFIG=$(MICROWIN_CONFIG)
43 $(MICROWIN_TARGET_BINARY): $(MICROWIN_BINARY)
44 $(MAKE) INSTALL_PREFIX=$(TARGET_DIR)/usr INSTALL_OWNER1= INSTALL_OWNER2= CC=$(TARGET_CC) -C $(MICROWIN_DIR)/src CONFIG=$(MICROWIN_CONFIG) install
46 microwin: uclibc $(MICROWIN_TARGET_BINARY)
48 microwin-clean:
49 -$(MAKE) -C $(MICROWIN_DIR)/src clean
51 microwin-dirclean:
52 rm -rf $(MICROWIN_DIR)
54 #############################################################
56 # Toplevel Makefile options
58 #############################################################
59 ifeq ($(BR2_PACKAGE_MICROWIN),y)
60 TARGETS+=microwin
61 endif