X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=makefile;h=f50f07445b9229007b7df637a2df4241953d08a8;hb=5be99a03a267ca6abf55125b76ada6d7b8ef7790;hp=6bc567fe304dc1414573e135350c5455fe1ff3fb;hpb=0d9ff5c8922745e91a26a078e686fad180f4dcbe;p=lackey diff --git a/makefile b/makefile index 6bc567f..f50f074 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ # lackey - curses calendar program -# See COPYING file for copyright and license details. +# See COPYING file for license details. -include config.mk @@ -16,10 +16,10 @@ LDFLAGS ?= -lncursesw -lical # Sources PROG ?= lackey -PROG_SRC ?= main view date cal util +PROG_SRC ?= main view date cal args conf util TEST ?= test -TEST_SRC ?= test date util -VIEWS ?= day week month year events todo settings help +TEST_SRC ?= test date cal conf util +VIEWS ?= day week month year events todo settings help edit CALS ?= dummy ical # For ncursesw @@ -29,7 +29,7 @@ CPPFLAGS += $(strip $(shell pkg-config --cflags ncursesw)) all: $(PROG) clean: - rm -f src/*.o views/*.o cals/*.o $(PROG) $(TEST) + rm -f src/*.o views/*.o cals/*.o $(PROG) $(TEST) dist: tar -czf $(PROG)-$(VERSION).tar.gz --transform s::$(PROG)-$(VERSION)/: \ @@ -43,6 +43,13 @@ uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG) rm -f $(DESTDIR)$(MANPREFIX)/man1/$(PROG).1 +memcheck: $(PROG) + valgrind --log-file=valgrind.out \ + --track-origins=yes \ + --leak-check=full \ + --leak-resolution=high \ + ./$(PROG) + # Rules $(PROG): $(PROG_SRC:%=src/%.o) $(VIEWS:%=views/%.o) $(CALS:%=cals/%.o) $(GCC) $(CFLAGS) -o $@ $+ $(LDFLAGS) @@ -50,7 +57,7 @@ $(PROG): $(PROG_SRC:%=src/%.o) $(VIEWS:%=views/%.o) $(CALS:%=cals/%.o) $(TEST): $(TEST_SRC:%=src/%.o) $(CALS:%=cals/%.o) $(GCC) $(CFLAGS) -o $@ $+ $(LDFLAGS) -%.o: %.c $(wildcard src/*.h) makefile +%.o: %.c $(wildcard src/*.h makefile config.mk) $(GCC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< .PHONY: all clean dist install uninstall