<commit_before># Makefile for MCE
# Copyright © 2004-2011 Nokia Corporation.
# Written by <NAME>
# Modified by <NAME>

VERSION := 1.12.1

INSTALL := install --mode=755
INSTALL_DIR := install -d
INSTALL_DATA := install --mode=644

DOXYGEN := doxygen

VARDIR := $(DESTDIR)/var/lib/mce
RUNDIR := $(DESTDIR)/var/run/mce
CONFDIR := /etc/mce
CONFINSTDIR := $(DESTDIR)$(CONFDIR)
SBINDIR := $(DESTDIR)/sbin
MODULEDIR := $(DESTDIR)/usr/lib/mce/modules
DBUSDIR := $(DESTDIR)/etc/dbus-1/system.d
LOCALEDIR := $(DESTDIR)/usr/share/locale
GCONFSCHEMADIR := $(DESTDIR)/etc/gconf/schemas
BACKUPCONFDIR := $(DESTDIR)/usr/share/backup-framework/applications
HELPERSCRIPTDIR := $(DESTDIR)/usr/share/mce
DEVICECLEARSCRIPTDIR := $(DESTDIR)/etc/osso-cud-scripts
FACTORYRESETSCRIPTDIR := $(DESTDIR)/etc/osso-rfs-scripts

TOPDIR := .
DOCDIR := $(TOPDIR)/doc
TOOLDIR := $(TOPDIR)/tools
TESTSDIR := $(TOPDIR)/tests
MODULE_DIR := $(TOPDIR)/modules

TOOLS := \
	$(TOOLDIR)/mcetool
TESTS := \
	$(TESTSDIR)/mcetorture
TARGETS := \
	mce
MODULES := \
	$(MODULE_DIR)/libradiostates.so \
	$(MODULE_DIR)/libfilter-brightness-als.so \
	$(MODULE_DIR)/libfilter-brightness-simple.so \
	$(MODULE_DIR)/libproximity.so \
	$(MODULE_DIR)/libkeypad.so \
	$(MODULE_DIR)/libinactivity.so \
	$(MODULE_DIR)/libcamera.so \
	$(MODULE_DIR)/libalarm.so \
	$(MODULE_DIR)/libbattery.so \
	$(MODULE_DIR)/libdisplay.so \
	$(MODULE_DIR)/libled.so \
	$(MODULE_DIR)/libcallstate.so \
	$(MODULE_DIR)/libaudiorouting.so \
	$(MODULE_DIR)/libpowersavemode.so
CONFFILE := mce.ini
RADIOSTATESCONFFILE := mce-radio-states.ini
COLORPROFILESCONFFILE := mce-color-profiles.ini
DBUSCONF := mce.conf mcetool.conf
GCONFSCHEMAS := display.schemas energymanagement.schemas
BACKUPCONF := mcebackup.conf
BACKUPSCRIPTS := mce-backup mce-restore
PRIVILEGEDDEVICECLEARSCRIPT := mce-device-clear
REGULARDEVICECLEARSCRIPT := mce-device-clear.sh

WARNINGS := -Wextra -Wall -Wpointer-arith -Wundef -Wcast-align -Wshadow
WARNINGS += -Wbad-function-cast -Wwrite-strings -Wsign-compare
WARNINGS += -Waggregate-return -Wmissing-noreturn -Wnested-externs
WARNINGS += -Wchar-subscripts -Wmissing-prototypes -Wformat-security
WARNINGS += -Wformat=2 -Wformat-nonliteral -Winit-self
WARNINGS += -Wswitch-default -Wstrict-prototypes
WARNINGS += -Wdeclaration-after-statement
WARNINGS += -Wold-style-definition -Wmissing-declarations
WARNINGS += -Wmissing-include-dirs -Wstrict-aliasing=2
WARNINGS += -Wunsafe-loop-optimizations -Winvalid-pch
WARNINGS += -Waddress -Wvolatile-register-var
WARNINGS += -Wmissing-format-attribute
WARNINGS += -Wstack-protector
WARNINGS += -Werror
WARNINGS += -Wno-declaration-after-statement

COMMON_CFLAGS := -D_GNU_SOURCE
COMMON_CFLAGS += -I. $(WARNINGS)
COMMON_CFLAGS += -DG_DISABLE_DEPRECATED
COMMON_CFLAGS += -DOSSOLOG_COMPILE
COMMON_CFLAGS += -DMCE_VAR_DIR=$(VARDIR) -DMCE_RUN_DIR=$(RUNDIR)
COMMON_CFLAGS += -DPRG_VERSION=$(VERSION)

