Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / lib / libvirtio / 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) \
19            -I$(INCLCMNDIR) -I$(INCLCMNDIR)/$(CPUARCH)
20 LDFLAGS = -nostdlib
21
22 TARGET = ../libvirtio.a
23
24
25 all: $(TARGET)
26
27 SRCS =  virtio.c virtio-blk.c p9.c virtio-9p.c virtio-scsi.c virtio-net.c
28
29 OBJS = $(SRCS:%.c=%.o)
30
31 $(TARGET): $(OBJS)
32         $(AR) -rc $@ $(OBJS)
33         $(RANLIB) $@
34
35 %.o: %.S
36         $(CC) $(CPPFLAGS) $(ASFLAGS) -c $< -o $@
37
38 clean:
39         $(RM) $(TARGET) $(OBJS)
40
41 distclean: clean
42         $(RM) Makefile.dep
43
44
45 # Rules for creating the dependency file:
46 depend:
47         $(RM) Makefile.dep
48         $(MAKE) Makefile.dep
49
50 Makefile.dep: Makefile
51         $(CC) -M $(CPPFLAGS) $(CFLAGS) $(SRCS) $(SRCSS) > Makefile.dep
52
53 # Include dependency file if available:
54 -include Makefile.dep
55