OSDN Git Service

Check for -fstack-protector
[android-x86/hardware-intel-common-vaapi.git] / src / Makefile.am
index 27b797c..5c52658 100644 (file)
@@ -37,6 +37,10 @@ driver_cflags = \
        -fvisibility=hidden     \
        $(NULL)
 
+if USE_SSP
+driver_cflags += -fstack-protector
+endif
+
 driver_ldflags = \
        -avoid-version          \
        -no-undefined           \
@@ -45,7 +49,7 @@ driver_ldflags = \
 
 driver_libs = \
        -lpthread -lm -ldl      \
-       $(DRM_LIBS) -ldrm_intel \
+       $(DRM_LIBS)             \
        $(NULL)
 
 include Makefile.sources
@@ -76,7 +80,7 @@ if USE_WAYLAND
 source_c                       += i965_output_wayland.c
 source_h                       += i965_output_wayland.h
 source_h                       += $(protocol_source_h)
-driver_cflags                  += $(WAYLAND_CFLAGS) $(WAYLAND_CLIENT_CFLAGS)
+driver_cflags                  += $(WAYLAND_CLIENT_CFLAGS)
 endif
 
 # git version
@@ -111,14 +115,27 @@ BUILT_SOURCES     += intel_version.h
 EXTRA_DIST     += Android.mk intel_version.h.in $(PKG_VERSION_FILE)
 
 # Wayland protocol
+if USE_WAYLAND
 protocol_source_h = wayland-drm-client-protocol.h
 i965_output_wayland.c: $(protocol_source_h)
 %-client-protocol.h : %.xml
        $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
 
+BUILT_SOURCES += $(protocol_source_h)
+endif
+
 EXTRA_DIST += \
        wayland-drm.xml         \
        $(NULL)
 
+CLEANFILES = $(BUILT_SOURCES)
+
+DISTCLEANFILES = \
+       $(VERSION_FILE) \
+       $(OLD_VERSION_FILE)     \
+       $(PKG_VERSION_FILE)     \
+       $(NEW_VERSION_FILE)     \
+       $(NULL)
+
 # Extra clean files so that maintainer-clean removes *everything*
 MAINTAINERCLEANFILES = Makefile.in config.h.in