blob: 16bb16da945a1ea8214f01c13eaf12881af5d843 [file] [log] [blame]
Damien Miller7f6ea021999-10-28 13:25:17 +10001prefix=@prefix@
2exec_prefix=@exec_prefix@
3bindir=@bindir@
4sbindir=@sbindir@
5libdir=@libdir@
6
7CC=@CC@
Damien Miller06230761999-10-28 14:03:14 +10008OPT_FLAGS=-g
9CFLAGS=$(OPT_FLAGS) -Wall -DETCDIR=\"@sysconfdir@\" @DEFS@
Damien Millera37010e1999-10-29 09:18:29 +100010TARGETS=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 +100011LFLAGS=-L./bin
Damien Millera37010e1999-10-29 09:18:29 +100012LIBS=-lssh @LIBS@
Damien Miller7f6ea021999-10-28 13:25:17 +100013AR=@AR@
14RANLIB=@RANLIB@
15
16OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \
17 auth-rsa.o bufaux.o buffer.o canohost.o channels.o cipher.o \
18 clientloop.o compress.o crc32.o deattack.o helper.o hostfile.o \
19 log-client.o login.o log-server.o match.o mpaux.o packet.o pty.o \
20 readconf.o readpass.o rsa.o servconf.o serverloop.o \
21 sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \
22 helper.o mktemp.o strlcpy.o rc4.o
23
24all: $(OBJS) $(TARGETS)
25
Damien Millera37010e1999-10-29 09:18:29 +100026bin/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 +100027 [ -d bin ] || mkdir bin
28 $(AR) rv $@ $^
29 $(RANLIB) $@
30
Damien Millera37010e1999-10-29 09:18:29 +100031bin/ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o
Damien Miller7f6ea021999-10-28 13:25:17 +100032 [ -d bin ] || mkdir bin
33 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
34
Damien Millera37010e1999-10-29 09:18:29 +100035bin/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 +100036 [ -d bin ] || mkdir bin
37 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
38
Damien Millera37010e1999-10-29 09:18:29 +100039bin/scp: scp.o
Damien Miller7f6ea021999-10-28 13:25:17 +100040 [ -d bin ] || mkdir bin
41 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
42
Damien Millera37010e1999-10-29 09:18:29 +100043bin/ssh-add: ssh-add.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100044 [ -d bin ] || mkdir bin
45 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
46
Damien Millera37010e1999-10-29 09:18:29 +100047bin/ssh-agent: ssh-agent.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100048 [ -d bin ] || mkdir bin
49 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
50
Damien Millera37010e1999-10-29 09:18:29 +100051bin/ssh-keygen: ssh-keygen.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100052 [ -d bin ] || mkdir bin
53 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
54
55clean:
56 rm -f *.o core bin/* config.status config.cache config.log
57
58install:
59 install -d $(bindir)
60 install -d $(sbindir)
61 install -d $(libdir)
Damien Millera37010e1999-10-29 09:18:29 +100062 install -c bin/ssh $(bindir)/ssh
63 install -c bin/scp $(bindir)/scp
64 install -c bin/ssh-add $(bindir)/ssh-add
65 install -c bin/ssh-agent $(bindir)/ssh-agent
66 install -c bin/ssh-keygen $(bindir)/ssh-keygen
67 install -c bin/sshd $(sbindir)/sshd
68 install -c bin/libssh.a $(libdir)/libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100069
70distclean: clean
71 rm -f Makefile config.h *~
72 rm -rf bin
73
74mrproper: distclean