mb/google/poppy/variants/nocturne: Add DMIC properties to ACPI DSD
[coreboot.git] / util / k8resdump / Makefile
blobe2603511fa659c423613c7c513ddc51cbc0c0ed1
1 ##
2 ## Makefile for k8resdump utility
3 ##
4 ## (C) 2005 coresystems GmbH
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.
16 PROGRAM = k8resdump
18 CC = gcc
19 INSTALL = /usr/bin/install
20 PREFIX = /usr/local
21 #CFLAGS = -O2 -g -Wall -Werror
22 CFLAGS = -Os -Wall -Werror
23 OS_ARCH = $(shell uname)
24 ifeq ($(OS_ARCH), SunOS)
25 LDFLAGS = -lpci
26 else
27 LDFLAGS = -lpci -lz -static
28 endif
30 OBJS = k8resdump.o
32 all: pciutils dep $(PROGRAM)
34 $(PROGRAM): $(OBJS)
35 $(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
37 clean:
38 rm -f *.o *~
40 distclean: clean
41 rm -f $(PROGRAM) .dependencies
43 dep:
44 @$(CC) -MM *.c > .dependencies
46 pciutils:
47 @echo; echo -n "Checking for pciutils and zlib... "
48 @$(shell ( echo "#include <pci/pci.h>"; \
49 echo "struct pci_access *pacc;"; \
50 echo "int main(int argc, char **argv)"; \
51 echo "{ pacc = pci_alloc(); return 0; }"; ) > .test.c )
52 @$(CC) $(CFLAGS) .test.c -o .test $(LDFLAGS) &>/dev/null && \
53 echo "found." || ( echo "not found."; echo; \
54 echo "Please install pciutils-devel and zlib-devel."; \
55 echo "See README for more information."; echo; \
56 rm -f .test.c .test; exit 1)
57 @rm -f .test.c .test
59 .PHONY: all clean distclean dep pciutils
61 -include .dependencies