+RECOMMENDED_CFLAGS = -Wall -Wextra -pedantic -Werror
+CFLAGS = $(RECOMMENDED_CFLAGS)
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
INSTALL_PROGRAM = $(INSTALL)
batteryviewer: batteryviewer.c
- gcc $(shell pkg-config --cflags gtk4) -o $@ $< $(shell pkg-config --libs gtk4)
+ gcc $(shell pkg-config --cflags gtk4) -o $@ $(CFLAGS) $< $(shell pkg-config --libs gtk4)
all: batteryviewer
#include <gtk/gtk.h>
-static void print_hello(GtkWidget *widget, gpointer data) {
+static void print_hello(GtkWidget *widget __attribute__((unused)),
+ gpointer data __attribute__((unused))) {
g_print("Hello World\n");
}
-static void activate(GtkApplication *app, gpointer user_data) {
+static void activate(GtkApplication *app,
+ gpointer user_data __attribute__((unused))) {
GtkWidget *window;
GtkWidget *button;