tftp-hpa-google/tftpd/Makefile
H. Peter Anvin fefaa2cc5c autoconf: modernize and modularize
Use my modular m4 library used for other things as well; update
autoconf macros to 2.71 standard.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-06-10 18:24:53 -07:00

29 lines
715 B
Makefile

SRCROOT = ..
VERSION = $(shell cat ../version)
-include ../config/MCONFIG
include ../MRULES
OBJS = tftpd.$(O) recvfrom.$(O) misc.$(O) $(TFTPDOBJS)
all: tftpd$(X) tftpd.8
tftpd$(X): $(OBJS)
$(CC) $(LDFLAGS) $^ $(TFTPD_LIBS) -o $@
$(OBJS): ../common/tftpsubs.h
tftpd.8: tftpd.8.in ../version
sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
install: all
mkdir -p $(INSTALLROOT)$(SBINDIR) $(INSTALLROOT)$(MANDIR)/man8
$(INSTALL_PROGRAM) tftpd$(X) $(INSTALLROOT)$(SBINDIR)/in.tftpd
$(INSTALL_DATA) tftpd.8 $(INSTALLROOT)$(MANDIR)/man8/in.tftpd.8
cd $(INSTALLROOT)$(MANDIR)/man8 && $(LN_S) -f in.tftpd.8 tftpd.8
clean:
rm -f *.o *.obj *.exe tftpd tftpsubs.c tftpsubs.h tftpd.8
distclean: clean
rm -f *~