OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / msntp / Makefile
1 # Makefile for msntp
2 # N.M. Maclaren, October 2000.
3
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.
8
9 # These options will work on most modern systems.  Start with them, and add
10 # any necessary options.
11 # CC = cc
12 # CFLAGS = -O
13 # LDFLAGS =
14 # LIBS = -lm
15
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.
19 # CC = gcc -ansi
20 # CFLAGS = -O -DNONBLOCK_BROKEN
21 # LDFLAGS =
22 # LIBS = -lm
23
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.
28 # CC = cc -Xc
29 # CFLAGS = -O -v
30 # LDFLAGS =
31 # LIBS = -lm -lsocket -lnsl
32
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
36 # CFLAGS = -O
37 # LDFLAGS =
38 # LIBS = -lm
39
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
43 # LDFLAGS =
44 # LIBS = -lm
45
46 # The following settings can be used under Digital Unix (aka DEC OSF/1).
47 # CC = cc -std1
48 # CFLAGS = -O
49 # LDFLAGS =
50 # LIBS = -lm
51
52 # The following settings can be used under DEC Ultrix 4.3 on a MIPS.
53 # CC = gcc -ansi
54 # CFLAGS = -O -DNONBLOCK_BROKEN
55 # LDFLAGS =
56 # LIBS = -lm
57
58 # The following settings can be used under SGI Irix.
59 # CC = cc -ansi
60 # CFLAGS = -O
61 # LDFLAGS =
62 # LIBS = -lm
63
64 # The following settings can be used under Hitachi HI-UX/WE2.
65 # CC = cc -Aa -D_HIUX_SOURCE
66 # CFLAGS = -O
67 # DFLAGS =
68 # LIBS = -lm
69
70 # The following settings can be used under Hitachi HI-OSF/1-MJ and HI-UX/MPP.
71 # CC = cc
72 # CFLAGS = -O
73 # LDFLAGS =
74 # LIBS = -lm
75
76 # The following settings can be used under at least NextStep 3.  cc is a
77 # wrapper for gcc.
78 # CC = cc -D_POSIX_SOURCE
79 # CFLAGS = -O
80 # LDFLAGS =
81 # LIBS = -lm
82
83 # The following settings can be used under Unicos.
84 # CC = cc -DNONBLOCK_BROKEN
85 # CFLAGS = -O
86 # LDFLAGS = 
87 # LIBS = -lm
88
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
93 # CFLAGS = -O
94 # LDFLAGS = 
95 # LIBS = -lm
96
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.
101 # CC = gcc -ansi
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
106 # LDFLAGS = 
107 # LIBS = -lm
108
109 LIBS = -lm
110 CFLAGS += -DLOCKNAME='"/var/run/msntp.pid"' -DSAVENAME='"/var/run/msntp.state"'
111
112 all: msntp
113
114 clean:
115         rm -f msntp msntp-1.5.tar.gz *~ *.o core *.gdb
116
117 archive:
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
124
125 install:
126         @echo "This does not actually install anything; do something like:"
127         @echo ""
128         @echo "cp msntp /usr/local/bin"
129         @echo "cp msntp.1 /usr/local/man/man1"
130
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 \
133 $(LIBS) $(LDLIBS)
134
135 main.o: main.c header.h kludges.h
136
137 unix.o: unix.c header.h kludges.h
138
139 internet.o: internet.c header.h internet.h kludges.h
140
141 socket.o: socket.c header.h internet.h kludges.h
142
143 timing.o: timing.c header.h kludges.h
144
145 romfs:
146         $(ROMFSINST) /bin/msntp