blob: 41079b01bb84241f0adc9021f800dbf35b08fc50 [file] [log] [blame]
Vadim Bendebury6d18fd02012-09-27 19:24:07 -07001##
2## This file is part of the coreboot project.
3##
4## Copyright (C) 2012 The ChromiumOS Authors. All rights reserved.
5##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; version 2 of the License.
9##
10## This program is distributed in the hope that it will be useful,
11## but WITHOUT ANY WARRANTY; without even the implied warranty of
12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13## GNU General Public License for more details.
14##
15## You should have received a copy of the GNU General Public License
16## along with this program; if not, write to the Free Software
Patrick Georgib890a122015-03-26 15:17:45 +010017## Foundation, Inc.
Vadim Bendebury6d18fd02012-09-27 19:24:07 -070018##
19
20PROGRAM = cbmem
21ROOT = ../../src
Paul Menzelc3fc1e02013-04-05 11:39:42 +020022CC ?= $(CROSS_COMPILE)gcc
Vadim Bendebury7c6b6bb2012-10-19 10:57:18 -070023CFLAGS ?= -O2
24CFLAGS += -Wall -Werror
Aaron Durbindc9f5cd2015-09-08 13:34:43 -050025CPPFLAGS += -I $(ROOT)/commonlib/include
Vadim Bendebury6d18fd02012-09-27 19:24:07 -070026
27OBJS = $(PROGRAM).o
28
Vadim Bendebury7c6b6bb2012-10-19 10:57:18 -070029all: $(PROGRAM)
Vadim Bendebury6d18fd02012-09-27 19:24:07 -070030
31$(PROGRAM): $(OBJS)
Vadim Bendebury6d18fd02012-09-27 19:24:07 -070032
33clean:
Martin Roth0be83c02015-10-21 14:50:00 -060034 rm -f $(PROGRAM) *.o *~ junit.xml
Vadim Bendebury6d18fd02012-09-27 19:24:07 -070035
36distclean: clean
37 rm -f .dependencies
38
Vadim Bendebury7c6b6bb2012-10-19 10:57:18 -070039.dependencies:
Stefan Taunere978fc22013-06-30 01:05:30 +020040 @$(CC) $(CFLAGS) $(CPPFLAGS) -MM *.c > .dependencies
Vadim Bendebury6d18fd02012-09-27 19:24:07 -070041
Vadim Bendebury7c6b6bb2012-10-19 10:57:18 -070042.PHONY: all clean distclean
Vadim Bendebury6d18fd02012-09-27 19:24:07 -070043
44-include .dependencies
Paul Menzel8ebc72c2014-01-04 12:19:18 +010045