Make the version number automatically included in the man page footer
[tftp-hpa.git] / tftp / Makefile
blob9889b7cd874517bb33d020bdc594f7d8a6917feb
1 all: tftp tftp.1
3 SRCROOT = ..
4 VERSION = $(shell cat ../version)
6 -include ../MCONFIG
7 include ../MRULES
9 OBJS = tftp.o main.o tftpsubs.o
11 tftp: $(OBJS)
12 $(CC) $(LDFLAGS) $^ $(TFTP_LIBS) -o $@
14 $(OBJS): tftpsubs.h
16 tftp.1: tftp.1.in ../version
17 sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
19 install: all
20 mkdir -p $(INSTALLROOT)$(BINDIR) $(INSTALLROOT)$(MANDIR)/man1
21 $(INSTALL_PROGRAM) tftp $(INSTALLROOT)$(BINDIR)
22 $(INSTALL_DATA) tftp.1 $(INSTALLROOT)$(MANDIR)/man1
24 clean:
25 rm -f *.o tftp tftp.1
27 distclean: clean
28 rm -f *~