[Lldb-commits] [lldb] r155520 - /lldb/trunk/examples/darwin/heap_find/Makefile

Greg Clayton gclayton at apple.com
Tue Apr 24 18:19:20 PDT 2012


Author: gclayton
Date: Tue Apr 24 20:19:20 2012
New Revision: 155520

URL: http://llvm.org/viewvc/llvm-project?rev=155520&view=rev
Log:
Make the Makefile stand alone.


Modified:
    lldb/trunk/examples/darwin/heap_find/Makefile

Modified: lldb/trunk/examples/darwin/heap_find/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/darwin/heap_find/Makefile?rev=155520&r1=155519&r2=155520&view=diff
==============================================================================
--- lldb/trunk/examples/darwin/heap_find/Makefile (original)
+++ lldb/trunk/examples/darwin/heap_find/Makefile Tue Apr 24 20:19:20 2012
@@ -1,7 +1,48 @@
-LEVEL = ../../../test/make
+#----------------------------------------------------------------------
+# Fill in the source files to build
+#----------------------------------------------------------------------
+# Uncomment line below for debugging shell commands
+# SHELL = /bin/sh -x
+
+#----------------------------------------------------------------------
+# Change any build/tool options needed
+#----------------------------------------------------------------------
+DS := /usr/bin/dsymutil
+CFLAGS ?=-arch x86_64 -arch i386 -gdwarf-2 -O0
+CPLUSPLUSFLAGS +=$(CFLAGS)
+CPPFLAGS +=$(CFLAGS)
+LDFLAGS = $(CFLAGS) -install_name "@executable_path/libheap.dylib" -dynamiclib
+CXX := $(shell xcrun -find clang++)
+LD := $(CXX)
+TEMPS =
+EXE=libheap.dylib
+DSYM=$(EXE).dSYM
+
+#----------------------------------------------------------------------
+# Make the dSYM file from the executable
+#----------------------------------------------------------------------
+$(DSYM) : $(EXE)
+	$(DS) -o "$(DSYM)" "$(EXE)"
+
+#----------------------------------------------------------------------
+# Compile the executable from all the objects (default rule) with no
+# dsym file.
+#----------------------------------------------------------------------
+$(EXE) : heap_find.o
+	$(LD) $(LDFLAGS) heap_find.o -o "$(EXE)"
+
+heap_find.o : heap_find.cpp
+	$(CXX) $(CFLAGS) -c heap_find.cpp
+
+#----------------------------------------------------------------------
+# Include all of the makefiles for each source file so we don't have
+# to manually track all of the prerequisites for each source file.
+#----------------------------------------------------------------------
+.PHONY: clean
+dsym:	$(DSYM)
+all:	$(EXE) $(DSYM)
+clean:
+	rm -rf "$(EXE)" "$(DSYM)" heap_find.o $(TEMPS)
+
 
-DYLIB_NAME := heap
-DYLIB_ONLY := YES
-DYLIB_CXX_SOURCES := heap_find.cpp
 
-include $(LEVEL)/Makefile.rules





More information about the lldb-commits mailing list