File: makefile

package info (click to toggle)
cpipe 3.0.0-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 136 kB
  • ctags: 58
  • sloc: ansic: 772; makefile: 73
file content (47 lines) | stat: -rw-r--r-- 1,254 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
37
38
39
40
41
42
43
44
45
46
47
## The other day I might consider learning autoconf. In the meantime I
## hope this is trivial enough to be installed without. If someone
## feels like sending me an autoconf-script for cpipe, I'll use it.
##
## $Revision: 1.4 $, $Date: 2001/12/09 10:05:20 $
########################################################################

prefix=/usr
exec_prefix=$(prefix)

## This is where the executable will be installed
BINDIR=$(exec_prefix)/bin

## Here we install the manual page
MANDIR=$(prefix)/man/man1

## Your favorite compiler flags.
CFLAGS = -O2 -W -Wall -pedantic

########################################################################
cpipe: cpipe.o cmdline.o
	$(CC) -lm -o cpipe cpipe.o cmdline.o

cpipe.o: cpipe.c cmdline.h

cmdline.o: cmdline.c cmdline.h


cmdline.c cmdline.h cpipe.1: cmdline.cli
	clig cmdline.cli || {\
	echo "*****"; \
	echo "Get clig at http://wsd.iitb.fhg.de/~kir/clighome"; \
	echo "or use cmdline.c, cmdline.h and cpipe.1 as they come"; \
	echo "in the distribution by touching them."; \
	echo "*****"; \
	exit 1; \
        }

clean:
	rm cmdline.o cpipe.o cpipe


install: cpipe cpipe.1
	mkdir -p $(BINDIR) $(MANDIR)
	cp cpipe $(BINDIR); chmod 755 $(BINDIR)/cpipe
	cp cpipe.1 $(MANDIR); chmod 744 $(MANDIR)/cpipe.1