1 #############################################################
3 # mkcramfs to build to target cramfs filesystems
5 #############################################################
6 CRAMFS_DIR
=$(BUILD_DIR
)/cramfs-1.1
7 CRAMFS_SOURCE
=cramfs-1.1.
tar.gz
8 CRAMFS_SITE
=http
://aleron.dl.sourceforge.net
/sourceforge
/cramfs
9 CRAMFS_PATCH
=$(SOURCE_DIR
)/cramfs.patch
11 $(DL_DIR
)/$(CRAMFS_SOURCE
):
12 $(WGET
) -P
$(DL_DIR
) $(CRAMFS_SITE
)/$(CRAMFS_SOURCE
)
14 $(CRAMFS_DIR
): $(DL_DIR
)/$(CRAMFS_SOURCE
) $(CRAMFS_PATCH
)
15 zcat
$(DL_DIR
)/$(CRAMFS_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
16 cat
$(CRAMFS_PATCH
) | patch
-p1
-d
$(CRAMFS_DIR
)
18 $(CRAMFS_DIR
)/mkcramfs
: $(CRAMFS_DIR
)
19 $(MAKE
) CFLAGS
="-Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" -C
$(CRAMFS_DIR
);
20 touch
-c
$(CRAMFS_DIR
)/mkcramfs
22 cramfs
: $(CRAMFS_DIR
)/mkcramfs
24 cramfs-source
: $(DL_DIR
)/$(CRAMFS_SOURCE
)
27 -$(MAKE
) -C
$(CRAMFS_DIR
) clean
32 #############################################################
34 # Build the cramfs root filesystem image
36 #############################################################
39 #-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) 2>/dev/null || true;
40 -@find
$(TARGET_DIR
) -type f
-perm
+111 | xargs
$(STRIP
) 2>/dev
/null || true
;
41 @
rm -rf
$(TARGET_DIR
)/usr
/man
42 @
rm -rf
$(TARGET_DIR
)/usr
/info
43 $(CRAMFS_DIR
)/mkcramfs
-q
-D
$(SOURCE_DIR
)/device_table.txt
$(TARGET_DIR
) $(IMAGE
)
45 cramfsroot-source
: cramfs-source
48 -$(MAKE
) -C
$(CRAMFS_DIR
) clean