summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-26 15:17:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-27 08:53:05 +0200
commitee4e7f09b4fa5f3a592d1052f841b690657fc166 (patch)
tree4b5ccda11692eb47cde046cbe51f93345bef5b20 /cpukit/libfs
parentgeneric_or1k: Fix a typo in a comment (diff)
downloadrtems-ee4e7f09b4fa5f3a592d1052f841b690657fc166.tar.bz2
jffs2: Move into separate library
In case the zlib compression was used, then the librtemscpu.a depended on libz.a. To avoid a GCC patch or complicated link flags move the JFFS2 support into a separate library to use a simple "-ljffs2 -lz" to link the executable.
Diffstat (limited to 'cpukit/libfs')
-rw-r--r--cpukit/libfs/Makefile.am2
-rw-r--r--cpukit/libfs/preinstall.am17
2 files changed, 18 insertions, 1 deletions
diff --git a/cpukit/libfs/Makefile.am b/cpukit/libfs/Makefile.am
index 531e080cb7..678234b52e 100644
--- a/cpukit/libfs/Makefile.am
+++ b/cpukit/libfs/Makefile.am
@@ -109,7 +109,7 @@ librfs_a_SOURCES = \
src/rfs/rtems-rfs-trace.c
# JFFS2
-noinst_LIBRARIES += libjffs2.a
+project_lib_LIBRARIES = libjffs2.a
libjffs2_a_SOURCES =
libjffs2_a_SOURCES += src/jffs2/src/build.c
libjffs2_a_SOURCES += src/jffs2/src/compat-crc32.c
diff --git a/cpukit/libfs/preinstall.am b/cpukit/libfs/preinstall.am
index dba6cc4d81..2aca1ef32f 100644
--- a/cpukit/libfs/preinstall.am
+++ b/cpukit/libfs/preinstall.am
@@ -5,3 +5,20 @@ $(srcdir)/preinstall.am: Makefile.am
$(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
endif
+PREINSTALL_DIRS =
+DISTCLEANFILES = $(PREINSTALL_DIRS)
+
+all-local: $(TMPINSTALL_FILES)
+
+TMPINSTALL_FILES =
+CLEANFILES = $(TMPINSTALL_FILES)
+
+$(PROJECT_LIB)/$(dirstamp):
+ @$(MKDIR_P) $(PROJECT_LIB)
+ @: > $(PROJECT_LIB)/$(dirstamp)
+PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
+
+$(PROJECT_LIB)/libjffs2.a: libjffs2.a $(PROJECT_LIB)/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_LIB)/libjffs2.a
+TMPINSTALL_FILES += $(PROJECT_LIB)/libjffs2.a
+