-LEVEL = ../..
-include $(LEVEL)/Makefile.common
+##===- tools/opt/Makefile ----------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL := ../..
+TOOLNAME := opt
+LINK_COMPONENTS := bitreader bitwriter asmparser irreader instrumentation scalaropts objcarcopts ipo vectorize all-targets codegen
-all:: opt
-clean ::
- rm -f opt
+# Support plugins.
+NO_DEAD_STRIP := 1
-opt : $(ObjectsG) ../../lib/Optimizations/Debug/libopt.a
- $(LinkG) -o $@ $(ObjectsG) -lopt -lbcreader -lbcwriter \
- -lasmwriter -lanalysis -lvmcore -lsupport
+include $(LEVEL)/Makefile.common