1d6c0b56eSmrg#  Copyright 2005 Adam Jackson.
2d6c0b56eSmrg#  Copyright 2005 Red Hat, Inc.
3d6c0b56eSmrg#
4d6c0b56eSmrg#  Permission is hereby granted, free of charge, to any person obtaining a
5d6c0b56eSmrg#  copy of this software and associated documentation files (the "Software"),
6d6c0b56eSmrg#  to deal in the Software without restriction, including without limitation
7d6c0b56eSmrg#  on the rights to use, copy, modify, merge, publish, distribute, sub
8d6c0b56eSmrg#  license, and/or sell copies of the Software, and to permit persons to whom
9d6c0b56eSmrg#  the Software is furnished to do so, subject to the following conditions:
10d6c0b56eSmrg#
11d6c0b56eSmrg#  The above copyright notice and this permission notice (including the next
12d6c0b56eSmrg#  paragraph) shall be included in all copies or substantial portions of the
13d6c0b56eSmrg#  Software.
14d6c0b56eSmrg#
15d6c0b56eSmrg#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16d6c0b56eSmrg#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17d6c0b56eSmrg#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
18d6c0b56eSmrg#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19d6c0b56eSmrg#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20d6c0b56eSmrg#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21d6c0b56eSmrg
22d6c0b56eSmrg
23d6c0b56eSmrg# this is obnoxious:
24d6c0b56eSmrg# -module lets us name the module exactly how we want
25d6c0b56eSmrg# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
26d6c0b56eSmrg# _ladir passes a dummy rpath to libtool so the thing will actually link
27d6c0b56eSmrg# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
28d6c0b56eSmrg
29d6c0b56eSmrgamdgpu_drv_la_LIBADD = $(LIBDRM_AMDGPU_LIBS) $(GBM_LIBS)
30d6c0b56eSmrg
31d6c0b56eSmrgAMDGPU_KMS_SRCS=amdgpu_bo_helper.c amdgpu_dri2.c amdgpu_dri3.c amdgpu_drm_queue.c \
32d6c0b56eSmrg	amdgpu_kms.c amdgpu_present.c amdgpu_sync.c drmmode_display.c
33d6c0b56eSmrg
34d6c0b56eSmrgAM_CFLAGS = \
35d6c0b56eSmrg            @GBM_CFLAGS@ \
36d6c0b56eSmrg            @LIBDRM_AMDGPU_CFLAGS@ \
37d6c0b56eSmrg            @XORG_CFLAGS@ \
38d6c0b56eSmrg            @LIBUDEV_CFLAGS@
39d6c0b56eSmrg
40d6c0b56eSmrgif LIBUDEV
41d6c0b56eSmrgamdgpu_drv_la_LIBADD += $(LIBUDEV_LIBS)
42d6c0b56eSmrgendif
43d6c0b56eSmrg
44d6c0b56eSmrgamdgpu_drv_la_LTLIBRARIES = amdgpu_drv.la
45d6c0b56eSmrgamdgpu_drv_la_LDFLAGS = -module -avoid-version
46d6c0b56eSmrgamdgpu_drv_ladir = @moduledir@/drivers
47d6c0b56eSmrgamdgpu_drv_la_SOURCES = \
48d6c0b56eSmrg	amdgpu_video.c \
49d6c0b56eSmrg	amdgpu_misc.c amdgpu_probe.c \
50d6c0b56eSmrg	$(AMDGPU_KMS_SRCS)
51d6c0b56eSmrg
52d6c0b56eSmrgAM_CFLAGS += @LIBGLAMOR_CFLAGS@
53d6c0b56eSmrgamdgpu_drv_la_LIBADD += @LIBGLAMOR_LIBS@
54d6c0b56eSmrgamdgpu_drv_la_SOURCES += \
55d6c0b56eSmrg	amdgpu_glamor.c \
56d6c0b56eSmrg	amdgpu_glamor_wrappers.c \
57d6c0b56eSmrg	amdgpu_pixmap.c
58d6c0b56eSmrg
59d6c0b56eSmrgEXTRA_DIST = \
60d6c0b56eSmrg	compat-api.h \
61d6c0b56eSmrg	amdgpu_bo_helper.h \
62d6c0b56eSmrg	amdgpu_drm_queue.h \
63d6c0b56eSmrg	amdgpu_glamor.h \
64d6c0b56eSmrg	amdgpu_drv.h \
65d6c0b56eSmrg	amdgpu_pixmap.h \
66d6c0b56eSmrg	amdgpu_probe.h \
67d6c0b56eSmrg	amdgpu_version.h \
68d6c0b56eSmrg	amdgpu_video.h \
69d6c0b56eSmrg	simple_list.h \
70d6c0b56eSmrg	amdgpu_dri2.h \
71d6c0b56eSmrg	drmmode_display.h
72