MCE_CFLAGS := $(COMMON_CFLAGS)
MCE_CFLAGS += -DMCE_CONF_FILE=$(CONFDIR)/$(CONFFILE)
MCE_CFLAGS += $$(pkg-config gobject-2.0 glib-2.0 gio-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 --cflags)
MCE_LDFLAGS := $$(pkg-config gobject-2.0 glib-2.0 gio-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 dsme --libs)
LIBS := tklock.c modetransition.c powerkey.c mce-dbus.c mce-dsme.c mce-gconf.c event-input.c event-switches.c mce-hal.c mce-log.c mce-conf.c datapipe.c mce-modules.c mce-io.c mce-lib.c
HEADERS := tklock.h modetransition.h powerkey.h mce.h mce-dbus.h mce-dsme.h mce-gconf.h event-input.h event-switches.h mce-hal.h mce-log.h mce-conf.h datapipe.h mce-modules.h mce-io.h mce-lib.h

MODULE_CFLAGS := $(COMMON_CFLAGS)
MODULE_CFLAGS += -fPIC -shared
MODULE_CFLAGS += -I.
MODULE_CFLAGS += -DMCE_RADIO_STATES_CONF_FILE=$(CONFDIR)/$(RADIOSTATESCONFFILE)
MODULE_CFLAGS += -DMCE_COLOR_PROFILES_CONF_FILE=$(CONFDIR)/$(COLORPROFILESCONFFILE)
MODULE_CFLAGS += $$(pkg-config gobject-2.0 glib-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 --cflags)
MODULE_LDFLAGS := $$(pkg-config gobject-2.0 glib-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 --libs)
MODULE_LIBS := datapipe.c mce-hal.c mce-log.c mce-dbus.c mce-conf.c mce-gconf.c median_filter.c mce-lib.c
MODULE_HEADERS := datapipe.h mce-hal.h mce-log.h mce-dbus.h mce-conf.h mce-gconf.h mce.h median_filter.h mce-lib.h

TOOLS_CFLAGS := $(COMMON_CFLAGS)<commit_msg>Do not use Werror. Lots of no-return errors + changes in toolchain might need to force us to fix new warnings, slowing down releases<commit_after># Makefile for MCE
# Copyright © 2004-2011 Nokia Corporation.
# Written by <NAME>
# Modified by <NAME>

VERSION := 1.12.1

INSTALL := install --mode=755
INSTALL_DIR := install -d
INSTALL_DATA := install --mode=644

DOXYGEN := doxygen

VARDIR := $(DESTDIR)/var/lib/mce
RUNDIR := $(DESTDIR)/var/run/mce
CONFDIR := /etc/mce
CONFINSTDIR := $(DESTDIR)$(CONFDIR)
SBINDIR := $(DESTDIR)/sbin
MODULEDIR := $(DESTDIR)/usr/lib/mce/modules
DBUSDIR := $(DESTDIR)/etc/dbus-1/system.d
LOCALEDIR := $(DESTDIR)/usr/share/locale
GCONFSCHEMADIR := $(DESTDIR)/etc/gconf/schemas
BACKUPCONFDIR := $(DESTDIR)/usr/share/backup-framework/applications
HELPERSCRIPTDIR := $(DESTDIR)/usr/share/mce
DEVICECLEARSCRIPTDIR := $(DESTDIR)/etc/osso-cud-scripts
FACTORYRESETSCRIPTDIR := $(DESTDIR)/etc/osso-rfs-scripts

TOPDIR := .
DOCDIR := $(TOPDIR)/doc
TOOLDIR := $(TOPDIR)/tools
TESTSDIR := $(TOPDIR)/tests
MODULE_DIR := $(TOPDIR)/modules

TOOLS := \
	$(TOOLDIR)/mcetool
TESTS := \
	$(TESTSDIR)/mcetorture
TARGETS := \
	mce
MODULES := \
	$(MODULE_DIR)/libradiostates.so \
	$(MODULE_DIR)/libfilter-brightness-als.so \
	$(MODULE_DIR)/libfilter-brightness-simple.so \
	$(MODULE_DIR)/libproximity.so \
	$(MODULE_DIR)/libkeypad.so \
	$(MODULE_DIR)/libinactivity.so \
	$(MODULE_DIR)/libcamera.so \
	$(MODULE_DIR)/libalarm.so \
	$(MODULE_DIR)/libbattery.so \
	$(MODULE_DIR)/libdisplay.so \
	$(MODULE_DIR)/libled.so \
	$(MODULE_DIR)/libcallstate.so \
	$(MODULE_DIR)/libaudiorouting.so \
	$(MODULE_DIR)/libpowersavemode.so
