summaryrefslogtreecommitdiff
path: root/Makefile
blob: 2bc573770cdbc60d7a4d9b13eb385b382424467d (plain)
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.86 93/10/11 12:12:36 rws Exp $

all::

SHELL=/bin/sh
MAKESHELL=/bin/sh

TOP = .
CWD = .
CONFIGSRC = /mit/zephyr/src/config
DESTDIR=

IRULESRC = $(CONFIGSRC)

IMAKE= imake
IFLAGS= -I$(IRULESRC) $(IFLAGS_SH) $(OTHER_IFLAGS) -DTOPDIR=/mit/zephyr/src
XIFLAGS= -I$(ATHXLIBDIR)/X11/config -DUseInstalled

ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
	$(IRULESRC)/site.def Imakefile $(PRULEDEP)
MKDIRHIER= sh $(IRULESRC)/mkdirhier.sh

ATHVERS = $(IRULESRC)/update.conf

ATHBASEDIR=/usr/athena

ATHLIBDIR=$(ATHBASEDIR)/lib
ATHBINDIR=$(ATHBASEDIR)/bin
ATHINCDIR=$(ATHBASEDIR)/include
ATHETCDIR=$(ATHBASEDIR)/etc
ATHCONFDIR=/etc/athena
ATHMANDIR=$(ATHBASEDIR)/man
ATHRBINDIR=/bin/athena
ATHRETCDIR=/etc/athena

ATHNEWDIR=$(ATHBINDIR)

ATHXAPPDIR=/usr/athena/lib/X11/app-defaults
ATHXBITDIR=/usr/athena/lib/X11/bitmaps
ATHXINCDIR=/usr/athena/include
ATHXLIBDIR=/usr/athena/lib

AFSDIR=/mit/afsuser/@sys

LINTCFLAG=-o
LINTFLAGS=-DPOSIX $(DEFINES) -I/usr/athena/include

INSTALL=install -c
RANLIB=ranlib
CC=cc
LD=cc
AS=as
RM=rm -f
CP=cp -p

ETCMD=compile_et
SSCMD=mk_cmds

LIB_ET = -lcom_err
LIB_SS = -lss
LIB_HES = -lhesiod
LIB_KRB = -lkrb -ldes
LIB_ZEPHYR = -lzephyr -lkrb -ldes -lcom_err
LIB_X = -lX11 -lXext
LIB_XT = -lXt -lX11 -lXext
LIB_XAW = -lXaw -lXmu -lXt -lX11 -lXext

CDEBUG=-O

CFLAGS=$(CDEBUG) -DPOSIX $(DEFINES) -I/usr/athena/include
LDFLAGS= $(LDDEFS)
LDPATH=-L$(ATHLIBDIR)
LDLIBS=

install:: install_dirs
install_dirs::
install::
install.man::

clean::
depend::

FRC::

###########################################################################
# start of Imakefile
###########################################################################

#	Copyright 1988,1993 Massachusetts Institute of Technology
#	For copying and distribution information, see the file
#	"mit-copyright.h"
#
#	$Id$

#	Copyright 1993 Massachusetts Institute of Technology
#	For copying and distribution information, see the file
#	"mit-copyright.h"
#
#	$Id$

CDEFS_KRB = -DKERBEROS
ZLIB_KRB = $(LIB_KRB)

CDEFS_HES = -DHESIOD
ZLIB_HES = $(LIB_HES)

ZPIDDIR = /etc/athena
ZETCDIR = $(ATHCONFDIR)/zephyr
ZLIBDIR = $(ATHLIBDIR)/zephyr
ZINCDIR = $(ATHINCDIR)/zephyr
ZACLDIR = $(ZETCDIR)/acl

BINC = $(PTOP)/h

ZLIB = $(PTOP)/lib/libzephyr.a
ZLIBDES = $(PTOP)/libdes/libdes.a
ZLIBS = $(ZLIB_KRB) $(LIB_ET) $(ZLIB_HES)
DYN_LIB = $(PTOP)/libdyn/libdyn.a

DEFINES = $(XDEFS) -I$(BINC) \
	$(CDEFS_KRB) $(CDEFS_HES) $(CDEFS_ET) $(CDEFS_SS) \
	$(MACHDEFS)

CC=cc
LD=cc

ATHBINDIR = /mit/zephyr/@sys/bin
ATHLIBDIR = /mit/zephyr/@sys/lib
ATHINCDIR = /mit/zephyr/include
ATHMANDIR = /mit/zephyr/man

ZLIBDIR = /mit/zephyr/configs
ATHCONFDIR = $(ZLIBDIR)
ATHETCDIR = $(ATHBINDIR)
ATHRETCDIR = $(ATHBINDIR)

