1#
2# Copyright (c) 1992-1998 Michael A. Cooper.
3# This software may be freely used and distributed provided it is not
4# sold for profit or used in part or in whole for commercial gain
5# without prior written agreement, and the author is credited
6# appropriately.
7#
8# $Id: Makefile.real,v 1.12 1998/11/10 04:03:46 mcooper Exp $
9#
10
11IN_ARGS		= -c
12
13HFILES		= ../config/config.h ../config/config-data.h \
14			../config/config-def.h ../config/os-$(OS).h \
15			../include/defs.h ../include/filesys.h \
16			../include/pathnames.h ../include/rdistpaths.h \
17			../include/version.h
18COMMONOBJS	= $(O)common.o $(O)message.o $(O)setargs.o
19CLIENTOBJS 	= $(O)gram.o $(O)rdist.o $(O)client.o $(O)child.o $(O)docmd.o \
20			$(O)distopt.o $(O)expand.o $(O)lookup.o \
21			$(O)isexec.o $(O)signal.o $(O)rshrcmd.o
22SERVEROBJS	= $(O)rdistd.o $(O)server.o $(O)filesys.o $(O)filesys-os.o
23
24OS_H		= os-$(OS).h
25DEFS		= -DOS_H=\"$(OS_H)\" $(DEFS_SYS) $(DEFS_LOCAL)
26LIBS		= $(LIB_SYS) $(LIBS_LOCAL)
27CFLAGS		= $(OPT) $(DEFS) $(INCLUDE) $(CFLAGS_OS)
28
29INCLUDE		= -I. -I../include -I../config $(OTHERINCS) $(INCLUDE_SYS)
30
31CLIENT_BIN	= $(O)$(CLIENT)
32SERVER_BIN	= $(O)$(SERVER)
33
34all: src
35
36src: $(CLIENT_BIN) $(SERVER_BIN)
37
38$(SERVER_BIN): $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS)
39	$(CC) -o $@ $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS)
40
41$(CLIENT_BIN): $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS)
42	$(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS)
43
44$(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h
45
46y.tab.h: gram.c
47
48clean:
49	rm -f ${CLEANFILES} gram.c *.o \
50		$(CLIENT_BIN) $(SERVER_BIN) \
51		$(CLIENTOBJS) $(SERVEROBJS) \
52		$(COMMONOBJS) $(MISSINGOBJS)
53
54install:
55	$(INSTALL) ${IN_ARGS} \
56		$(CLIENT_BIN) $(BIN_DIR)/$(CLIENT)
57	$(INSTALL) ${IN_ARGS} \
58		$(SERVER_BIN) $(BIN_DIR)/$(SERVER)
59
60install.man:
61