xref: /netbsd-src/sys/external/bsd/drm2/amdgpu/amdgpu2netbsd (revision 10f82c92d63e3cb68df0c15886df986ace179752)
1#!/bin/sh
2
3#	$NetBSD: amdgpu2netbsd,v 1.1 2018/08/27 14:02:32 riastradh Exp $
4#
5# $ /path/to/amdgpu2netbsd > /path/to/files.amdgpu.new
6#
7# Run from the top-level amd/amdgpu source directory.
8
9set -Ceu
10
11# Location of the amdgpu sources relative to $NETBSDSRCDIR.
12amdgpu_top=external/bsd/drm2/dist/drm/amd/amdgpu
13
14# config(5) flag for the amdgpu driver.
15amdgpu_flag=amdgpu
16
17env CONFIG_ACPI=y \
18env src=. \
19make -f Makefile -V '$(amdgpu-y)' \
20| tr ' ' '\n' \
21| grep -v '^$' \
22| sed -e 's,\.o$,.c,' \
23| sort -u \
24| while read f; do
25	printf 'file\t%s\t%s\n' "$amdgpu_top/$f" "$amdgpu_flag"
26done
27