summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 17 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 873a392..75d0702 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,19 @@
+# Copyright (C) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
-rootdev : rootdev.c
+all: rootdev librootdev.so.1.0
-.PHONY: clean clobber
-clean clobber:
- rm -f rootdev
+rootdev: rootdev.c main.c
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -O2 -Wall
+
+librootdev.so.1.0: rootdev.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -fPIC \
+ -Wl,-soname,librootdev.so.1 $< -o $@
+ ln -s $@ librootdev.so.1
+ ln -s $@ librootdev.so
+
+clean:
+ rm -f rootdev librootdev.so*
+
+.PHONY: clean