blob: f182af3b371a5a497867b020d7a0909751439018 [file] [log] [blame]
Damien Miller7f6ea021999-10-28 13:25:17 +10001prefix=@prefix@
2exec_prefix=@exec_prefix@
3bindir=@bindir@
4sbindir=@sbindir@
5libdir=@libdir@
Damien Miller94388161999-10-29 09:57:31 +10006mandir=@mandir@
Damien Miller7f6ea021999-10-28 13:25:17 +10007
Damien Millerc7b38ce1999-11-09 10:28:04 +11008SSH_PROGRAM=@bindir@/ssh
9ASKPASS_PROGRAM=@libdir@/ssh/ssh-askpass
10
Damien Miller7f6ea021999-10-28 13:25:17 +100011CC=@CC@
Damien Millerc7b38ce1999-11-09 10:28:04 +110012PATHS=-DETCDIR=\"@sysconfdir@\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DASKPASS_PROGRAM=\"$(ASKPASS_PROGRAM)\"
13CFLAGS=@CFLAGS@ $(PATHS) @DEFS@
Damien Miller3c5cb381999-10-29 12:06:53 +100014TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp
15LFLAGS=-L.
Damien Millera37010e1999-10-29 09:18:29 +100016LIBS=-lssh @LIBS@
Damien Miller7f6ea021999-10-28 13:25:17 +100017AR=@AR@
18RANLIB=@RANLIB@
19
20OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \
21 auth-rsa.o bufaux.o buffer.o canohost.o channels.o cipher.o \
22 clientloop.o compress.o crc32.o deattack.o helper.o hostfile.o \
23 log-client.o login.o log-server.o match.o mpaux.o packet.o pty.o \
24 readconf.o readpass.o rsa.o servconf.o serverloop.o \
25 sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \
26 helper.o mktemp.o strlcpy.o rc4.o
27
28all: $(OBJS) $(TARGETS)
29
Damien Miller3c5cb381999-10-29 12:06:53 +100030libssh.a: authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o hostfile.o match.o mpaux.o nchan.o packet.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o xmalloc.o helper.o rc4.o mktemp.o strlcpy.o
Damien Miller7f6ea021999-10-28 13:25:17 +100031 $(AR) rv $@ $^
32 $(RANLIB) $@
33
Damien Miller3c5cb381999-10-29 12:06:53 +100034ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o
Damien Miller7f6ea021999-10-28 13:25:17 +100035 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
36
Damien Miller3c5cb381999-10-29 12:06:53 +100037sshd: sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o
Damien Miller7f6ea021999-10-28 13:25:17 +100038 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
39
Damien Miller3c5cb381999-10-29 12:06:53 +100040scp: scp.o
Damien Miller7f6ea021999-10-28 13:25:17 +100041 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
42
Damien Miller3c5cb381999-10-29 12:06:53 +100043ssh-add: ssh-add.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100044 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
45
Damien Miller3c5cb381999-10-29 12:06:53 +100046ssh-agent: ssh-agent.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100047 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
48
Damien Miller3c5cb381999-10-29 12:06:53 +100049ssh-keygen: ssh-keygen.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100050 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
51
52clean:
Damien Miller3c5cb381999-10-29 12:06:53 +100053 rm -f *.o core $(TARGETS) config.status config.cache config.log
Damien Miller356a0b01999-11-08 15:30:59 +110054
Damien Miller7f6ea021999-10-28 13:25:17 +100055install:
56 install -d $(bindir)
57 install -d $(sbindir)
Damien Miller94388161999-10-29 09:57:31 +100058 install -d $(mandir)
59 install -d $(mandir)/man1
60 install -d $(mandir)/man8
Damien Millerc7b38ce1999-11-09 10:28:04 +110061 install -d $(libdir)/ssh
Damien Miller3c5cb381999-10-29 12:06:53 +100062 install -s -c ssh $(bindir)/ssh
Damien Millerc7b38ce1999-11-09 10:28:04 +110063 ln -sf ssh $(bindir)/slogin
Damien Miller3c5cb381999-10-29 12:06:53 +100064 install -s -c scp $(bindir)/scp
65 install -s -c ssh-add $(bindir)/ssh-add
Damien Miller356a0b01999-11-08 15:30:59 +110066 install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass
Damien Miller3c5cb381999-10-29 12:06:53 +100067 install -s -c ssh-agent $(bindir)/ssh-agent
68 install -s -c ssh-keygen $(bindir)/ssh-keygen
69 install -s -c sshd $(sbindir)/sshd
Damien Miller94388161999-10-29 09:57:31 +100070 install -m644 -c ssh.1 $(mandir)/man1/ssh.1
Damien Millerc7b38ce1999-11-09 10:28:04 +110071 ln -sf ssh.1 $(mandir)/man1/slogin.1
Damien Miller94388161999-10-29 09:57:31 +100072 install -m644 -c scp.1 $(mandir)/man1/scp.1
73 install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1
74 install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1
75 install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
76 install -m644 -c sshd.8 $(mandir)/man8/sshd.8
Damien Miller7f6ea021999-10-28 13:25:17 +100077
78distclean: clean
Damien Miller356a0b01999-11-08 15:30:59 +110079 rm -f Makefile config.h core *~
Damien Miller7f6ea021999-10-28 13:25:17 +100080
81mrproper: distclean
Damien Miller356a0b01999-11-08 15:30:59 +110082
83veryclean: distclean
Damien Millerc7b38ce1999-11-09 10:28:04 +110084 rm -f configure config.h.in
85