LDPATH = -L/usr/athena/lib/shared -L/usr/athena/lib

UTILS = $(D_IMAKE) $(D_ET) $(D_SS)

install_dirs:: $(DESTDIR)$(ZLIBDIR)
$(DESTDIR)$(ZLIBDIR)::
	$(MKDIRHIER) $(DESTDIR)$(ZLIBDIR)

World::
	make clean
	make Makefile
	make Makefiles

	make depend

	make all

PRULES = "config/zephyr.rules"
PINC = -DProjectRules=\"$(PRULES)\" -DProjectRuleDep=$(PRULES)

PTOP = $(TOP)/.
IPROJ = -DProject -DProjectTop=. -I$(PTOP) $(PINC)

IFLAGS_SH = -DUseSharedLibs

Makefile:: $(ICONFIGFILES)
	-@if [ -f Makefile ]; then \
        	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
		$(RM) Makefile.bak; mv Makefile Makefile.bak; \
        else exit 0; fi
	$(IMAKE) $(IPROJ) $(IFLAGS) -DNEWTOP=$(TOP) -DNEWCWD=$(CWD)

XMakefile::
	-@if [ -f Makefile ]; then \
        	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
		$(RM) Makefile.bak; mv Makefile Makefile.bak; \
        else exit 0; fi
	$(IMAKE) $(XIFLAGS)

clean::
	$(RM) *~ *.o *.a core a.out Makefile.bak
	$(RM) -r profiled

all-prof inst-prof::

install.man:: FRC
	@for d in  $(UTILS) h libdes lib libdyn clients server zhm zwgc; \
	do \
		(cd $$d; echo "### Making" install.man "in $(CWD)/$$d"; \
			make $(MFLAGS)  DESTDIR=$(DESTDIR) install.man; \
			echo "### Done with $(CWD)/$$d"); \
	done
Makefiles:: Makefile
	@echo "### Making Makefiles in $(CWD)"
	@-for d in $(UTILS) h libdes lib libdyn clients server zhm zwgc; \
	do \
		case "$$d" in \
                ./?*/?*/?*/?*)	newtop=../../../.. ;; \
                ./?*/?*/?*)	newtop=../../.. ;; \
                ./?*/?*)	newtop=../.. ;; \
                ./?*)		newtop=.. ;; \
                */?*/?*/?*)	newtop=../../../.. ;; \
                */?*/?*)	newtop=../../.. ;; \
                */?*)		newtop=../.. ;; \
                *)		newtop=.. ;; \
                esac; \
		( cd $$d; \
		  echo "### Making Makefile in $(CWD)/$$d"; \
		  if [ -f Makefile ]; then \
			$(RM) Makefile.bak; \
		 	mv Makefile Makefile.bak; fi; \
		  make -f $${newtop}/Makefile TOP=$${newtop}/$(TOP) \
			CWD=$(CWD)/$$d Makefile; \
		  make $(MFLAGS) Makefiles; \
		  echo "### Done with $(CWD)/$$d" ) ; \
	done

all:: FRC
	@for d in  $(UTILS) h libdes lib libdyn clients server zhm zwgc; \
	do \
		(cd $$d; echo "### Making" all "in $(CWD)/$$d"; \
			make $(MFLAGS)   DESTDIR=$(DESTDIR) all; \
			echo "### Done with $(CWD)/$$d"); \
	done

install:: FRC
	@for d in  $(UTILS) h libdes lib libdyn clients server zhm zwgc; \
	do \
		(cd $$d; echo "### Making" install "in $(CWD)/$$d"; \
			make $(MFLAGS)   DESTDIR=$(DESTDIR) install; \
			echo "### Done with $(CWD)/$$d"); \
	done

clean:: FRC
	@for d in  $(UTILS) h libdes lib libdyn clients server zhm zwgc; \
	do \
		(cd $$d; echo "### Making" clean "in $(CWD)/$$d"; \
			make $(MFLAGS)   DESTDIR=$(DESTDIR) clean; \
			echo "### Done with $(CWD)/$$d"); \
	done

depend:: FRC
	@for d in  $(UTILS) h libdes lib libdyn clients server zhm zwgc; \
	do \
		(cd $$d; echo "### Making" depend "in $(CWD)/$$d"; \
			make $(MFLAGS)   DESTDIR=$(DESTDIR) depend; \
			echo "### Done with $(CWD)/$$d"); \
	done
$(UTILS) h libdes lib libdyn clients server zhm zwgc:: FRC
	@(cd $@; echo "### Making" all "in $(CWD)/$@"; \
		make $(MFLAGS)  DESTDIR=$(DESTDIR) all ; \
		echo "### Done with $(CWD)/$@")

Makefiles::

###########################################################################
# dependencies generated by makedepend