Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / openbios / arch / unix / plugins / plugin_qt / Makefile
1
2 include         ../../../../config/Makefile.top
3
4 PLUGINS         = plugin_qt.so
5
6 QMAKE           = qmake
7 PLUGINDIR       = $(shell cd .. ; pwd )
8 TOPDIR          = $(shell cd $(top_srcdir) ; pwd)
9 ABSOINC         = $(shell cd $(ARCHINCLUDES) 2> /dev/null ; pwd )
10
11 export PLUGINDIR TOPDIR ABSOINC
12
13 qt_rom.fc: qt_rom.fs
14         $(TOKE) -v qt_rom.fs
15
16 fcode.h: qt_rom.fc
17         @echo "static const u8 qt_fcode[] = {" > $@
18         @cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
19                 | sed 's/0x  ,//g' >> $@
20         @echo "};" >> $@
21
22 $(ODIR)/makefile.qmake: plugin_qt.pro Makefile
23         @test -d $(ODIR) || $(INSTALL) -d $(ODIR)
24         @test -d $(ODIR)/qbuild || $(INSTALL) -d $(ODIR)/qbuild
25         @cp plugin_qt.pro $(ODIR)/
26         cd $(ODIR) ; $(QMAKE) -o makefile.qmake
27
28 $(ODIR)/plugin_qt.so: fcode.h $(ODIR)/makefile.qmake $(wildcard *.cpp)
29         cd $(ODIR) ; $(MAKE) -f makefile.qmake
30         @ln -f $(ODIR)/qbuild/plugin_qt.so $@
31
32 clean-local:
33         @rm -f $(ODIR)/makefile.qmake
34         @rm -rf $(QBUILDDIR) $(ODIR)/*.fc $(ODIR)/fcode.h
35
36 include         ../Rules.plugin
37 include         $(rules)/Rules.make