summaryrefslogtreecommitdiff
path: root/Makefile
blob: 35ac87da2b1fc0b940138d5eb60ece503dfb9419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
CC=cc
CFLAGS=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -Wno-pointer-to-int-cast -fno-diagnostics-color -ggdb -c -O2
LDFLAGS=-static
O=o
BIN=$(HOME)/bin

TARG=logwatch
OFILES=\
	main.$O\

LIBS=\
	libutf/libutf.a\

HFILES=\
	args.h\
	libutf/utf.h\

.PHONY: all clean
all: $(TARG)

%.$O: %.c
	$(CC) $(CFLAGS) $<

$(OFILES): $(HFILES)

$(TARG): $(OFILES)
	$(CC) -o $@ $(OFILES) $(LIBS) $(LDFLAGS)

install: $(TARG)
	cp $(TARG) $(BIN)/

uninstall:
	rm -f $(BIN)/$(TARG)

man:
	groff -man $(TARG).8.man | ps2pdf - >$(TARG).8.pdf

clean:
	rm $(TARG) *.o *.pdf