Don't look up pid/tid on YAGL_LOG_FUNC_SET
[sdk/emulator/qemu.git] / tizen / src / Makefile
1 EMUL_DIR=../emulator
2
3 ifeq ($(CC),"")
4         @echo "cc does not exist"
5         @exit 1
6 endif
7
8 ifndef TIZEN_SDK_DEV_PATH
9 TIZEN_SDK_DEV_PATH=${HOME}/tizen-sdk-dev
10 endif
11
12 ifneq ($(wildcard ../../config-host.mak),)
13 include ../../config-host.mak
14
15 TARGET_EXE +=
16 TARGET_DSO +=
17
18 all: qemu $(TARGET_EXE) $(TARGET_DSO)
19 qemu: build_info
20         cd ../../ && $(MAKE)
21 qemu_clean:
22         cd ../../ && $(MAKE) clean
23 qemu_distclean:
24         cd ../../ && $(MAKE) distclean
25
26 build_info:
27         @echo "Generate a build information file"
28         @echo "/* Automatically generated by Makefile - do not modify! */" > build_info.h
29         @echo "static const char build_version[] = \"`cat VERSION`\";" >> build_info.h
30         @echo "static const char build_date[] = \"`date +"%F %T %Z"`\";" >> build_info.h
31         @echo "static const char pkginfo_version[] = \"`sed -n '1p' ./../../package/pkginfo.manifest | sed 's/\"//g'`\";" >> build_info.h
32         @echo "static const char pkginfo_maintainer[] = \"`sed -n '2p' ./../../package/pkginfo.manifest | sed 's/\"//g'`\";" >> build_info.h
33         @echo "static const char pkginfo_githead[] = \"`git rev-parse HEAD`\";" >> build_info.h
34         @echo "static const char latest_gittag[] = \"`git for-each-ref --count=1 --sort=-taggerdate refs/tags/ --format='Latest Git Tag : %(refname:short) (%(subject))' | sed 's/\"//g'`\";" >> build_info.h
35
36
37 clean: qemu_clean
38         rm -rf ../emulator/
39 distclean: clean qemu_distclean
40
41 install: all
42         mkdir -p $(EMUL_DIR)/bin
43         mkdir -p $(EMUL_DIR)/etc
44         mkdir -p $(EMUL_DIR)/data
45         mkdir -p $(EMUL_DIR)/icons
46         mkdir -p $(EMUL_DIR)/images
47
48         @echo "Copying emulator binary"
49         cp -pP $(SRC_PATH)/x86_64-softmmu/qemu-system-x86_64$(EXESUF) $(EMUL_DIR)/bin/emulator-x86_64$(EXESUF)
50
51         @echo "Copying bioses to $(EMUL_DIR)/data/bios"
52         mkdir -p $(EMUL_DIR)/data/bios
53         cp -pP ../../pc-bios/bios-256k.bin $(EMUL_DIR)/data/bios
54         cp -pP ../../pc-bios/linuxboot.bin $(EMUL_DIR)/data/bios
55         cp -pP ../../pc-bios/linuxboot_dma.bin $(EMUL_DIR)/data/bios
56         cp -pP ../../pc-bios/efi-virtio.rom $(EMUL_DIR)/data/bios
57         cp -pP ../../pc-bios/acpi-dsdt.aml $(EMUL_DIR)/data/bios
58
59         cp -pP scripts/emulator.sh $(EMUL_DIR)/bin
60 ifdef CONFIG_WIN32
61         cp -pP scripts/emulator.cmd $(EMUL_DIR)/bin
62 endif
63
64 ifdef CONFIG_QT
65         cp -pP ui/resource/images/display_off_guide.png $(EMUL_DIR)/images
66         cp -pP ui/resource/images/about_bg.png $(EMUL_DIR)/images
67 ifdef CONFIG_DARWIN
68         cp -pP ui/resource/icons/emulator_icon.ico $(EMUL_DIR)/icons
69 endif
70 endif
71
72 # Enable vhost-net on Linux
73 ifdef CONFIG_LINUX
74         cp -pP ../supplements/SDK/tizen-vhost-net $(EMUL_DIR)/etc
75         cp -pP ../supplements/SDK/45-tizen-vhost-net.rules $(EMUL_DIR)/etc
76 endif
77
78 # Enable USB pass-through on Linux
79 ifeq ($(CONFIG_LINUX)$(CONFIG_TIZENUSB),yy)
80         cp -pP ../supplements/SDK/tizen-usb $(EMUL_DIR)/etc
81         cp -pP ../supplements/SDK/45-tizen-usb.rules $(EMUL_DIR)/etc
82 endif
83
84 # give a title name for sdb terminal.
85 ifdef CONFIG_DARWIN
86         cp -pP scripts/sdbscript $(EMUL_DIR)/bin
87 endif
88
89 # for bridged network
90 ifdef CONFIG_LINUX
91         cp -pP scripts/emulator-ifup-linux.sh $(EMUL_DIR)/etc/emulator-ifup.sh
92         cp -pP ../supplements/SDK/tizen-sudoers.rules $(EMUL_DIR)/etc
93 endif
94 ifdef CONFIG_DARWIN
95         cp -pP scripts/emulator-ifup-darwin.sh $(EMUL_DIR)/etc/emulator-ifup.sh
96 endif
97
98 else
99 all:
100         @echo "Please call configure before running make!"
101         @exit 1
102 endif