Simplify lang/objc/self/Makefile, plus it's wrong. :-)

For Makefile.rules, the modification of CFLAGS (addition of -arch $(ARCH) for Darwin) needs to come before
the consuming of CFLAGS, not after.

llvm-svn: 137140
This commit is contained in:
Johnny Chen 2011-08-09 20:07:16 +00:00
parent f60d6df887
commit 53e2edbc5c
2 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
LEVEL = ../../../make
OBJC_SOURCES := main.m
LDFLAGS := $(CFLAGS) -lobjc -framework Foundation
LD_EXTRAS ?= -framework Foundation
include $(LEVEL)/Makefile.rules

View File

@ -38,13 +38,6 @@ endif
#----------------------------------------------------------------------
CFLAGS ?= -gdwarf-2 -O0
CFLAGS += $(FRAMEWORK_INCLUDES)
CXXFLAGS +=$(CFLAGS)
LD = $(CC)
LDFLAGS ?= $(CFLAGS)
LDFLAGS += $(LD_EXTRAS)
OBJECTS =
EXE ?= a.out
ifeq "$(OS)" "Darwin"
CFLAGS += -arch $(ARCH)
DS := /usr/bin/dsymutil
@ -52,6 +45,13 @@ ifeq "$(OS)" "Darwin"
DSYM = $(EXE).dSYM
endif
CXXFLAGS +=$(CFLAGS)
LD = $(CC)
LDFLAGS ?= $(CFLAGS)
LDFLAGS += $(LD_EXTRAS)
OBJECTS =
EXE ?= a.out
ifneq "$(DYLIB_NAME)" ""
ifeq "$(OS)" "Darwin"
DYLIB_FILENAME = lib$(DYLIB_NAME).dylib