summaryrefslogtreecommitdiff
path: root/tizen/src/Makefile.tizen
blob: ff9d6e54f7b9e576698712be21ecc36205b6ac2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Makefile.tizen
# for TIZEN-maru board

$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/tizen/src:$(SRC_PATH)/tizen/src/hw:$(SRC_PATH)/tizen/src/skin:$(SRC_PATH)/tizen/src/SDL_gfx)

QEMU_CFLAGS += -I$(SRC_PATH)/hw -I$(SRC_PATH)/tizen/src
QEMU_CFLAGS += $(SDL_CFLAGS)
QEMU_CFLAGS += $(GLIB_CFLAGS)
ifdef CONFIG_DARWIN
QEMU_CFLAGS += -framework Foundation -framework SystemConfiguration
QEMU_CFLAGS += -framework Cocoa -framework QTKit -framework CoreVideo
QEMU_CFLAGS += -framework AppKit
endif
ifndef CONFIG_DEBUG_EXEC
CFLAGS += -g -O2
else
CFLAGS += -g -O0
endif

# codec
#LIBS+= -lavformat-emul -lavcodec-emul -lavresample-emul -lavutil-emul

ifdef CONFIG_WIN32
LIBS += -lcurl -lopengl32 -lglu32 -lgdi32 -lpng14
endif
ifdef CONFIG_LINUX
LIBS += -lcurl -lGL -lXcomposite -lXext -lpng
endif

ifdef CONFIG_DEBUG_EXEC
GL_CFLAGS := -Wall -g -O0 -fno-strict-aliasing
else
GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
endif

#ifndef CONFIG_DARWIN
###########################################################
## Build openGL
# i386
ifdef CONFIG_GL

GL_CUR_PATH = $(SRC_PATH)/tizen/src/hw

GL_CFLAGS += -I$(GL_CUR_PATH) -I$(SRC_PATH)/fpu
GL_CFLAGS += -I$(SRC_PATH)/$(TARGET_NAME)-softmmu $(QEMU_CFLAGS) $(CFLAGS)

parse_gl_h: parse_gl_h.c
	$(CC) -g -o $@ $<
server_stub.c: parse_gl_h
	./parse_gl_h 2>/dev/null
gl_func.h: parse_gl_h
	./parse_gl_h 2>/dev/null
opengl_func.h: gl_func.h
helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c opengl_process.h
	$(CC) $(GL_CFLAGS) $(DEFINES) $(GL_LDFLAGS) -c -o $@ $<
gl_beginend.h: $(GL_CUR_PATH)/beginend_funcs.sh
	$< > $@
mesa_mipmap.o : mesa_mipmap.c
	$(CC) $(GL_CFLAGS) $(DEFINES) $(GL_LDFLAGS) -c -o $@ $<
opengl_exec.o : opengl_exec.c server_stub.c opengl_func.h gl_beginend.h opengl_process.h mesa_mipmap.o
	$(CC) $(GL_CFLAGS) $(DEFINES) $(GL_LDFLAGS) -c -o $@ $<

endif #CONFIG_GL

###########################################################
#endif #!CONFIG_DARWIN

# maru loader
obj-y += emulator.o emul_state.o maru_err_table.o

# osutil
obj-y += osutil.o
ifdef CONFIG_LINUX
obj-y += osutil-linux.o
endif
ifdef CONFIG_WIN32
obj-y += osutil-win32.o
endif
ifdef CONFIG_DARWIN
obj-y += osutil-darwin.o
endif

# maru display
obj-y += maru_display.o
ifdef CONFIG_USE_SHM
obj-y += maru_shm.o
else
obj-y += maru_sdl.o maru_finger.o
endif

# sdb
obj-y += sdb.o

# mloop event
obj-y += mloop_event.o

# NSRunLoop on Mac
ifdef CONFIG_DARWIN
obj-y += ns_event.o
endif

# debug channel
obj-y += debug_ch.o

# ECS
include $(SRC_PATH)/tizen/src/ecs/Makefile.tizen

# tethering
include $(SRC_PATH)/tizen/src/tethering/Makefile.tizen

# maru hardware
include $(SRC_PATH)/tizen/src/Makefile.tizen.$(TARGET_BASE_ARCH)

obj-y += maru_brightness.o
obj-y += maru_virtio_touchscreen.o
#obj-y += maru_usb_touchscreen.o
obj-y += maru_virtio_keyboard.o
obj-y += maru_virtio_hwkey.o
obj-y += maru_virtio_evdi.o
obj-y += maru_virtio_sensor.o
obj-y += maru_virtio_nfc.o
obj-y += maru_virtio_jack.o
obj-y += maru_virtio_power.o
obj-y += maru_virtio_esm.o
#obj-y += maru_brill_codec.o
obj-$(CONFIG_LIBAV) += maru_brill_codec.o

obj-$(CONFIG_PCI) += maru_camera_common_pci.o
obj-$(CONFIG_LINUX) += maru_camera_linux_pci.o
obj-$(CONFIG_WIN32) += maru_camera_win32_pci.o
obj-$(CONFIG_DARWIN) += maru_camera_darwin_converter.o
obj-$(CONFIG_DARWIN) += maru_camera_darwin_pci.o
obj-$(CONFIG_DARWIN) += emul_state_darwin.o

ifdef CONFIG_LINUX # libs for maru camera on linux host
LIBS += -lv4l2 -lv4lconvert
endif

ifdef CONFIG_WIN32 # libs for maru camera on windows host
LIBS += -lole32 -loleaut32 -luuid -lstrmiids
endif

# maru skin
obj-y += maruskin_client.o maruskin_server.o maruskin_operation.o maruskin_keymap.o

# guest server
obj-y += guest_server.o

#ifndef CONFIG_DARWIN
###########################################################
## opengl library for i386
obj-$(CONFIG_GL) += virtio-gl.o
obj-$(CONFIG_GL) += helper_opengl.o opengl_exec.o mesa_mipmap.o
obj-$(CONFIG_NO_GL) += virtio-gl-stub.o
obj-y += gloffscreen_test.o gloffscreen_xcomposite.o gloffscreen_common.o gloffscreen_wgl.o gloffscreen_agl.o
###########################################################
#endif