staging: emgd: experimental build 2667
[profile/ivi/intel-emgd-kmod.git] / pvr / services4 / srvkm / env / linux / kbuild / Makefile
1 #
2 # Copyright (c) Imagination Technologies Ltd.
3 #
4 # Permission is hereby granted, free of charge, to any person obtaining a copy
5 # of this software and associated documentation files (the "Software"), to deal
6 # in the Software without restriction, including without limitation the rights
7 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 # copies of the Software, and to permit persons to whom the Software is
9 # furnished to do so, subject to the following conditions:
10 #
11 # The above copyright notice and this permission notice shall be included in
12 # all copies or substantial portions of the Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 # THE SOFTWARE. 
21
22 #
23
24 MODULE          ?= pvrsrvkm
25
26 MODULE_CFLAGS = 
27
28 ifeq ($(PVR_KBUILD_IN_KERNEL),1)
29 # PVRKROOT is the relative path to the PVR sources.
30 # DRVKROOT should point to the non-PVR sources, if any.
31 PVRKROOT ?= .
32 KBUILDROOT      = $(PVRKROOT)/services4
33 else
34 KBUILDROOT      = ../../../..
35 endif
36
37 clean-dirs :=
38
39 INCLUDES =      -I$(EURASIAROOT)/include4 \
40                         -I$(EURASIAROOT)/services4/include \
41                         -I$(EURASIAROOT)/services4/srvkm/env/linux \
42                         -I$(EURASIAROOT)/services4/srvkm/include \
43                         -I$(EURASIAROOT)/services4/srvkm/bridged \
44                         -I$(EURASIAROOT)/services4/system/include \
45                         -I$(EURASIAROOT)/services4/system/plb \
46                         -I$(EURASIAROOT)/services4/system/tnc 
47
48
49 SOURCES       = $(KBUILDROOT)/srvkm/env/linux/osfunc.c \
50                                 $(KBUILDROOT)/srvkm/env/linux/mutils.c \
51                                 $(KBUILDROOT)/srvkm/env/linux/mmap.c \
52                                 $(KBUILDROOT)/srvkm/env/linux/module.c \
53                                 $(KBUILDROOT)/srvkm/env/linux/pdump.c \
54                                 $(KBUILDROOT)/srvkm/env/linux/proc.c \
55                                 $(KBUILDROOT)/srvkm/env/linux/pvr_bridge_k.c \
56                                 $(KBUILDROOT)/srvkm/env/linux/pvr_debug.c \
57                                 $(KBUILDROOT)/srvkm/env/linux/mm.c \
58                                 $(KBUILDROOT)/srvkm/env/linux/mutex.c \
59                                 $(KBUILDROOT)/srvkm/env/linux/event.c \
60                                 $(KBUILDROOT)/srvkm/env/linux/osperproc.c
61
62 SOURCES      += $(KBUILDROOT)/srvkm/common/buffer_manager.c \
63                                 $(KBUILDROOT)/srvkm/common/devicemem.c \
64                                 $(KBUILDROOT)/srvkm/common/deviceclass.c \
65                                 $(KBUILDROOT)/srvkm/common/handle.c \
66                                 $(KBUILDROOT)/srvkm/common/hash.c \
67                                 $(KBUILDROOT)/srvkm/common/metrics.c \
68                                 $(KBUILDROOT)/srvkm/common/pvrsrv.c \
69                                 $(KBUILDROOT)/srvkm/common/queue.c \
70                                 $(KBUILDROOT)/srvkm/common/ra.c \
71                                 $(KBUILDROOT)/srvkm/common/resman.c \
72                                 $(KBUILDROOT)/srvkm/common/power.c \
73                                 $(KBUILDROOT)/srvkm/common/mem.c \
74                                 $(KBUILDROOT)/srvkm/common/pdump_common.c \
75                                 $(KBUILDROOT)/srvkm/bridged/bridged_support.c \
76                                 $(KBUILDROOT)/srvkm/bridged/bridged_pvr_bridge.c \
77                                 $(KBUILDROOT)/srvkm/common/perproc.c \
78                                 $(KBUILDROOT)/../services4/system/plb/sysconfig.c \
79                                 $(KBUILDROOT)/../services4/system/tnc/sysconfig.c \
80                                 $(KBUILDROOT)/../services4/system/common/sysconfig.c \
81                                 $(KBUILDROOT)/../services4/system/common/sysutils.c \
82                                 $(KBUILDROOT)/srvkm/common/lists.c \
83                                 $(KBUILDROOT)/srvkm/common/mem_debug.c
84
85 INCLUDES += -I$(EURASIAROOT)/services4/srvkm/hwdefs 
86
87 SYM_VERS_DEPS = $(EURASIAROOT)/tools/intern/debug/dbgdriv/linux
88
89
90 #
91 # Device dependent
92 #
93
94 ifeq ($(SUPPORT_SGX), 1)
95
96 INCLUDES        +=      -I$(EURASIAROOT)/services4/srvkm/bridged/sgx \
97                                 -I$(EURASIAROOT)/services4/srvkm/devices/sgx
98
99 SOURCES         +=      $(KBUILDROOT)/srvkm/bridged/sgx/bridged_sgx_bridge.c \
100                                 $(KBUILDROOT)/srvkm/devices/sgx/sgxinit.c \
101                                 $(KBUILDROOT)/srvkm/devices/sgx/sgxpower.c \
102                                 $(KBUILDROOT)/srvkm/devices/sgx/sgxreset.c \
103                                 $(KBUILDROOT)/srvkm/devices/sgx/sgxutils.c \
104                                 $(KBUILDROOT)/srvkm/devices/sgx/sgxkick.c \
105                                 $(KBUILDROOT)/srvkm/devices/sgx/sgxtransfer.c \
106                                 $(KBUILDROOT)/srvkm/devices/sgx/mmu.c \
107                                 $(KBUILDROOT)/srvkm/devices/sgx/pb.c
108
109 else  
110
111 ifeq ($(SUPPORT_VGX), 1)
112
113 INCLUDES        +=      -I$(EURASIAROOT)/services4/srvkm/bridged/vgx \
114                                 -I$(EURASIAROOT)/services4/srvkm/devices/vgx
115
116 #FIXME: We need to cerate a subset of vgxdefs.h from $(EURASIAROOT)/hwdefs 
117 # and put it into srvkm/hwdefs for GPL compliance
118 INCLUDES        +=      -I$(EURASIAROOT)/hwdefs
119
120 SOURCES         +=      $(KBUILDROOT)/srvkm/bridged/vgx/bridged_vgx_bridge.c \
121                                 $(KBUILDROOT)/srvkm/devices/vgx/vgxinit.c \
122                                 $(KBUILDROOT)/srvkm/devices/vgx/vgxreset.c \
123                                 $(KBUILDROOT)/srvkm/devices/vgx/mmu.c \
124                                 $(KBUILDROOT)/srvkm/devices/vgx/pb.c \
125                                 $(KBUILDROOT)/srvkm/env/linux/pdump_vgx.c
126 endif
127
128 endif # SUPPORT_SGX
129
130 ifeq ($(SUPPORT_DRI_DRM),1)
131         SOURCES += $(KBUILDROOT)/srvkm/env/linux/pvr_drm.c
132         INCLUDES += -I$(KERNELDIR)/include/drm \
133                 -I$(EURASIAROOT)/services4/include/env/linux
134
135 ifneq ("$(DISPLAY_CONTROLLER_DIR)","")
136 include $(EURASIAROOT)/services4/$(DISPLAY_CONTROLLER_DIR)/makefile.linux.common
137 endif
138
139 ifeq ($(PDUMP),1)
140 include $(EURASIAROOT)/tools/intern/debug/dbgdriv/linux/makefile.linux.common
141 endif
142
143 endif
144
145 ifeq ($(PVR_MODULE_TEST),1)
146 INCLUDES += -I$(EURASIAROOT)/moduletests/include
147 SOURCES  += $(KBUILDROOT)/../moduletests/services_test/kern_test.c
148 SYS_CFLAGS += -DMODULE_TEST
149 endif
150
151 include $(EURASIAROOT)/eurasiacon/build/linux/kbuild/Makefile.kbuild_subdir_common