-RECOMMENDED_CFLAGS = -Wall -Wextra -pedantic -Werror
+RECOMMENDED_CFLAGS = -Wall -Wextra -pedantic -Werror -O
CFLAGS = $(RECOMMENDED_CFLAGS)
prefix = /usr/local
exec_prefix = $(prefix)
INSTALL = install -D
INSTALL_PROGRAM = $(INSTALL)
-batteryviewer: batteryviewer.c
- gcc $(shell pkg-config --cflags gtk+-3.0) -o $@ $(CFLAGS) $< $(shell pkg-config --libs gtk+-3.0)
+batteryviewer: batteryviewer.c chart.c
+ gcc $(shell pkg-config --cflags gtk+-3.0) -o $@ $(CFLAGS) $^ $(shell pkg-config --libs gtk+-3.0)
all: batteryviewer