xref: /original-bsd/games/chess/Xchess/Makefile (revision 10020db5)
1# RCS Info: $Revision: 1.5 $ on $Date: 86/11/26 12:09:19 $
2#           $Source: /users/faustus/xchess/RCS/Makefile,v $
3# Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
4#
5# Makefile for xchess.
6
7#CC = cc -O -m68010 -L/pub.MC68010/lib -L/usr.MC68010/lib
8CC = cc -O
9
10CFILES	=\
11	board.c\
12	button.c\
13	clock.c\
14	control.c\
15	jail.c\
16	message.c\
17	parse.c\
18	popup.c\
19	program.c\
20	record.c\
21	std.c\
22	valid.c\
23	window.c\
24	XCircle.c
25
26COBJS	=\
27	board.o\
28	button.o\
29	clock.o\
30	control.o\
31	jail.o\
32	message.o\
33	parse.o\
34	popup.o\
35	program.o\
36	record.o\
37	std.o\
38	valid.o\
39	window.o\
40	XCircle.o
41
42HFILES	=\
43	std.h\
44	xchess.h
45
46SOURCE = $(CFILES)
47
48ALLFILES = $(SOURCE) $(HFILES)
49
50INCLUDE = -I.
51
52DEFINES = -DDEF_PROGRAM=\"gnuchess\"
53
54CFLAGS = $(DEFINES) $(INCLUDE)
55LINTFLAGS = -u -z -lc -DLINT $(DEFINES) $(INCLUDE)
56LINTLIB = ../lib/llib-lX.ln
57#LDFLAGS = -L/usr2/X/lib -z -lX -lm
58LDFLAGS = -loldX -lX11 -z -lX -lm
59GPLDFLAGS = -z -loldX -lX11 -lXMenu_p -lX -lm_p -g -pg
60
61.c.o: $*.c
62	$(CC) $(CFLAGS) -c $*.c
63.s.o: $*.s
64	$(CC) $(CFLAGS) -c $*.s
65
66all: xchess scrollText.o
67	@echo "All done."
68
69everything: all tags depend lint wc
70	@echo "All done."
71
72xchess:	xchess.o $(COBJS) scrollText.o
73	$(CC) -o xchess xchess.o $(COBJS) scrollText.o \
74	$(LDFLAGS)
75
76scrollText.o: scrollText.h scrollText.c
77
78gpxchess: xchess.o $(COBJS)
79	$(CC) -o gpxchess xchess.o $(COBJS) scrollText/libScroll.a \
80	$(GPLDFLAGS)
81
82lint:	$(SOURCE)
83	lint $(LINTFLAGS) $(SOURCE) $(LINTLIB) | \
84	grep -v "multiply declared"
85
86qgrind: $(ALLFILES)
87	qgrind -lc $(ALLFILES)
88
89vgrind:	$(ALLFILES)
90	vgrind -lc $(ALLFILES)
91
92opt: all
93
94reopt: all
95
96install: all
97
98source:	$(SOURCE)
99
100tags: $(ALLFILES)
101	ctags -w -t *.c *.h > /dev/null 2>&1
102
103wc: $(ALLFILES)
104	@wc $(ALLFILES)
105
106print: $(ALLFILES)
107	@pr $(ALLFILES)
108
109clean:
110	rm -f *.o *.a *.out xchess tags foo tmp
111
112tar:
113	tar -cf xchess.tar Makefile *.h *.c *.bitmap *.icon *.cur *.1\
114	scrollText/Makefile scrollText/*.h scrollText/*.c scrollText/*.1\
115	scrollText/*.3
116
117$(ALLFILES):
118	co $@
119
120depend: $(SOURCE)
121	cc -M $(CFLAGS) $(CFILES) > makedep
122	echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
123	echo '$$r makedep' >>eddep
124	echo 'w' >>eddep
125	ed - Makefile < eddep
126	rm eddep makedep
127	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
128	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
129	echo '# see make depend above' >> Makefile
130
131#-----------------------------------------------------------------
132# DO NOT DELETE THIS LINE -- make depend uses it
133# DEPENDENCIES MUST END AT END OF FILE
134
135xchess.o $(COBJS): $(HFILES)
136
137