]> andersk Git - openssh.git/blob - Makefile.in
- Added "make host-key" target, Suggestion from Dominik Brettnacher
[openssh.git] / Makefile.in
1 prefix=@prefix@
2 exec_prefix=@exec_prefix@
3 bindir=@bindir@
4 sbindir=@sbindir@
5 libexecdir=@libexecdir@
6 mandir=@mandir@
7 mansubdir=@mansubdir@
8 sysconfdir=@sysconfdir@
9 piddir=@piddir@
10 srcdir=@srcdir@
11 top_srcdir=@top_srcdir@
12
13 DESTDIR=
14
15 VPATH=@srcdir@
16
17 SSH_PROGRAM=@bindir@/ssh
18 ASKPASS_LOCATION=@libexecdir@/ssh
19 ASKPASS_PROGRAM=$(ASKPASS_LOCATION)/ssh-askpass
20
21 CC=@CC@
22 PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\"
23 CFLAGS=@CFLAGS@ $(PATHS) @DEFS@
24 EXTRA_TARGETS=@GNOME_ASKPASS@
25 LIBS=@LIBS@
26 AR=@AR@
27 RANLIB=@RANLIB@
28 INSTALL=@INSTALL@
29 PERL=@PERL@
30 LDFLAGS=-L. @LDFLAGS@
31
32 GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
33 GNOME_LIBS=`gnome-config --libs gnome gnomeui`
34
35 TARGETS=ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)
36
37 LIBOBJS= atomicio.o authfd.o authfile.o bsd-bindresvport.o bsd-daemon.o bsd-misc.o bsd-mktemp.o bsd-rresvport.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o fake-getaddrinfo.o fake-getnameinfo.o fingerprint.o hostfile.o log.o match.o mpaux.o nchan.o packet.o radix.o random.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o xmalloc.o 
38
39 SSHOBJS= ssh.o sshconnect.o log-client.o readconf.o clientloop.o
40
41 SSHDOBJS= sshd.o auth-rhosts.o auth-krb4.o auth-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o bsd-login.o md5crypt.o
42
43 TROFFMAN        = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8
44 CATMAN          = scp.0 ssh-add.0 ssh-agent.0 ssh-keygen.0 ssh.0 sshd.0
45 MANPAGES        = @MANTYPE@
46
47 CONFIGFILES=sshd_config ssh_config
48
49 PATHSUBS        = -D/etc/ssh_config=$(sysconfdir)/ssh_config -D/etc/known_hosts=$(sysconfdir)/ssh_known_hosts -D/etc/sshd_config=$(sysconfdir)/sshd_config -D/etc/shosts.equiv=$(sysconfdir)/shosts.equiv -D/etc/ssh_host_key=$(sysconfdir)/ssh_host_key -D/var/run/sshd.pid=$(piddir)/sshd.pid
50
51 FIXPATHSCMD     = $(PERL) $(srcdir)/fixpaths $(PATHSUBS)
52
53 all: $(TARGETS) $(MANPAGES) $(CONFIGFILES)
54
55 $(LIBOBJS): config.h
56
57 libssh.a: $(LIBOBJS)
58         $(AR) rv $@ $(LIBOBJS)
59         $(RANLIB) $@
60
61 ssh: libssh.a $(SSHOBJS)
62         $(CC) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh $(LIBS)
63
64 sshd: libssh.a  $(SSHDOBJS)
65         $(CC) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh $(LIBS)
66
67 scp: libssh.a scp.o
68         $(CC) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS) 
69
70 ssh-add: libssh.a ssh-add.o log-client.o
71         $(CC) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS) 
72
73 ssh-agent: libssh.a ssh-agent.o log-client.o
74         $(CC) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS) 
75
76 ssh-keygen: libssh.a ssh-keygen.o log-client.o
77         $(CC) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh $(LIBS) 
78
79 gnome-ssh-askpass: gnome-ssh-askpass.c
80         $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
81
82 $(MANPAGES) $(CONFIGFILES)::
83         $(FIXPATHSCMD) $(srcdir)/$@
84
85 clean:
86         rm -f *.o *.a $(TARGETS) config.status config.cache config.log 
87         rm -f *.out core
88
89 distclean: clean
90         rm -f Makefile config.h core *~
91
92 mrproper: distclean
93
94 veryclean: distclean
95         rm -f configure config.h.in *.0
96
97 catman-do:
98         @for f in $(TROFFMAN) ; do \
99                 echo "$$f -> $${f%%.[18]}.0" ; \
100                 nroff -mandoc $$f | cat -v | sed -e 's/.\^H//g' \
101                         >$${f%%.[18]}.0 ; \
102         done
103
104 install: $(TARGETS)
105         $(INSTALL) -d $(DESTDIR)$(bindir)
106         $(INSTALL) -d $(DESTDIR)$(sbindir)
107         $(INSTALL) -d $(DESTDIR)$(mandir)
108         $(INSTALL) -d $(DESTDIR)$(mandir)/$(mansubdir)1
109         $(INSTALL) -d $(DESTDIR)$(mandir)/$(mansubdir)8
110         $(INSTALL) -m 4755 -s ssh $(DESTDIR)$(bindir)/ssh
111         $(INSTALL) -s scp $(DESTDIR)$(bindir)/scp
112         $(INSTALL) -s ssh-add $(DESTDIR)$(bindir)/ssh-add
113         $(INSTALL) -s ssh-agent $(DESTDIR)$(bindir)/ssh-agent
114         $(INSTALL) -s ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen
115         $(INSTALL) -s sshd $(DESTDIR)$(sbindir)/sshd
116         $(INSTALL) -m 644 ssh.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
117         $(INSTALL) -m 644 scp.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
118         $(INSTALL) -m 644 ssh-add.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
119         $(INSTALL) -m 644 ssh-agent.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
120         $(INSTALL) -m 644 ssh-keygen.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
121         $(INSTALL) -m 644 sshd.[08].out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
122         -rm -f $(DESTDIR)$(bindir)/slogin
123         ln -s ssh $(DESTDIR)$(bindir)/slogin
124         -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
125         ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
126
127         if [ ! -z "@GNOME_ASKPASS@" ] ; then \
128                 $(INSTALL) -d $(DESTDIR)$(libexecdir) ; \
129                 $(INSTALL) -d $(DESTDIR)$(libexecdir)/ssh ; \
130                 $(INSTALL) -s @GNOME_ASKPASS@ $(DESTDIR)${ASKPASS_LOCATION} ; \
131         fi
132
133         if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config -a ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
134                 $(INSTALL) -d $(DESTDIR)$(sysconfdir); \
135                 $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
136                 $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \
137         fi
138
139 host-key: ssh-keygen
140         ./ssh-keygen -b 1024 -f $(sysconfdir)/ssh_host_key -N ''
141
142 uninstallall:   uninstall
143         -rm -f $(DESTDIR)$(sysconfdir)/ssh_config
144         -rm -f $(DESTDIR)$(sysconfdir)/sshd_config
145         -rmdir $(DESTDIR)$(sysconfdir)
146         -rmdir $(DESTDIR)$(bindir)
147         -rmdir $(DESTDIR)$(sbindir)
148         -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1
149         -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8
150         -rmdir $(DESTDIR)$(mandir)
151         -rmdir $(DESTDIR)$(libexecdir)
152
153 uninstall: 
154         -rm -f $(DESTDIR)$(bindir)/ssh
155         -rm -f $(DESTDIR)$(bindir)/scp
156         -rm -f $(DESTDIR)$(bindir)/ssh-add
157         -rm -f $(DESTDIR)$(bindir)/ssh-agent
158         -rm -f $(DESTDIR)$(bindir)/ssh-keygen
159         -rm -f $(DESTDIR)$(sbindir)/sshd
160         -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
161         -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
162         -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
163         -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
164         -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
165         -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
166         -rm -f $(DESTDIR)$(bindir)/slogin
167         -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
168         -rm -f $(DESTDIR)${ASKPASS_PROGRAM}
169         -rmdir $(DESTDIR)$(libexecdir)/ssh ;
This page took 0.056247 seconds and 5 git commands to generate.