OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 CFLAGS ?= -Wall -Werror -ansi | 5 CFLAGS += -Wall -Werror -ansi |
6 INCLUDES += tests | 6 INCLUDES += -Itests |
7 SUBDIRS = tests | 7 SUBDIRS = tests |
8 | 8 |
9 all: cgpt.a | 9 all: cgpt.a |
10 for i in $(SUBDIRS); do \ | 10 for i in $(SUBDIRS); do \ |
11 ( cd $$i ; $(MAKE)) ; \ | 11 ( cd $$i ; $(MAKE)) ; \ |
12 done | 12 done |
13 | 13 |
14 .c.o: | 14 .c.o: |
15 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ | 15 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ |
16 | 16 |
17 cgpt.a: cgpt.o | 17 cgpt.a: cgptlib.o quick_sort.o crc32.o |
18 » $(AR) rs cgpt.a $< | 18 » $(AR) rs $@ $^ |
19 | 19 |
20 clean: | 20 clean: |
21 for i in $(SUBDIRS); do \ | 21 for i in $(SUBDIRS); do \ |
22 ( $(MAKE) -C $$i clean ) ; \ | 22 ( $(MAKE) -C $$i clean ) ; \ |
23 done | 23 done |
24 » rm -f cgpt cgpt-host *.o *~ *.a | 24 » rm -f *.o *~ *.a |
OLD | NEW |