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