build: make several base functions as a library

Let's make a library and relocate functions for other tools like fsck.f2fs.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
diff --git a/.gitignore b/.gitignore
index 9d86ca4..76473a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,20 +1,47 @@
+.*
 *~
 *.[ao]
 *.orig
 *.tar.*
+*.s
+*.lo
+*.la
+*.so
+*.so.dbg
+*.mod.c
+*.lst
+*.orig
+*.rej
 
-.deps/
-.libs/
+CVS
+!.gitignore
+tags
+TAGS
+GPATH
+GRTAGS
+GSYMS
+GTAGS
 
+#
+# Generated files
+#
+compile
+install-sh
+missing
+depcomp
+INSTALL
+aclocal.m4
+autoconf-[0-9].*
+autom4te.cache
+build-aux
 Makefile
 Makefile.in
-
-/aclocal.m4
-/autom4te.cache/
-/build-aux/
-/config.*
-/configure*
-/stamp-h1
+config.*
+configure
+configure.scan
+ltmain.sh
+libtool
+stamp-h
+stamp-h1
 
 /mkfs/mkfs.f2fs
-