File: Makefile

package info (click to toggle)
codegroup 19981025-9
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 212 kB
  • sloc: ansic: 1,038; makefile: 51
file content (47 lines) | stat: -rw-r--r-- 995 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
 
PROGS = codegroup
# CFLAGS = -O
BIN = $(DESTDIR)/usr/bin/

all:	$(PROGS)

clean:
	rm -f $(PROGS) *.o *.bak *.zip core *.out

codegroup: codegroup.o
	$(CC) codegroup.o -o codegroup $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)

install:	${ALL}
	install codegroup ${BIN}

#   Create zipped archive

RELFILES = Makefile codegroup.1 codegroup.c \
	   codegroup.html codegroup.jpg codegroup.man codegrp.exe

release:
	rm -f codegroup.zip
	zip codegroup.zip $(RELFILES)

#   View manual page

manpage:
	nroff -man codegroup.1 | $(PAGER)

#   Print manual page

printman:
	ptroff -man codegroup.1

# Test it

# Need ./ notation, most paths don't include . - vlm 2004-08-21

test:	codegroup
	./codegroup -e <codegroup >/tmp/codegroup1.bak
	./codegroup -d </tmp/codegroup1.bak >/tmp/codegroup2.bak
	cmp codegroup /tmp/codegroup2.bak
	./codegroup -e codegroup /tmp/codegroup1.bak
	./codegroup -d /tmp/codegroup1.bak /tmp/codegroup2.bak
	cmp codegroup /tmp/codegroup2.bak
#	rm /tmp/codegroup1.bak /tmp/codegroup2.bak