blob: 436bc2ea112b73b85c32bb37c4f906a81f31c676 [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
8CC=@CC@
Damien Miller06230761999-10-28 14:03:14 +10009OPT_FLAGS=-g
10CFLAGS=$(OPT_FLAGS) -Wall -DETCDIR=\"@sysconfdir@\" @DEFS@
Damien Millera37010e1999-10-29 09:18:29 +100011TARGETS=bin/libssh.a bin/ssh bin/sshd bin/ssh-add bin/ssh-keygen bin/ssh-agent bin/scp
Damien Miller7f6ea021999-10-28 13:25:17 +100012LFLAGS=-L./bin
Damien Millera37010e1999-10-29 09:18:29 +100013LIBS=-lssh @LIBS@
Damien Miller7f6ea021999-10-28 13:25:17 +100014AR=@AR@
15RANLIB=@RANLIB@
16
17OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \
18 auth-rsa.o bufaux.o buffer.o canohost.o channels.o cipher.o \
19 clientloop.o compress.o crc32.o deattack.o helper.o hostfile.o \
20 log-client.o login.o log-server.o match.o mpaux.o packet.o pty.o \
21 readconf.o readpass.o rsa.o servconf.o serverloop.o \
22 sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \
23 helper.o mktemp.o strlcpy.o rc4.o
24
25all: $(OBJS) $(TARGETS)
26
Damien Millera37010e1999-10-29 09:18:29 +100027bin/libssh.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 +100028 [ -d bin ] || mkdir bin
29 $(AR) rv $@ $^
30 $(RANLIB) $@
31
Damien Millera37010e1999-10-29 09:18:29 +100032bin/ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o
Damien Miller7f6ea021999-10-28 13:25:17 +100033 [ -d bin ] || mkdir bin
34 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
35
Damien Millera37010e1999-10-29 09:18:29 +100036bin/sshd: 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 +100037 [ -d bin ] || mkdir bin
38 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
39
Damien Millera37010e1999-10-29 09:18:29 +100040bin/scp: scp.o
Damien Miller7f6ea021999-10-28 13:25:17 +100041 [ -d bin ] || mkdir bin
42 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
43
Damien Millera37010e1999-10-29 09:18:29 +100044bin/ssh-add: ssh-add.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100045 [ -d bin ] || mkdir bin
46 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
47
Damien Millera37010e1999-10-29 09:18:29 +100048bin/ssh-agent: ssh-agent.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100049 [ -d bin ] || mkdir bin
50 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
51
Damien Millera37010e1999-10-29 09:18:29 +100052bin/ssh-keygen: ssh-keygen.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100053 [ -d bin ] || mkdir bin
54 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
55
56clean:
57 rm -f *.o core bin/* config.status config.cache config.log
58
59install:
60 install -d $(bindir)
61 install -d $(sbindir)
Damien Miller94388161999-10-29 09:57:31 +100062 install -d $(mandir)
63 install -d $(mandir)/man1
64 install -d $(mandir)/man8
65 install -s -c bin/ssh $(bindir)/ssh
66 install -s -c bin/scp $(bindir)/scp
67 install -s -c bin/ssh-add $(bindir)/ssh-add
68 install -s -c bin/ssh-agent $(bindir)/ssh-agent
69 install -s -c bin/ssh-keygen $(bindir)/ssh-keygen
70 install -s -c bin/sshd $(sbindir)/sshd
71 install -m644 -c ssh.1 $(mandir)/man1/ssh.1
72 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
79 rm -f Makefile config.h *~
80 rm -rf bin
81
82mrproper: distclean