2 # N.M. Maclaren, October 2000.
4 # Take a look at README for the various preprocessor symbols, but they are
5 # extremely unlikely to be needed on newer systems. You may prefer to change
6 # LOCKNAME and SAVENAME to use /var/run (or even /tmp) rather than /etc. Note
7 # that not all of the following system settings have been tested recently.
9 # These options will work on most modern systems. Start with them, and add
10 # any necessary options.
16 # Compiling this sort of ANSI C under SunOS 4.1 is a mug's game, because Sun's
17 # Unix headers make GNU C vomit even in compatibility mode, but the following
18 # will compile main.c and unix.c. At least two people have got it to work.
20 # CFLAGS = -O -DNONBLOCK_BROKEN
24 # The following settings can be used under SOME versions of Solaris 2, but
25 # -D_XOPEN_SOURCE should probably be added on versions where setting that
26 # does not cause it to reject its own headers! They can also be used under
27 # UnixWare, probably with similar constraints.
31 # LIBS = -lm -lsocket -lnsl
33 # The following settings can be used under HP-UX 10.0 and later on PA-RISC and
34 # HP-UX 9.03 and later on 68000.
35 # CC = cc -Aa -D_HPUX_SOURCE
40 # The following settings can be used under HP-UX before 10.0 on PA-RISC.
41 # CC = cc -Aa -D_HPUX_SOURCE
42 # CFLAGS = -O -DADJTIME_MISSING
46 # The following settings can be used under Digital Unix (aka DEC OSF/1).
52 # The following settings can be used under DEC Ultrix 4.3 on a MIPS.
54 # CFLAGS = -O -DNONBLOCK_BROKEN
58 # The following settings can be used under SGI Irix.
64 # The following settings can be used under Hitachi HI-UX/WE2.
65 # CC = cc -Aa -D_HIUX_SOURCE
70 # The following settings can be used under Hitachi HI-OSF/1-MJ and HI-UX/MPP.
76 # The following settings can be used under at least NextStep 3. cc is a
78 # CC = cc -D_POSIX_SOURCE
83 # The following settings can be used under Unicos.
84 # CC = cc -DNONBLOCK_BROKEN
89 # The following settings can be used under Linux. While adjtime is present,
90 # it is completely broken (i.e. it will work only if xntp is running), so it
91 # is a good idea to add -DADJTIME_MISSING.
92 # CC = cc -DADJTIME_MISSING
97 # It has been compiled with the following options, though with quite a lot of
98 # warnings (many due to system header bugs!) All functions defined without a
99 # previous declaration should be internal to that file - static is not used
100 # because it often interferes with debugging.
102 # CFLAGS = -O -pedantic -Wall -Wtraditional -Wshadow -Wpointer-arith \
103 # -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return \
104 # -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
105 # -Wredundant-decls -Wnested-externs
110 CFLAGS += -DLOCKNAME='"/var/run/msntp.pid"' -DSAVENAME='"/var/run/msntp.state"'
115 rm -f msntp msntp-1.5.tar.gz *~ *.o core *.gdb
118 (cd ..; tar -cvf - msntp-1.6/README msntp-1.6/Copyright \
119 msntp-1.6/Makefile msntp-1.6/msntp.1 msntp-1.6/RFC2030.TXT \
120 msntp-1.6/header.h msntp-1.6/internet.h msntp-1.6/kludges.h \
121 msntp-1.6/main.c msntp-1.6/unix.c msntp-1.6/internet.c msntp-1.6/socket.c \
122 msntp-1.6/timing.c) | \
123 gzip > msntp-1.6.tar.gz
126 @echo "This does not actually install anything; do something like:"
128 @echo "cp msntp /usr/local/bin"
129 @echo "cp msntp.1 /usr/local/man/man1"
131 msntp: main.o unix.o internet.o socket.o timing.o
132 $(CC) $(LDFLAGS) -o msntp main.o unix.o internet.o socket.o timing.o \
135 main.o: main.c header.h kludges.h
137 unix.o: unix.c header.h kludges.h
139 internet.o: internet.c header.h internet.h kludges.h
141 socket.o: socket.c header.h internet.h kludges.h
143 timing.o: timing.c header.h kludges.h
146 $(ROMFSINST) /bin/msntp