summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-01-14 21:55:29 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-01-14 21:55:29 +0000
commitded0a2c05ae39063bcd605a42baf7f3b61b77f7d (patch)
tree8b1ae7a2ecd4131dccbc22952fe4e7a7ac36861f
parentb884000ba92e5ed86fd0921c3f16548541be8c5f (diff)
downloadbcm5719-llvm-ded0a2c05ae39063bcd605a42baf7f3b61b77f7d.tar.gz
bcm5719-llvm-ded0a2c05ae39063bcd605a42baf7f3b61b77f7d.zip
Converted to use Makefile.rules.
llvm-svn: 123471
-rw-r--r--lldb/test/objc/Makefile125
1 files changed, 3 insertions, 122 deletions
diff --git a/lldb/test/objc/Makefile b/lldb/test/objc/Makefile
index 8f493dd69a4..c4d187633a4 100644
--- a/lldb/test/objc/Makefile
+++ b/lldb/test/objc/Makefile
@@ -1,125 +1,6 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=
-CXX_SOURCES :=
-OBJC_SOURCES :=main.m
-OBJCXX_SOURCES :=
+LEVEL = ../make
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -g -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
+OBJC_SOURCES := main.m
LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-$(DSYM) : $(EXE)
- $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# 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.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
-
+include $(LEVEL)/Makefile.rules
OpenPOWER on IntegriCloud