Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 TARGET = unit_test | |
| 6 OBJECTS = main.o | |
| 7 INCLUDES = -I$(GCLIENT_ROOT)/src/common | |
| 8 OPTIONS = -fprofile-arcs -ftest-coverage -fno-inline -O0 | |
| 9 LIBS = -lgtest | |
| 10 PACKAGES = | |
| 11 | |
| 12 all: $(TARGET) | |
| 13 | |
| 14 $(TARGET): $(OBJECTS) | |
|
kmixter1
2010/04/09 22:07:23
As Darin mentioned, our current thinking on how to
| |
| 15 $(CXX) $(CXXFLAGS) $(OPTIONS) $(LDFLAGS) $(PACKAGES) $(OBJECTS) $(LIBS) \ | |
| 16 -o $(TARGET) | |
| 17 | |
| 18 -include $(OBJS:.o=.d) | |
| 19 | |
| 20 .cc.o: | |
| 21 $(CXX) $(CXXFLAGS) $(PACKAGES) $(OPTIONS) $(INCLUDES) -c $< -o $@ | |
| 22 $(CXX) -MM $(CXXFLAGS) $(PACKAGES) $(OPTIONS) $(INCLUDES) $< > $*.d | |
| 23 @mv -f $*.d $*.d.tmp | |
| 24 @sed -e 's|.*:|$*.o|' < $*.d.tmp > $*.d | |
| 25 @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -l | \ | |
| 26 sed -e 's/^ *//' -e 's/$$/:/' >> $*.d | |
| 27 @rm -f $*.d.tmp | |
| 28 | |
| 29 clean: | |
| 30 $(RM) *.o *.d $(TARGET) | |
| 31 | |
| OLD | NEW |