aboutsummaryrefslogtreecommitdiffstats
path: root/package/ntfs-3g/ntfs-3g.mk
blob: b8d299a643005b66e43e1cd4724a39c7b46ac24f (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
#############################################################
#
# ntfs-3g
#
#############################################################
#NTFS-3G_VERSION:=1.2506
NTFS-3G_VERSION:=1.5130
NTFS-3G_SOURCE:=ntfs-3g-$(NTFS-3G_VERSION).tgz
NTFS-3G_SITE:=www.ntfs-3g.org
NTFS-3G_DIR:=$(BUILD_DIR)/ntfs-3g-$(NTFS-3G_VERSION)
NTFS-3G_BINARY:=ntfs-3g

http://www.ntfs-3g.org/ntfs-3g-1.5130.tgz
$(DL_DIR)/$(NTFS-3G_SOURCE):
	$(call DOWNLOAD,$(NTFS-3G_SITE),$(NTFS-3G_SOURCE))

$(NTFS-3G_DIR)/.source: $(DL_DIR)/$(NTFS-3G_SOURCE)
	$(ZCAT) $(DL_DIR)/$(NTFS-3G_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	touch $@

$(NTFS-3G_DIR)/.configured: $(NTFS-3G_DIR)/.source
	(cd $(NTFS-3G_DIR); rm -rf config.cache ; \
	$(TARGET_CONFIGURE_OPTS) \
	CFLAGS="$(TARGET_CFLAGS)" \
		./configure \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/usr \
		--libdir=/usr/lib \
		--bindir=/usr/bin \
		--sbindir=/usr/sbin \
		--libexecdir=/usr/lib \
		--sysconfdir=/etc \
		--datadir=/usr/share \
		--localstatedir=/var \
		--includedir=/usr/include \
		--program-prefix="" \
		--with-gnu-ld \
		--enable-shared \
		--enable-static \
		, \
		ac_cv_path_LDCONFIG=""\
	);
	touch $@

$(NTFS-3G_DIR)/.compiled: $(NTFS-3G_DIR)/.configured
	$(MAKE) prefix=$/usr CC=$(TARGET_CC)-C $(NTFS-3G_DIR)
	touch $@
#		CROSS_COMPILE="$(TARGET_CROSS)"



$(STAGING_DIR)/usr/bin/ntfs-3g: $(NTFS-3G_DIR)/.compiled
	$(MAKE) prefix=$/usr -C $(NTFS-3G_DIR) DESTDIR=$(STAGING_DIR)/ install
	touch -c $@

$(TARGET_DIR)/usr/bin/ntfs-3g: $(STAGING_DIR)/usr/bin/ntfs-3g
	rm -f $(TARGET_DIR)/lib/libntfs-3g.so.*
	cp -dpf $(STAGING_DIR)/lib/libntfs-3g.so.* $(TARGET_DIR)/lib/
	-unlink $(TARGET_DIR)/usr/lib/libntfs-3g*
	ln -s /lib/libntfs-3g.so  $(TARGET_DIR)/usr/lib/libntfs-3g.so
	cp -dpf $(STAGING_DIR)/bin/ntfs-3g $(TARGET_DIR)/bin/
	touch -c $@

ntfs-3g: uclibc host-pkgconfig libfuse $(TARGET_DIR)/usr/bin/ntfs-3g

ntfs-3g-source: $(DL_DIR)/$(NTFS-3G_SOURCE)

ntfs-3g-clean:
	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(NTFS-3G_DIR) uninstall
	unlink $(TARGET_DIR)/usr/lib/libntfs-3g*
	rm -f $(TARGET_DIR)/lib/libntfs-3g*
	rm -f $(TARGET_DIR)/bin/ntfs-3g
	-$(MAKE) -C $(NTFS-3G_DIR) clean

ntfs-3g-dirclean:
	rm -rf $(NTFS-3G_DIR)

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_NTFS-3G),y)
TARGETS+=ntfs-3g
endif