File: Makefile

package info (click to toggle)
suckless-tools 38-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 388 kB
  • sloc: ansic: 3,663; makefile: 376; sh: 1
file content (49 lines) | stat: -rw-r--r-- 1,020 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
# lsw - list window names
#   (C)opyright MMVI Anselm R. Garbe

include config.mk

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

all: options lsw
	@echo finished

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

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

lsw: ${OBJ}
	@echo LD $@
	@${CC} -o $@ ${OBJ} ${LDFLAGS}
	@strip $@

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

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

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

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

.PHONY: all options clean dist install uninstall