File: Makefile

package info (click to toggle)
suckless-tools 40-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 700 kB
  • sloc: ansic: 2,512; makefile: 465; sh: 104
file content (47 lines) | stat: -rw-r--r-- 980 bytes parent folder | download | duplicates (3)
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
# lsx - list executables
#   (C)opyright MMVI Anselm R. Garbe

include config.mk

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

all: options lsx
	@echo finished

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

.c.o:
	${CC} -c ${CFLAGS} $<

lsx: ${OBJ}
	${CC} -o $@ ${OBJ} ${LDFLAGS}
	strip $@

clean:
	@echo cleaning
	rm -f lsx ${OBJ} lsx-${VERSION}.tar.gz

dist: clean
	@echo creating dist tarball
	mkdir -p lsx-${VERSION}
	cp -R LICENSE Makefile README config.mk ${SRC} lsx-${VERSION}
	tar -cf lsx-${VERSION}.tar lsx-${VERSION}
	gzip lsx-${VERSION}.tar
	rm -rf lsx-${VERSION}

install: all
	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
	mkdir -p ${DESTDIR}${PREFIX}/bin
	cp -f lsx ${DESTDIR}${PREFIX}/bin
	chmod 755 ${DESTDIR}${PREFIX}/bin/lsx

uninstall:
	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
	rm -f ${DESTDIR}${PREFIX}/bin/lsx

.PHONY: all options clean dist install uninstall