Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / lib / libbootmsg / Makefile
1 # *****************************************************************************
2 # * Copyright (c) 2004, 2008 IBM Corporation
3 # * All rights reserved.
4 # * This program and the accompanying materials
5 # * are made available under the terms of the BSD License
6 # * which accompanies this distribution, and is available at
7 # * http://www.opensource.org/licenses/bsd-license.php
8 # *
9 # * Contributors:
10 # *     IBM Corporation - initial implementation
11 # ****************************************************************************/
12
13 TOPCMNDIR ?= ../..
14
15 include $(TOPCMNDIR)/make.rules
16
17 ASFLAGS = $(FLAG) $(RELEASE) $(CPUARCHDEF) -Wa,-mregnames
18 CPPFLAGS = -I../libc/include $(CPUARCHDEF) -I$(INCLBRDDIR) -I. -I../../include
19 LDFLAGS = -nostdlib
20
21 TARGET = ../libbootmsg.a
22
23
24 all: $(TARGET)
25
26 ifeq ($(CPUARCH),cbea)
27 SRCS =
28 SRCSS = bootmsg_lvl.S
29 else 
30 ifeq ($(CPUARCH),ppc970)
31 SRCS =
32 SRCSS = bootmsg_lvl.S
33 else 
34 ifeq ($(CPUARCH),p5)
35 SRCS =
36 SRCSS = bootmsg_lvl.S
37 else
38 ifeq ($(CPUARCH),ppcp7)
39 SRCS =
40 SRCSS = bootmsg_lvl.S
41 else
42 SRCS = bootmsg.c
43 SRCSS = 
44 endif
45 endif
46 endif
47 endif
48
49 OBJS = $(SRCS:%.c=%.o) $(SRCSS:%.S=%.o)
50
51 $(TARGET): $(OBJS)
52         $(AR) -rc $@ $(OBJS)
53         $(RANLIB) $@
54
55 %.o: %.S
56         $(CC) $(CPPFLAGS) $(ASFLAGS) -c $< -o $@
57
58 clean:
59         $(RM) $(TARGET) $(OBJS)
60
61 distclean: clean
62         $(RM) Makefile.dep
63
64
65 # Rules for creating the dependency file:
66 depend:
67         $(RM) Makefile.dep
68         $(MAKE) Makefile.dep
69
70 Makefile.dep: Makefile
71         $(CC) -MM $(CPPFLAGS) $(CFLAGS) $(SRCS) $(SRCSS) > Makefile.dep
72
73 # Include dependency file if available:
74 -include Makefile.dep
75