rootdev: link against librootdev

We create a lib out of rootdev.c, so have our main program use it rather
than duplicate the code in the main program.

TEST=`emerge-x86-alex rootdev` still works and rootdev is linked against the prog (and works)

Change-Id: If649007ddb9499f2217ad0af3f1d30115587dd3d
Reviewed-by: Liam McLoughlin <>
Commit-Queue: Mike Frysinger <>
Tested-by: Mike Frysinger <>
diff --git a/Makefile b/Makefile
index f50a96e..ed0bbc2 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
 all: $(OUT)/rootdev $(OUT)/
-$(OUT)/rootdev: rootdev.c main.c
+$(OUT)/rootdev: main.c $(OUT)/
 	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -O2 -Wall
 $(OUT)/ rootdev.c