File: Makefile

package info (click to toggle)
mgt 2.31-7
  • links: PTS
  • area: main
  • in suites: bullseye, sid, stretch
  • size: 460 kB
  • ctags: 582
  • sloc: ansic: 4,852; sh: 411; pascal: 329; makefile: 88; csh: 3
file content (167 lines) | stat: -rw-r--r-- 3,890 bytes parent folder | download | duplicates (2)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#   There is NO X version of this program
#
#        "mgt" Copyright 1991 Shodan
#		All Rights Reserved.
#		Program by Greg Hale and Adrian Mariano
#
#Permission to use, copy, modify, and distribute this software and its
#documentation for any purpose and without fee is hereby granted,
#provided that this entire comment and copyright notice appear in all
#copies and that both that copyright notice and this permission notice
#appear in supporting documentation.  No representations are made about
#the suitability of this software for any purpose.  It is provided "as
#is" without express or implied warranty.
#
#Please send copies of extensions to:
#
# hale@scam.berkeley.edu
# 128.32.138.4    scam.berkeley.edu
#
#Donations for the 'From My Go Teacher' series may be sent to:
#	Shodan
#	P.O. Box 4456
#	Berkeley, CA 94704
#	(415) 574-5572
#
#
# Makefile for mgt
# by Greg Hale and Adrian Mariano
#
# *** C compile flags.
#
# -O: optimize
# -DDEBUG: turn on program debugging
#
# *** CONFIGURATION ***
#
# Choose one of
#   -DMGT_UNIX  Compile under UNIX
#   -DMGT_IBM   Compile on IBM PC under Turbo C (Use the other Makefile!)
#
#   -DMGT_LIB=\"/usr/lib/mgt/\":   defines a library directory for games
#

DEFS=-DMGT_UNIX -DMGT_LIB=\"/usr/lib/games/mgt/\"

# If you read this Makefile, you may notice many references to an 
# X Windows program.  This program has been released and is available
# at the standard archive sites.


E	=
O 	= .o

CC	= cc
CFLAGS	= -O $(DEFS)

LD 	= cc
LDFLAGS	=
LIBS	= 
#CUR_LIBS = -lcurses -ltermcap
CUR_LIBS = -lcurses
X11_LIBS =

# DIRECTORIES - CONFIGURE DESTINATIONS
# BINDIR is where it is installed
BINDIR		=		/usr/games
MAN             =		mgt.doc
SHAR 		=		mgt.sh

# files which make up the shell archive along with sources

FILES = 	Smart-Go.def README Makefile format mgt.6 \
		Spec.io Makefile.bc Build.com mailgo mailgo.6 mgtdoc.asc \
		Sample.01 Sample.02 Rules Prop.lst README.IBM wrapmgt.6 \
		wrapmgt.c mgt2short mgt2short.6 mgtshort.bat mgtshort.cmd

SH_OBJS = 	help$O build$O comment$O doit$O \
		edit$O mgt$O parse$O play$O tree$O

SH_SRCS =	help.c ascii.c build.c comment.c doit.c \
		edit.c mgt.c parse.c play.c tree.c

ASC_OBJS= ascii$O

OBJECTS =	help$O ascii$O build$O comment$O doit$O \
		edit$O mgt$O parse$O play$O tree$O


SRCS =		help.c asc_ibm.inc asc_unix.inc mou.c \
		ascii.c build.c comment.c doit.c edit.c \
		mgt.c parse.c play.c tree.c

HDRS = 		mgt.h proto.h mou.h


all : begin curses wrapmgt man end

begin :
	@echo Begin...

end :
	@echo ...End
		
curses : mgt$E
	@echo Completed curses based version.

mgt$E : $(SH_OBJS) $(ASC_OBJS)
	$(LD) $(LDFLAGS) -o mgt$E $(SH_OBJS) $(ASC_OBJS) $(CUR_LIBS)

wrapmgt$E : wrapmgt.o
	$(LD) -o wrapmgt$E wrapmgt.o

ascii.o: ascii.c asc_unix.inc

$(MAN): mgt.6
	@echo "Creating mgt manual..."
	@nroff -man mgt.6 > $(MAN)
	@echo "done."

mailgo.doc: mailgo.6
	@echo "Creating mailgo manual..."
	@nroff -man mailgo.6 > mailgo.doc
	@echo "done."

wrapmgt.doc: wrapmgt.6
	@echo "Creating wrapmgt manual..."
	@nroff -man wrapmgt.6 > wrapmgt.doc
	@echo "done."

mgt2short.doc: mgt2short.6
	@echo "Creating mgt2short manual..."
	@nroff -man mgt2short.6 > mgt2short.doc
	@echo "done."

man: $(MAN) wrapmgt.doc mailgo.doc mgt2short.doc

clean:
	@echo "removing extra files..."
	@-rm -f *$O $(SHAR) xmgt$E mgt$E
	@echo "done."

proto:
	@echo "making proto.h file..."
	@-rm -f ./proto.h
	@egrep "FUNCTION" $(SH_SRCS) | sed "s/(.*)/();/" | sed "s/^.*://" | sed "s/FUNCTION/extern/"  | cat > ./proto.h
	@echo "done."

lint:
	@echo "making lint file..."
	@-rm -f ./lint.out
	@lint -u $(DEFS) $(SH_SRCS) > ./lint.out
	@echo "done."

new: proto clean all

mgtdoc.asc: $(MAN)
	@echo "Making ascii doc file..."
	@cat $(MAN) | col -b > mgtdoc.asc;
	@echo "done."


shar: mgtdoc.asc
	@shar $(SRCS) $(HDRS) $(FILES) > $(SHAR)

install : $(PROGRAM) $(ARCHIVE)
	@-install $(PROGRAM) $(BINDIR)/$(PROGRAM)