summaryrefslogtreecommitdiff
path: root/package/tn5250/tn5250.mk
blob: 346e3ec8ed16be091fde2e3339f1577e8fc1ac03 (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
TN5250_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/tn5250
TN5250_DIR:=$(BUILD_DIR)/tn5250-0.16.4
TN5250_SOURCE:=tn5250-0.16.4.tar.gz
TN5250_CAT:=$(ZCAT)

$(DL_DIR)/$(TN5250_SOURCE):
	$(WGET) -P $(DL_DIR) $(TN5250_SITE)/$(TN5250_SOURCE) 

$(TN5250_DIR)/.dist: $(DL_DIR)/$(TN5250_SOURCE)
	$(TN5250_CAT) $(DL_DIR)/$(TN5250_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	-touch $(TN5250_DIR)/.dist

$(TN5250_DIR)/.configured: $(TN5250_DIR)/.dist
	(cd $(TN5250_DIR); rm -rf config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		CFLAGS="$(TARGET_CFLAGS)" \
		LDFLAGS="$(TARGET_LDFLAGS)"
		./configure \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/usr \
		--exec-prefix=/usr \
		--bindir=/usr/bin \
		--sbindir=/usr/sbin \
		--libdir=/lib \
		--libexecdir=/usr/lib \
		--sysconfdir=/etc \
		--datadir=/usr/share \
		--localstatedir=/var \
		--mandir=/usr/man \
		--infodir=/usr/info \
		$(DISABLE_NLS) \
		--with-slang --without-x --without-ssl \
	);
	touch $(TN5250_DIR)/.configured

$(TN5250_DIR)/tn5250: $(TN5250_DIR)/.configured
	$(MAKE) CC=$(TARGET_CC) -C $(TN5250_DIR)

$(TARGET_DIR)/usr/bin/tn5250: $(TN5250_DIR)/tn5250
	install -c $(TN5250_DIR)/tn5250 $(TARGET_DIR)/usr/bin/tn5250

tn5250: uclibc slang $(TARGET_DIR)/usr/bin/tn5250

tn5250-source: $(DL_DIR)/$(TN5250_SOURCE)

tn5250-clean: 
	$(MAKE) -C $(TN5250_DIR) clean

tn5250-dirclean: 
	rm -rf $(TN5250_DIR) 



#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_TN5250)),y)
TARGETS+=tn5250
endif