Skip to content

Commit

Permalink
Some maintenance changes to test Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
PureAbstract committed Jun 9, 2012
1 parent 36fc549 commit 20a1932
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/Makefile
Expand Up @@ -16,20 +16,21 @@ BINDIR=$(BUILDDIR)/bin
OBJDIR=$(BUILDDIR)/obj
DIRS = $(BUILDDIR) $(BINDIR) $(OBJDIR)

## Search Paths
vpath %.m $(SOURCE_DIRS)
vpath %.mm $(SOURCE_DIRS)
vpath %.h $(SOURCE_DIRS)
vpath %.o $(OBJDIR)

OCFLAGS= -Wextra -Wall
## Rules
MMFRAMEWORKS=$(foreach framework,$(FRAMEWORKS),-framework $(framework))
INCLUDES=$(foreach include,$(INCLUDE_DIRS),-I $(include))
LIBRARIES=$(foreach lib,$(LIBS),-l$(lib))
COMPILE.objc = gcc $(OCFLAGS) $(INCLUDES) -x objective-c -c -o $@ $<
COMPILE.objcxx = gcc $(OCFLAGS) $(INCLUDES) -x objective-c++ -c -o $@ $<
LINK.objc = gcc $(MMFRAMEWORKS)
LINK.objcxx = $(LINK.objc) $(LIBRARIES) -o $@ $^
OCFRAMEWORKS=$(foreach framework,$(FRAMEWORKS),-framework $(framework))
OCINCLUDES=$(foreach include,$(INCLUDE_DIRS),-I $(include))
OCLIBS=$(foreach lib,$(LIBS),-l$(lib))
COMPILE.objc = gcc $(OCFLAGS) $(OCINCLUDES) -x objective-c -c -o $@ $<
COMPILE.objcxx = gcc $(OCFLAGS) $(OCINCLUDES) -x objective-c++ -c -o $@ $<
LINK.objc = gcc $(OCFRAMEWORKS)
LINK.objcxx = $(LINK.objc) $(OCLIBS) -o $@ $^

$(OBJDIR)/%.o: %.mm
$(COMPILE.objcxx)
Expand Down

0 comments on commit 20a1932

Please sign in to comment.