summaryrefslogtreecommitdiff
path: root/package/libcgicc/libcgicc.mk
blob: 02c864ab35148525bda269b1dd74531fcb15c0dc (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
#############################################################
#
# libcgicc
#
#############################################################

LIBCGICC_VERSION=3.2.7
LIBCGICC_DIR=$(BUILD_DIR)/cgicc-$(LIBCGICC_VERSION)
LIBCGICC_SITE=$(BR2_GNU_MIRROR)/cgicc
LIBCGICC_SOURCE=cgicc-$(LIBCGICC_VERSION).tar.gz
LIBCGICC_CAT:=$(ZCAT)

$(DL_DIR)/$(LIBCGICC_SOURCE):
	$(call DOWNLOAD,$(LIBCGICC_SITE),$(LIBCGICC_SOURCE))

libcgicc-source: $(DL_DIR)/$(LIBCGICC_SOURCE)

$(LIBCGICC_DIR)/.unpacked: $(DL_DIR)/$(LIBCGICC_SOURCE)
	$(LIBCGICC_CAT) $(DL_DIR)/$(LIBCGICC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	touch $(LIBCGICC_DIR)/.unpacked

$(LIBCGICC_DIR)/.configured: $(LIBCGICC_DIR)/.unpacked
	(cd $(LIBCGICC_DIR); rm -f config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		$(TARGET_CONFIGURE_ARGS) \
		./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 \
		--includedir=/include \
		--mandir=/usr/man \
		--infodir=/usr/info \
	)
	touch $(LIBCGICC_DIR)/.configured

$(LIBCGICC_DIR)/.compiled: $(LIBCGICC_DIR)/.configured
	$(MAKE) -C $(LIBCGICC_DIR)
	touch $(LIBCGICC_DIR)/.compiled

$(STAGING_DIR)/lib/libcgicc.so: $(LIBCGICC_DIR)/.compiled
	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(LIBCGICC_DIR) install
	touch -c $(STAGING_DIR)/lib/libcgicc.so

$(TARGET_DIR)/usr/lib/libcgicc.so: $(STAGING_DIR)/lib/libcgicc.so
	cp -dpf $(STAGING_DIR)/lib/libcgicc.so* $(TARGET_DIR)/usr/lib/

libcgicc: uclibc $(TARGET_DIR)/usr/lib/libcgicc.so

libcgicc-clean:
		-$(MAKE) -C $(LIBCGICC_DIR) clean

libcgicc-dirclean:
	rm -rf $(LIBCGICC_DIR)

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_LIBCGICC),y)
TARGETS+=libcgicc
endif