summaryrefslogtreecommitdiff
path: root/pkg/wld/gen.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-06-04 20:48:01 -0700
committerMichael Forney <mforney@mforney.org>2020-06-05 03:01:44 -0700
commitd4297a13c823b62d29d9850ab5815f6c78baf35a (patch)
tree153ebe760b69008ea6ff38d7066368d6f254b96b /pkg/wld/gen.lua
parentab438ea71e5b61956b9ad8c5b5f56e3a6c6b66c3 (diff)
Use -isystem to include library headers
This way, warnings from headers that come from another package (in particular linux-headers) won't show up when they get included. To make sure we still track dependencies, use -MD instead of -MMD.
Diffstat (limited to 'pkg/wld/gen.lua')
-rw-r--r--pkg/wld/gen.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/wld/gen.lua b/pkg/wld/gen.lua
index 0db4cbdb..fef5e57b 100644
--- a/pkg/wld/gen.lua
+++ b/pkg/wld/gen.lua
@@ -2,12 +2,12 @@ cflags{
'-D WITH_WAYLAND_SHM',
'-D WITH_WAYLAND_DRM',
'-I $outdir',
- '-I $builddir/pkg/fontconfig/include',
- '-I $builddir/pkg/freetype/include',
- '-I $builddir/pkg/libdrm/include',
- '-I $builddir/pkg/linux-headers/include',
- '-I $builddir/pkg/pixman/include',
- '-I $builddir/pkg/wayland/include',
+ '-isystem $builddir/pkg/fontconfig/include',
+ '-isystem $builddir/pkg/freetype/include',
+ '-isystem $builddir/pkg/libdrm/include',
+ '-isystem $builddir/pkg/linux-headers/include',
+ '-isystem $builddir/pkg/pixman/include',
+ '-isystem $builddir/pkg/wayland/include',
}
pkg.hdrs = copy('$outdir/include/wld', '$srcdir', {'drm.h', 'pixman.h', 'wayland.h', 'wld.h'})
@@ -38,12 +38,12 @@ local libs = {
}
if config.video_drivers and config.video_drivers['intel'] then
- cflags{'-D WITH_DRM_INTEL', '-I $basedir/pkg/libdrm/src/intel'}
+ cflags{'-D WITH_DRM_INTEL', '-isystem $basedir/pkg/libdrm/src/intel'}
table.insert(srcs, {'intel.c', 'intel/batch.c'})
table.insert(libs, 'libdrm/libdrm_intel.a.d')
end
if config.video_drivers and config.video_drivers['nouveau'] then
- cflags{'-D WITH_DRM_NOUVEAU', '-I $basedir/pkg/libdrm/src/nouveau'}
+ cflags{'-D WITH_DRM_NOUVEAU', '-isystem $basedir/pkg/libdrm/src/nouveau'}
table.insert(srcs, 'nouveau.c')
table.insert(libs, 'libdrm/libdrm_nouveau.a')
end