aboutsummaryrefslogtreecommitdiff
path: root/package/openmotif/openmotif.mk
blob: 6773cee8c8b53804bdefda89935aae6046dd46d5 (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#############################################################
#
# openmotif
#
#############################################################

OPENMOTIF_VERSION = 2.3.0
OPENMOTIF_SOURCE = openmotif-$(OPENMOTIF_VERSION).tar.gz
OPENMOTIF_SITE = ftp://ftp.ics.com/openmotif/2.3/2.3.0
OPENMOTIF_CAT:=$(ZCAT)
OPENMOTIF_DIR:=$(BUILD_DIR)/openmotif-$(OPENMOTIF_VERSION)
OPENMOTIF_HOST_DIR:=$(BUILD_DIR)/openmotif-$(OPENMOTIF_VERSION)-host

$(DL_DIR)/$(OPENMOTIF_SOURCE):
	 $(WGET) -P $(DL_DIR) $(OPENMOTIF_SITE)/$(OPENMOTIF_SOURCE)

openmotif-source: $(DL_DIR)/$(OPENMOTIF_SOURCE)

$(OPENMOTIF_DIR)/.unpacked: $(DL_DIR)/$(OPENMOTIF_SOURCE)
	$(OPENMOTIF_CAT) $(DL_DIR)/$(OPENMOTIF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	$(CONFIG_UPDATE) $(OPENMOTIF_DIR)
	cp -a $(OPENMOTIF_DIR) $(OPENMOTIF_DIR)-host
	toolchain/patch-kernel.sh $(OPENMOTIF_DIR) package/openmotif/ \*.patch
	touch $(OPENMOTIF_DIR)/.unpacked

$(OPENMOTIF_HOST_DIR)/.configured: $(OPENMOTIF_DIR)/.unpacked
	(if [ ! -e "/usr/include/X11/extensions/Print.h" ]; then \
		echo "Please install libXp-devel and re-run make."; \
		exit 1; fi )
	(if [ ! -e "/usr/include/X11/bitmaps" ]; then \
		echo "Please install xorg-x11-xbitmaps and re-run make."; \
		exit 1; fi )
	(cd $(OPENMOTIF_HOST_DIR); rm -rf config.cache; \
		aclocal; automake --foreign --add-missing; autoconf; \
		./configure \
		--prefix=/usr -C;);
	touch $(OPENMOTIF_HOST_DIR)/.configured

$(OPENMOTIF_DIR)/.configured: $(OPENMOTIF_HOST_DIR)/.configured
	(cd $(OPENMOTIF_DIR); rm -rf config.cache; \
		aclocal; automake --foreign --add-missing; autoconf; \
		$(TARGET_CONFIGURE_OPTS) \
		$(TARGET_CONFIGURE_ARGS) \
		ac_cv_file__usr_X_include_X11_X_h=yes \
		ac_cv_func_setpgrp_void=yes \
		./configure \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/usr \
		--mandir=/usr/man \
		--infodir=/usr/info \
		--includedir=/usr/include \
		--with-x --program-prefix="" \
	);
	touch $(OPENMOTIF_DIR)/.configured

$(OPENMOTIF_HOST_DIR)/.done: $(OPENMOTIF_DIR)/.configured
	$(MAKE) -C $(OPENMOTIF_HOST_DIR)
	ln -s -f $(OPENMOTIF_HOST_DIR)/config/util/makestrs $(OPENMOTIF_DIR)/config/util/makestrs-host
	ln -s -f $(OPENMOTIF_HOST_DIR)/tools/wml/wmluiltok $(OPENMOTIF_DIR)/tools/wml/wmluiltok-host
	ln -s -f $(OPENMOTIF_HOST_DIR)/tools/wml/wml $(OPENMOTIF_DIR)/tools/wml/wml-host
	ln -s -f $(OPENMOTIF_HOST_DIR)/tools/wml/wmldbcreate $(OPENMOTIF_DIR)/tools/wml/wmldbcreate-host
	mkdir -p $(OPENMOTIF_DIR)/tools/wml/.libs
	ln -s -f $(OPENMOTIF_HOST_DIR)/tools/wml/.libs/lt-wmldbcreate $(OPENMOTIF_DIR)/tools/wml/.libs/lt-wmldbcreate-host
	mkdir -p $(OPENMOTIF_DIR)/demos/lib/Exm/wml/.libs
	ln -s -f $(OPENMOTIF_HOST_DIR)/demos/lib/Exm/wml/.libs/lt-wmldbcreate $(OPENMOTIF_DIR)/demos/lib/Exm/wml/.libs/lt-wmldbcreate-host
	mkdir -p $(OPENMOTIF_DIR)/clients/uil/.libs
	ln -s -f $(OPENMOTIF_HOST_DIR)/clients/uil/.libs/lt-uil $(OPENMOTIF_DIR)/clients/uil/.libs/lt-uil-host
	touch $(OPENMOTIF_HOST_DIR)/.done

$(OPENMOTIF_DIR)/.done: $(OPENMOTIF_HOST_DIR)/.done
	$(MAKE) -C $(OPENMOTIF_DIR)
	$(MAKE) -C $(OPENMOTIF_DIR) install DESTDIR=$(STAGING_DIR)
	$(MAKE) -C $(OPENMOTIF_DIR) install DESTDIR=$(TARGET_DIR)
	touch $(OPENMOTIF_DIR)/.done

openmotif: uclibc $(OPENMOTIF_DIR)/.done

openmotif-clean:
	rm -f $(TARGET_DIR)/bin/openmotif
	-$(MAKE) -C $(OPENMOTIF_DIR) clean

openmotif-dirclean:
	rm -rf $(OPENMOTIF_DIR)

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_OPENMOTIF),y)
TARGETS+=openmotif
endif