File: Makefile

package info (click to toggle)
lockfile-progs 0.1.7
  • links: PTS
  • area: main
  • in suites: potato
  • size: 56 kB
  • ctags: 27
  • sloc: ansic: 166; makefile: 102
file content (36 lines) | stat: -rw-r--r-- 1,047 bytes parent folder | download
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

LOADLIBES := -llockfile
CFLAGS    := -g -Wall -O2

all: lockfile-create
	mkdir -p bin
	cp -a lockfile-create bin
	cp -a lockfile-create bin/mail-lock
	(cd bin && ln -sf lockfile-create lockfile-remove && \
             ln -sf lockfile-create lockfile-touch && \
             ln -sf mail-lock mail-unlock && \
             ln -sf mail-lock mail-touchlock)
	mkdir -p man
	cp -a lockfile-progs.1 man
	(cd man && ln -sf lockfile-progs.1 lockfile-create.1 && \
             ln -sf lockfile-progs.1 lockfile-remove.1 && \
             ln -sf lockfile-progs.1 lockfile-touch.1 && \
             ln -sf lockfile-progs.1 mail-lock.1 && \
             ln -sf lockfile-progs.1 mail-unlock.1 && \
             ln -sf lockfile-progs.1 mail-touchlock.1)
.PHONY: all

lockfile-create: lockfile-progs.o
	${CC} -o $@ ${LDFLAGS} $^ ${LOADLIBES}

distclean: clean
clean:
	rm -f lockfile-create lockfile-remove lockfile-touch
	rm -f mail-lock mail-unlock mail-touchlock
	rm -f *.o *~
	rm -rf bin man
.PHONY: clean distclean

# Local Variables:
# tab-width: 2
# End: