Repository navigation
Expand file tree
/
Copy pathmakefile
More file actions
63 lines (44 loc) · 1.39 KB
/
Copy pathmakefile
File metadata and controls
63 lines (44 loc) · 1.39 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.POSIX :
O := .o
E :=
.SUFFIXES :
.SUFFIXES : .c .h .i $O $E
########################################################################
### No further configuration beyond this point.
########################################################################
top_srcdir := ..
PROJ := iocccsize
TAR_I := -T
DBG := -DNDEBUG
CFLAGS := -std=c11 -Wall -Wextra -Wno-char-subscripts -pedantic ${WERROR} ${DBG}
CPPFLAGS :=
LIBS :=
EPREFIX := ${HOME}
BINDIR := ${EPREFIX}/bin
VERSION := $$(git describe --tags)
.c.i:
${CC} -E ${CFLAGS} ${CPPFLAGS} $*.c >$*.i
.c$O:
${CC} ${CFLAGS} ${CPPFLAGS} -c $*.c
.c$E:
${CC} ${CFLAGS} ${CPPFLAGS} -o$*$E $*.c
#######################################################################
all: build
build: ${PROJ}
clean:
-rm -f ${PROJ}.i ${PROJ}$O rule_count$O *.stackdump *.core 2>/dev/null
distclean clobber: clean
-rm -fr ${PROJ}$E ${PROJ}.dSYM test-${PROJ} a.out VERSION 2>/dev/null
test: build
./${PROJ}-test.sh -v
install: build
install -d ${BINDIR}
install -p ${PROJ}$E ${BINDIR}
version:
git describe --tags >VERSION
tar: version
git archive --format=tar.gz --prefix=${PROJ}-${VERSION}/ ${VERSION} >../${PROJ}-${VERSION}.tar.gz
iocccsize$E: iocccsize.h iocccsize.c
${CC} ${CFLAGS} ${CPPFLAGS} -DVERSION='"'${VERSION}'"' -DWITH_MAIN -oiocccsize$E iocccsize.c ${LIBS}
rule_count$O: iocccsize.h iocccsize.c
${CC} ${CFLAGS} ${CPPFLAGS} -c -orule_count$O iocccsize.c