CONFFILE := mce.ini
RADIOSTATESCONFFILE := mce-radio-states.ini
COLORPROFILESCONFFILE := mce-color-profiles.ini
DBUSCONF := mce.conf mcetool.conf
GCONFSCHEMAS := display.schemas energymanagement.schemas
BACKUPCONF := mcebackup.conf
BACKUPSCRIPTS := mce-backup mce-restore
PRIVILEGEDDEVICECLEARSCRIPT := mce-device-clear
REGULARDEVICECLEARSCRIPT := mce-device-clear.sh

WARNINGS := -Wextra -Wall -Wpointer-arith -Wundef -Wcast-align -Wshadow
WARNINGS += -Wbad-function-cast -Wwrite-strings -Wsign-compare
WARNINGS += -Waggregate-return -Wmissing-noreturn -Wnested-externs
WARNINGS += -Wchar-subscripts -Wmissing-prototypes -Wformat-security
WARNINGS += -Wformat=2 -Wformat-nonliteral -Winit-self
WARNINGS += -Wswitch-default -Wstrict-prototypes
WARNINGS += -Wdeclaration-after-statement
WARNINGS += -Wold-style-definition -Wmissing-declarations
WARNINGS += -Wmissing-include-dirs -Wstrict-aliasing=2
WARNINGS += -Wunsafe-loop-optimizations -Winvalid-pch
WARNINGS += -Waddress -Wvolatile-register-var
WARNINGS += -Wmissing-format-attribute
WARNINGS += -Wstack-protector
#WARNINGS += -Werror
WARNINGS += -Wno-declaration-after-statement

COMMON_CFLAGS := -D_GNU_SOURCE
COMMON_CFLAGS += -I. $(WARNINGS)
COMMON_CFLAGS += -DG_DISABLE_DEPRECATED
COMMON_CFLAGS += -DOSSOLOG_COMPILE
COMMON_CFLAGS += -DMCE_VAR_DIR=$(VARDIR) -DMCE_RUN_DIR=$(RUNDIR)
COMMON_CFLAGS += -DPRG_VERSION=$(VERSION)

MCE_CFLAGS := $(COMMON_CFLAGS)
MCE_CFLAGS += -DMCE_CONF_FILE=$(CONFDIR)/$(CONFFILE)
MCE_CFLAGS += $$(pkg-config gobject-2.0 glib-2.0 gio-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 --cflags)
MCE_LDFLAGS := $$(pkg-config gobject-2.0 glib-2.0 gio-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 dsme --libs)
LIBS := tklock.c modetransition.c powerkey.c mce-dbus.c mce-dsme.c mce-gconf.c event-input.c event-switches.c mce-hal.c mce-log.c mce-conf.c datapipe.c mce-modules.c mce-io.c mce-lib.c
HEADERS := tklock.h modetransition.h powerkey.h mce.h mce-dbus.h mce-dsme.h mce-gconf.h event-input.h event-switches.h mce-hal.h mce-log.h mce-conf.h datapipe.h mce-modules.h mce-io.h mce-lib.h

MODULE_CFLAGS := $(COMMON_CFLAGS)
MODULE_CFLAGS += -fPIC -shared
MODULE_CFLAGS += -I.
MODULE_CFLAGS += -DMCE_RADIO_STATES_CONF_FILE=$(CONFDIR)/$(RADIOSTATESCONFFILE)
MODULE_CFLAGS += -DMCE_COLOR_PROFILES_CONF_FILE=$(CONFDIR)/$(COLORPROFILESCONFFILE)
MODULE_CFLAGS += $$(pkg-config gobject-2.0 glib-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 --cflags)
MODULE_LDFLAGS := $$(pkg-config gobject-2.0 glib-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 --libs)
MODULE_LIBS := datapipe.c mce-hal.c mce-log.c mce-dbus.c mce-conf.c mce-gconf.c median_filter.c mce-lib.c
MODULE_HEADERS := datapipe.h mce-hal.h mce-log.h mce-dbus.h mce-conf.h mce-gconf.h mce.h median_filter.h mce-lib.h

TOOLS_CFLAGS := $(COMMON_CFLAGS)
{'fraction_non_alphanumeric': 0.15576790237163252, 'fraction_numerical': 0.014966612940363803, 'mean_word_length': 4.707621550591327, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5535513', 'n_tokens_mistral': 3611, 'n_tokens_neox': 3559, 'n_words': 571}