File: Makefile

package info (click to toggle)
codegroup 20080907%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 368 kB
  • sloc: ansic: 520; makefile: 88; sh: 9
file content (49 lines) | stat: -rw-r--r-- 1,210 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
48
49
 
PROGS = codegroup
# CFLAGS = -O -Wall
PAGER = more
BIN = $(DESTDIR)/usr/bin

all:	$(PROGS)

clean:
	rm -f $(PROGS) *.o *.bak *.zip core code.* *.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)
	
#   Test by encoding and decoding the program binary

check:	codegroup
	./codegroup -e <codegroup >codegroup1.bak
	./codegroup -d <codegroup1.bak >codegroup2.bak
	-cmp -s codegroup codegroup2.bak ; if test $$? -ne 0  ; then \
	    echo '** codegroup:  Redirection test failed. **' ; else \
	./codegroup -e codegroup codegroup1.bak ;\
	./codegroup -d codegroup1.bak codegroup2.bak ;\
	cmp -s codegroup codegroup2.bak ; if test $$? -ne 0  ; then \
	    echo '** codegroup:  Command line file argument test failed. **' ; else \
	    echo 'All tests passed.' ; fi ; fi
	@rm codegroup1.bak codegroup2.bak

#   View manual page

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

#   Print manual page

printman:
	groff -man codegroup.1 | lp