summaryrefslogtreecommitdiffstats
path: root/crypto/kerberosIV/appl/bsd/Makefile.in
blob: fdda8c19e28acc15820ac0541a7eace9ce0de02d (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
# $Id: Makefile.in,v 1.68 1999/03/27 17:05:34 joda Exp $

SHELL = /bin/sh

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@

top_builddir = ../..

CC = @CC@
LINK = @LINK@
AR = ar
RANLIB = @RANLIB@
DEFS = @DEFS@ -DBINDIR='"$(bindir)"'
CFLAGS = @CFLAGS@ $(WFLAGS)
WFLAGS = @WFLAGS@
LD_FLAGS = @LD_FLAGS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LIBS = @LIBS@
LIB_DBM = @LIB_DBM@
MKINSTALLDIRS = @top_srcdir@/mkinstalldirs

prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
libexecdir = @libexecdir@
bindir = @bindir@
transform=@program_transform_name@
EXECSUFFIX=@EXECSUFFIX@

# Beware, these are all setuid root programs
PROG_SUIDBIN	= rsh$(EXECSUFFIX) \
		  rcp$(EXECSUFFIX) \
		  rlogin$(EXECSUFFIX) \
		  su$(EXECSUFFIX)
PROG_BIN	= login$(EXECSUFFIX)
PROG_LIBEXEC	= rshd$(EXECSUFFIX) \
		  rlogind$(EXECSUFFIX)
PROGS = $(PROG_SUIDBIN) $(PROG_BIN) $(PROG_LIBEXEC)

SOURCES = rsh.c kcmd.c krcmd.c rlogin.c rcp.c rcp_util.c rshd.c \
	login.c klogin.c login_access.c su.c rlogind.c \
	login_fbtab.c forkpty.c sysv_default.c sysv_environ.c sysv_shadow.c \
	utmp_login.c utmpx_login.c stty_default.c encrypt.c rcmd_util.c tty.c \
	osfc2.c

rsh_OBJS	= rsh.o kcmd.o krcmd.o encrypt.o rcmd_util.o
rcp_OBJS	= rcp.o rcp_util.o kcmd.o krcmd.o encrypt.o rcmd_util.o osfc2.o
rlogin_OBJS	= rlogin.o kcmd.o krcmd.o encrypt.o rcmd_util.o
login_OBJS 	= login.o klogin.o login_fbtab.o login_access.o \
		  sysv_default.o sysv_environ.o sysv_shadow.o \
		  utmp_login.o utmpx_login.o stty_default.o tty.o osfc2.o
su_OBJS		= su.o
rshd_OBJS	= rshd.o encrypt.o rcmd_util.o osfc2.o
rlogind_OBJS	= rlogind.o forkpty.o encrypt.o rcmd_util.o tty.o


all: $(PROGS) 

Wall:
	make CFLAGS="-g -Wall -Wno-comment -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"

.c.o: 
	$(CC) -c $(DEFS) -I../../include -I$(srcdir) $(CFLAGS) $(CPPFLAGS) $<

install: all
	$(MKINSTALLDIRS) $(DESTDIR)$(libexecdir)
	for x in $(PROG_LIBEXEC); do \
	  $(INSTALL_PROGRAM) $$x $(DESTDIR)$(libexecdir)/`echo $$x| sed '$(transform)'`; \
	done
	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
	for x in $(PROG_BIN); do \
	  $(INSTALL_PROGRAM) $$x $(DESTDIR)$(bindir)/`echo $$x| sed '$(transform)'`; \
	done
	-for x in $(PROG_SUIDBIN); do \
	  $(INSTALL_PROGRAM) -o root -m 04555 $$x $(DESTDIR)$(bindir)/`echo $$x| sed '$(transform)'`; \
	done

uninstall:
	for x in $(PROG_LIBEXEC); do \
	  rm -f $(DESTDIR)$(libexecdir)/`echo $$x| sed '$(transform)'`; \
	done
	for x in $(PROG_BIN); do \
	  rm -f $(DESTDIR)$(bindir)/`echo $$x| sed '$(transform)'`; \
	done
	for x in $(PROG_SUIDBIN); do \
	  rm -f $(DESTDIR)$(bindir)/`echo $$x| sed '$(transform)'`; \
	done

TAGS: $(SOURCES)
	etags $(SOURCES)

check:

clean:
	rm -f *.a *.o $(PROGS)

mostlyclean: clean

distclean: clean
	rm -f Makefile *.tab.c *~

realclean: distclean
	rm -f TAGS

KLIB=-L../../lib/krb -lkrb -L../../lib/des -ldes
KLIB_AFS=@KRB_KAFS_LIB@ $(KLIB)
OTPLIB=@LIB_otp@
LIBROKEN=-L../../lib/roken -lroken

LIB_security=@LIB_security@

rcp$(EXECSUFFIX): $(rcp_OBJS)
	$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ $(rcp_OBJS) $(KLIB_AFS) $(LIBROKEN) $(LIBS) $(LIBROKEN) $(LIB_security)

rsh$(EXECSUFFIX): $(rsh_OBJS)
	$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ $(rsh_OBJS) $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)

rshd$(EXECSUFFIX): $(rshd_OBJS)
	$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ $(rshd_OBJS) $(KLIB_AFS) $(LIBROKEN) $(LIBS) $(LIBROKEN) $(LIB_security)

rlogin$(EXECSUFFIX): $(rlogin_OBJS)
	$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@  $(rlogin_OBJS) $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)

rlogind$(EXECSUFFIX): $(rlogind_OBJS)
	$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ $(rlogind_OBJS) $(KLIB_AFS) $(LIBROKEN) $(LIBS) $(LIBROKEN)

login$(EXECSUFFIX): $(login_OBJS)
	$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ $(login_OBJS) $(OTPLIB) $(KLIB_AFS) $(LIBROKEN) $(LIB_DBM) $(LIBS) $(LIBROKEN) $(LIB_security)

su$(EXECSUFFIX): $(su_OBJS)
	$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ $(su_OBJS) $(KLIB_AFS) $(LIBROKEN) $(LIBS) $(LIBROKEN)

.PHONY: all Wall install uninstall check clean mostlyclean distclean realclean
OpenPOWER on IntegriCloud