2 # $Id: Smakefile,v 1.1.1.2 2005/12/07 10:50:34 sonic_amiga Exp $
4 # Smakefile for AmiTCP/IP network support library
6 # Copyright © 1994 AmiTCP/IP Group,
7 # Network Solutions Development Inc.
16 RM_RECURSIVE= delete all
22 AUTODOC= autodoc -c -C -I -t8
25 GFLAGS= NoOptimize Debug=fullflush
28 CFLAGS_D= DATA=NEAR DEF=USE_DOSIO
30 CFLAGS_DNB=DATA=FAR DEF=USE_DOSIO
31 CFLAGS_S= DATA=NEAR SHORTINTS
33 DEFS= DEF "RCS_ID_C=//" DEF AMITCP=1 DEF NETLIB=1 \
34 DEF __USE_SYSBASE=1 DEF USE_BUILTIN_MATH=1
36 IDIRS= IDIR=netinclude:
37 SCOPTIONS= parm=BOTH Nostackcheck \
38 Stringmerge Noerrorsource Nomultipleincludes Structureequivalence \
39 noversion noerrorhighlight IGNORE=224 IGNORE=92 \
40 optinl optinlocal opttime optcomp=5 optdep=5 optrdep=5 optsched \
44 # Note: sources with leading underscore "_" are specific with SAS C UFB
46 # As the standard autodoc extractor is broken (it allows only for 32 arguments)
47 # don't add sources with autodocs to the end of macro
49 DOCSRC= autoinit.c gettimeofday.c herror.c \
50 lineread.c perror.c printfault.c rcmd.c strerror.c \
51 syslog.c timerinit.c dostat.c utime.c chmod.c _dup.c _dup2.c \
52 chown.c printuserfault.c init_usergroup.c \
53 popen.c sleep.c usleep.c \
54 init_inet_daemon.c set_socket_stdio.c serveraccept.c \
55 dosio_init.c dosio_sprintf.c
57 SASSTDIOSRC= popen.c _dup.c _dup2.c _fstat.c \
58 _allocufb.c _chkufb.c _close.c _lseek.c _open.c _read.c \
59 _write.c fhopen.c iomode.c isatty.c \
60 set_socket_stdio.c pkts.c
62 NETLIBSRC= strerror.c autoinit.c dummy.c lineread.c \
63 getopt.c printfault.c stubs.c perror.c herror.c \
64 timerinit.c gettimeofday.c rcmd.c syslog.c \
65 getpid.c chmod.c chown.c utime.c sleep.c usleep.c \
66 printuserfault.c init_usergroup.c setegid.c seteuid.c \
67 stat.c fib.c dostat.c access.c ioctl.c \
68 init_inet_daemon.c serveraccept.c \
69 linkaddr.c linkntoa.c \
70 dosio_init.c dosio_sprintf.c \
73 SANA2LIBSRC= sana2perror.c sana2errlist.c sana2printfault.c
75 DOCS= netlib.doc sana2lib.doc
77 LIBS= netd.lib net.lib sana2.lib
79 FARLIBS= netdnb.lib netnb.lib sana2nb.lib
81 DLIBS= gnetd.lib gnet.lib gsana2.lib
83 DFARLIBS= gnetdnb.lib gnetnb.lib gsana2nb.lib
85 NETOBJ= strerror.o autoinit.o dummy.o lineread.o \
86 getopt.o printfault.o stubs.o perror.o herror.o \
87 timerinit.o gettimeofday.o rcmd.o syslog.o \
88 getpid.o chmod.o chown.o utime.o popen.o sleep.o usleep.o \
89 printuserfault.o init_usergroup.o setegid.o seteuid.o \
90 _dup.o _dup2.o stat.o _fstat.o fib.o dostat.o access.o \
91 _allocufb.o _chkufb.o _close.o _lseek.o _open.o _read.o \
92 _write.o fhopen.o ioctl.o iomode.o isatty.o \
93 init_inet_daemon.o set_socket_stdio.o serveraccept.o \
94 linkaddr.o linkntoa.o \
95 dosio_init.o dosio_sprintf.o pkts.o
97 NETDOBJ= strerror.do autoinit.do dummy.do lineread.do \
98 getopt.do printfault.do stubs.do perror.do herror.do \
99 timerinit.do gettimeofday.do rcmd.do syslog.do \
100 getpid.do chmod.do chown.do utime.do sleep.do usleep.do \
101 printuserfault.do init_usergroup.do setegid.do seteuid.do \
102 stat.do fib.do dostat.do access.do ioctl.do \
103 init_inet_daemon.do serveraccept.do \
104 linkaddr.do linkntoa.do \
105 dosio_init.do dosio_sprintf.do
107 NETNBOBJ= strerror.nbo autoinit.nbo dummy.nbo lineread.nbo \
108 getopt.nbo printfault.nbo stubs.nbo perror.nbo herror.nbo \
109 timerinit.nbo gettimeofday.nbo rcmd.nbo syslog.nbo \
110 getpid.nbo chmod.nbo chown.nbo utime.nbo popen.nbo sleep.nbo usleep.nbo \
111 printuserfault.nbo init_usergroup.nbo setegid.nbo seteuid.nbo \
112 _dup.nbo _dup2.nbo stat.nbo _fstat.nbo fib.nbo dostat.nbo access.nbo \
113 _allocufb.nbo _chkufb.nbo _close.nbo _lseek.nbo _open.nbo _read.nbo \
114 _write.nbo fhopen.nbo ioctl.nbo iomode.nbo isatty.nbo \
115 init_inet_daemon.nbo set_socket_stdio.nbo serveraccept.nbo \
116 linkaddr.nbo linkntoa.nbo \
117 dosio_init.nbo dosio_sprintf.nbo pkts.nbo
119 NETDNBOBJ= strerror.dnbo autoinit.dnbo dummy.dnbo lineread.dnbo \
120 getopt.dnbo printfault.dnbo stubs.dnbo perror.dnbo herror.dnbo \
121 timerinit.dnbo gettimeofday.dnbo rcmd.dnbo syslog.dnbo \
122 getpid.dnbo chmod.dnbo chown.dnbo utime.dnbo sleep.dnbo usleep.dnbo \
123 printuserfault.dnbo init_usergroup.dnbo setegid.dnbo seteuid.dnbo \
124 stat.dnbo fib.dnbo dostat.dnbo access.dnbo ioctl.dnbo \
125 init_inet_daemon.dnbo serveraccept.dnbo \
126 linkaddr.dnbo linkntoa.dnbo \
127 dosio_init.dnbo dosio_sprintf.dnbo
129 SANA2OBJ= sana2perror.o sana2errlist.o sana2printfault.o
130 SANA2NBOBJ= sana2perror.nbo sana2errlist.nbo sana2printfault.nbo
132 GNETOBJ= strerror.go autoinit.go dummy.go lineread.go \
133 getopt.go printfault.go stubs.go perror.go herror.go \
134 timerinit.go gettimeofday.go rcmd.go syslog.go \
135 getpid.go chmod.go chown.go utime.go popen.go sleep.go usleep.go \
136 printuserfault.go init_usergroup.go setegid.go seteuid.go \
137 _dup.go _dup2.go stat.go _fstat.go fib.go dostat.go access.go \
138 _allocufb.go _chkufb.go _close.go _lseek.go _open.go _read.go \
139 _write.go fhopen.go ioctl.go iomode.go isatty.go \
140 init_inet_daemon.go set_socket_stdio.go serveraccept.go \
141 linkaddr.go linkntoa.go \
142 dosio_init.go dosio_sprintf.go pkts.go
144 GNETDOBJ= strerror.gdo autoinit.gdo dummy.gdo lineread.gdo \
145 getopt.gdo printfault.gdo stubs.gdo perror.gdo herror.gdo \
146 timerinit.gdo gettimeofday.gdo rcmd.gdo syslog.gdo \
147 getpid.gdo chmod.gdo chown.gdo utime.gdo sleep.gdo usleep.gdo \
148 printuserfault.gdo init_usergroup.gdo setegid.gdo seteuid.gdo \
149 stat.gdo fib.gdo dostat.gdo access.gdo ioctl.gdo \
150 init_inet_daemon.gdo serveraccept.gdo \
151 linkaddr.gdo linkntoa.gdo \
152 dosio_init.gdo dosio_sprintf.gdo
154 GNETNBOBJ= strerror.gnbo autoinit.gnbo dummy.gnbo lineread.gnbo \
155 getopt.gnbo printfault.gnbo stubs.gnbo perror.gnbo herror.gnbo \
156 timerinit.gnbo gettimeofday.gnbo rcmd.gnbo syslog.gnbo \
157 getpid.gnbo chmod.gnbo chown.gnbo utime.gnbo popen.gnbo sleep.gnbo usleep.gnbo \
158 printuserfault.gnbo init_usergroup.gnbo setegid.gnbo seteuid.gnbo \
159 _dup.gnbo _dup2.gnbo stat.gnbo _fstat.gnbo fib.gnbo dostat.gnbo access.gnbo \
160 _allocufb.gnbo _chkufb.gnbo _close.gnbo _lseek.gnbo _open.gnbo _read.gnbo \
161 _write.gnbo fhopen.gnbo ioctl.gnbo iomode.gnbo isatty.gnbo \
162 init_inet_daemon.gnbo set_socket_stdio.gnbo serveraccept.gnbo \
163 linkaddr.gnbo linkntoa.gnbo \
164 dosio_init.gnbo dosio_sprintf.gnbo pkts.gnbo
166 GNETDNBOBJ= strerror.gdnbo autoinit.gdnbo dummy.gdnbo lineread.gdnbo \
167 getopt.gdnbo printfault.gdnbo stubs.gdnbo perror.gdnbo herror.gdnbo \
168 timerinit.gdnbo gettimeofday.gdnbo rcmd.gdnbo syslog.gdnbo \
169 getpid.gdnbo chmod.gdnbo chown.gdnbo utime.gdnbo sleep.gdnbo usleep.gdnbo \
170 printuserfault.gdnbo init_usergroup.gdnbo setegid.gdnbo seteuid.gdnbo \
171 stat.gdnbo fib.gdnbo dostat.gdnbo access.gdnbo ioctl.gdnbo \
172 init_inet_daemon.gdnbo serveraccept.gdnbo \
173 linkaddr.gdnbo linkntoa.gdnbo \
174 dosio_init.gdnbo dosio_sprintf.gdnbo
176 GSANA2OBJ= sana2perror.go sana2errlist.go sana2printfault.go
177 GSANA2NBOBJ= sana2perror.gnbo sana2errlist.gnbo sana2printfault.gnbo
179 .SUFFIXES: .c .o .go .do .gdo .nbo .gnbo .dnbo .gdnbo
184 $(CC) $(CFLAGS) $(OFLAGS) $*.c
186 $(CC) $(CFLAGS_D) $(OFLAGS) $*.c OBJNAME=$*.do
188 $(CC) $(CFLAGS_NB) $(OFLAGS) $*.c OBJNAME=$*.nbo
190 $(CC) $(CFLAGS_DNB) $(OFLAGS) $*.c OBJNAME=$*.dnbo
192 $(CC) $(CFLAGS_S) $(OFLAGS) $*.c OBJNAME=$*.so
194 $(CC) $(CFLAGS) $(GFLAGS) $*.c OBJNAME=$*.go
196 $(CC) $(CFLAGS_D) $(GFLAGS) $*.c OBJNAME=$*.gdo
198 $(CC) $(CFLAGS_NB) $(GFLAGS) $*.c OBJNAME=$*.gnbo
200 $(CC) $(CFLAGS_DNB) $(GFLAGS) $*.c OBJNAME=$*.gdnbo
202 $(CC) $(CFLAGS_S) $(GFLAGS) $*.c OBJNAME=$*.gso
204 normal: SCOPTIONS $(LIBS) $(DOCS)
206 all: normal $(FARLIBS)
208 debug: SCOPTIONS $(DLIBS) $(DFARLIBS)
210 install: normal $(DEST)netlib $(DEST)doc
211 $(CP) $(LIBS) $(DEST)netlib
212 $(CP) $(DOCS) $(DEST)doc
213 install-all: all install $(DEST)netlib
214 $(CP) $(FARLIBS) $(DEST)netlib
215 install-debug: debug $(DEST)netlib
216 $(CP) $(DLIBS) $(DFARLIBS) $(DEST)netlib
223 netlib.doc: $(NETLIBSRC)
224 $(AUTODOC) $(DOCSRC) >$@
225 sana2lib.doc: $(SANA2LIBSRC)
226 $(AUTODOC) $(SANA2LIBSRC) >$@
248 netnb.lib: $(NETNBOBJ)
254 netdnb.lib: $(NETDNBOBJ)
261 # Sana2.lib, convenience functions for Sana2 utilities
263 sana2.lib: $(SANA2OBJ)
266 sana2nb.lib: $(SANA2NBOBJ)
268 oml $@ r $(SANA2NBOBJ)
270 # Debugging libraries
278 gnetd.lib: $(GNETDOBJ)
284 gnetnb.lib: $(GNETNBOBJ)
290 gnetdnb.lib: $(GNETDNBOBJ)
296 gsana2.lib: $(GSANA2OBJ)
298 oml $@ r $(GSANA2OBJ)
299 gsana2nb.lib: $(GSANA2NBOBJ)
301 oml $@ r $(GSANA2NBOBJ)
304 -$(RM) \#?.(lib|o|do|nbo|dnbo|so|go|gdo|gnbo|gdnbo|gso) SCOPTIONS
306 # DO NOT DELETE THIS LINE -- make depend depends on it.