# -*- mode: Makefile -*-
# Time-stamp: < Makefile-test (2015-12-04 19:02) >

CC = gcc -Wall -g -O0 `pkg-config --cflags --libs glib-2.0`

all: main

clean:
	rm -rf *.o main

main: main.c power_supply.o
	$(CC) main.c power_supply.o -o $@

power_supply.o: power_supply.h power_supply.c
	$(CC) -c power_supply.c -o $@

valgrind: main
	G_DEBUG=gc-friendly G_SLICE=always-malloc valgrind --leak-check=yes ./main
