Add const and unsigned when it make sense and use size_t. Also use -Wall
[elfdbg/.git] / GNUmakefile
1 CC?=    cc
2 CFLAGS?=        -O2 -g -pipe -D_DEFAULT_SOURCE \
3                         -Wincompatible-pointer-types -Wall
4 SRCS=   elf.c elfdbg.c compat.c
5 OBJS=   ${SRCS:.c=.o}
6 PREFIX?=        /usr/local
7 MANPREFIX?=     /usr/share/man
8
9 all: elfdbg
10
11 elfdbg: ${OBJS}
12         ${CC} ${OBJS} ${LDFLAGS} -o $@
13
14 .c.o:
15         ${CC} ${CFLAGS} -c $<
16
17 install: elfdbg install-man
18         install -m 755 elfdbg ${DESTDIR}${PREFIX}/bin/
19
20 install-man:
21         gzip elfdbg.1 || /usr/bin/true
22         install -m 644 elfdbg.1.gz ${MANPREFIX}/man1/
23
24 install-strip: elfdbg
25         install -s -m 755 elfdbg ${DESTDIR}${PREFIX}/bin/
26
27 clean:
28         rm -rf ${OBJS} elfdbg
29
30 .PHONY: elfdbg