File: Makefile.UnixWare

package info (click to toggle)
unixcw 1.1-3
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 204 kB
  • ctags: 286
  • sloc: ansic: 2,469; makefile: 32; sh: 16
file content (91 lines) | stat: -rw-r--r-- 2,091 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
# Makefile for G0FRD CW tutor for UNIX flavours
#
# The following UNIX variants are available:
#
#   Linux: IBM PC Console running Linux.
#   SCO:   IBM PC Console running SCO OpenServer.
#   UW:    IBM PC Console running SCO UnixWare.
#

# select the C compiler
#CC	= gcc	- for Linux
#CC	= cc	- for SCO OpenServer
#CC	= cc	- for SCO UnixWare
CC	= cc

# C compiler flags necessary to compile the programs correctly
#CFLAGS	= -DLINUX	- for Linux
#CFLAGS	= -DSCO		- for SCO OpenServer (optional -bELF)
#CFLAGS	= -DUNIXWARE	- for SCO UnixWare
CFLAGS	= -DUNIXWARE

# information for the installation
BINDIR	= /usr/local/bin
MANDIR	= /usr/local/man/cat.LOCAL
OWNER	= root:root
XMODE	= 755
RMODE	= 644


# default make target
default:	bins install

# do everything
all:	bins install test1 test2

# build the tutor binaries
bins:	cw cwgen cwcp

cw:	cw.h cw.c
	$(CC) $(CFLAGS) -o cw cw.c
	strip cw

cwgen:	cwgen.c
	$(CC) $(CFLAGS) -o cwgen cwgen.c
	strip cwgen

cwcp:	cw.h cwcp.c
	$(CC) $(CFLAGS) -o cwcp cwcp.c -lcurses
	strip cwcp

# install the binaries and man pages
install: bins cw.1.cat cwgen.1.cat cwcp.1.cat
	cp cw $(BINDIR)
	chown $(OWNER) $(BINDIR)/cw
	chmod $(XMODE) $(BINDIR)/cw
	cp cwgen $(BINDIR)
	chown $(OWNER) $(BINDIR)/cwgen
	chmod $(XMODE) $(BINDIR)/cwgen
	cp cwcp $(BINDIR)
	chown $(OWNER) $(BINDIR)/cwcp
	chmod $(XMODE) $(BINDIR)/cwcp
	compress <cw.1.cat >$(MANDIR)/cw.LOCAL.Z
	chown $(OWNER) $(MANDIR)/cw.LOCAL.Z
	chmod $(RMODE) $(MANDIR)/cw.LOCAL.Z
	compress <cwgen.1 >$(MANDIR)/cwgen.LOCAL.Z
	chown $(OWNER) $(MANDIR)/cwgen.LOCAL.Z
	chmod $(RMODE) $(MANDIR)/cwgen.LOCAL.Z
	compress <cwcp.1 >$(MANDIR)/cwcp.LOCAL.Z
	chown $(OWNER) $(MANDIR)/cwcp.LOCAL.Z
	chmod $(RMODE) $(MANDIR)/cwcp.LOCAL.Z

# run tests on the binaries built
test1:	bins
	./cw -w25 <cwtest1.cw

test2:	bins
	./cw <cwtest2.cw

# uninstall the binaries and man pages
uninstall:
	-rm $(BINDIR)/cw $(BINDIR)/cwgen $(BINDIR)/cwcp
	-rm $(MANDIR)/cw.LOCAL.Z $(MANDIR)/cwgen.LOCAL.Z $(MANDIR)/cwcp.LOCAL.Z

# clear up for a rebuild
clean:
	-rm -f *.o cw cwgen cwcp

# completely remove
clobber: clean uninstall