File: Makefile

package info (click to toggle)
ii 1.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 224 kB
  • sloc: ansic: 3,052; makefile: 84; sh: 23
file content (50 lines) | stat: -rw-r--r-- 1,069 bytes parent folder | download | duplicates (2)
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
# See LICENSE file for copyright and license details.
include config.mk

SRC = ii.c
OBJ = ${SRC:.c=.o}

all: ii

options:
	@echo ii build options:
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
	@echo "CC       = ${CC}"

.o:
	$(LD) -o $@ $< $(LDFLAGS)

.c.o:
	$(CC) -c -o $@ $< $(CFLAGS)

ii: ${OBJ}
	${CC} -o $@ ${OBJ} ${LDFLAGS}

${OBJ}: arg.h

install: all
	mkdir -p ${DESTDIR}${DOCDIR}
	mkdir -p ${DESTDIR}${BINDIR}
	mkdir -p ${DESTDIR}${MAN1DIR}
	install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MAN1DIR}
	install -m 644 CHANGES README FAQ LICENSE ${DESTDIR}${DOCDIR}
	install -m 775 ii ${DESTDIR}${BINDIR}
	sed "s/VERSION/${VERSION}/g" < ii.1 > ${DESTDIR}${MAN1DIR}/ii.1
	chmod 644 ${DESTDIR}${MAN1DIR}/ii.1

uninstall: all
	rm -f ${DESTDIR}${MAN1DIR}/ii.1 \
		${DESTDIR}${BINDIR}/ii
	rm -rf ${DESTDIR}${DOCDIR}

dist: clean
	mkdir -p ii-${VERSION}
	cp -R Makefile CHANGES README FAQ LICENSE strlcpy.c arg.h \
		config.mk ii.c ii.1 ii-${VERSION}
	tar -cf ii-${VERSION}.tar ii-${VERSION}
	gzip ii-${VERSION}.tar
	rm -rf ii-${VERSION}

clean:
	rm -f ii *.o