Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / network / stacks / AROSTCP / netlib / Makefile
blob5dfccbf518ce487113a28f286aa73abf3a4b7dfa
1 # $Id: Makefile,v 1.13 2006/12/15 08:45:26 sonic_amiga Exp $
3 # Makefile for AmiTCP/IP network support library
5 # Copyright © 2005 - 2006 Pavel Fedin
7 # Based on Smakefile which is
8 # Copyright © 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
9 # Helsinki University of Technology, Finland.
10 # All rights reserved.
12 # Created : Tue Oct 11 13:11:57 2005 sonic
13 # Last modified: Wed Oct 12 21:28:57 2005 sonic
15 # $Log: Makefile,v $
16 # Revision 1.13 2006/12/15 08:45:26 sonic_amiga
17 # - miami.library moved into the kernel
18 # - usergroup.library reintegrated into the main package and heavily refactored
19 # - updated autodocs
21 # Revision 1.9 2005/11/29 06:28:06 sonic_amiga
22 # - EZTCP_FindKernVar() function declared private
23 # - kvm functions moved from netlib to separate private library
24 # - asprintf() and err() family now work
25 # - added SIOCGIFMTU and SIOCGIFINDEX definitions
27 # Revision 1.8 2005/11/28 09:40:17 sonic_amiga
28 # Added some more functions
30 # Revision 1.7 2005/11/28 06:26:15 sonic_amiga
31 # KVM functions now work
33 # Revision 1.6 2005/11/23 08:07:22 sonic_amiga
34 # Replaced back kill() removed by mistake
36 # Revision 1.5 2005/11/22 12:35:17 sonic_amiga
37 # Removed unfinished and unused functions
39 # Revision 1.4 2005/11/14 06:15:09 sonic_amiga
40 # - Added some more functions
41 # - kill.c fixed, now compiles
43 # Revision 1.3 2005/11/10 14:20:55 sonic_amiga
44 # Added ExecVEAsync() function
46 # Revision 1.2 2005/11/09 08:39:26 sonic_amiga
47 # Added kill() function
49 # Revision 1.1.1.1 2005/11/08 13:51:05 sonic_amiga
50 # Initial partial import upon request
53 SDK_INSTALL_DEST = /gg/lib
55 MAKE = make
57 RM= rm -f
58 RM_RECURSIVE= rm -r
59 MKDIR= mkdir
60 CP= cp
62 CC= gcc -noixemul
63 LD= ld
64 AR= ar
65 AR_FLAGS= rs
67 OPTIMIZATION-OPTION = -O2
68 BASEREL-OPTION =
69 DEBUG-OPTION = -g
70 VERBOSITY = -Wall -Wno-unused -Wno-uninitialized
71 OBJECT-ONLY = -c
73 CFLAGS= $(OPTIMIZATION-OPTION) $(BASEREL-OPTION) $(DEBUG-OPTION)\
74 $(VERBOSITY) $(OBJECT-ONLY)
76 INCLUDE_DIRS= -I ../include
78 # We define SOCKETBASE_IN_CONTEXT for kernel usage. Check <inline/socket.h>.
79 # same for USERGROUPBASE_IN_CONTEXT
81 DEFS= -DAMITCP=1 -DNETLIB=1 \
82 -D__USE_SYSBASE=1 -DUSE_BUILTIN_MATH=1 -DAMITCP_NEW_NAMES\
83 -DSOCKETBASE_IN_CONTEXT -DUSERGROUPBASE_IN_CONTEXT
85 #SCOPTIONS= parm=BOTH Nostackcheck \
86 # Stringmerge Noerrorsource Nomultipleincludes Structureequivalence \
87 # noversion noerrorhighlight IGNORE=224 IGNORE=92 \
88 # optinl optinlocal opttime optcomp=5 optdep=5 optrdep=5 \
89 # $(IDIRS) $(DEFS) debug=line
92 # Note: sources with leading underscore "_" are specific with SAS C UFB
94 # As the standard autodoc extractor is broken (it allows only for 32 arguments)
95 # don't add sources with autodocs to the end of macro
97 #DOCSRC= autoinit.c gettimeofday.c herror.c \
98 # lineread.c perror.c printfault.c rcmd.c strerror.c \
99 # syslog.c timerinit.c dostat.c utime.c chmod.c _dup.c _dup2.c \
100 # chown.c printuserfault.c init_usergroup.c \
101 # popen.c sleep.c usleep.c \
102 # init_inet_daemon.c set_socket_stdio.c serveraccept.c
104 #NETLIBSRC= strerror.c autoinit.c dummy.c lineread.c \
105 # getopt.c printfault.c stubs.c perror.c herror.c \
106 # timerinit.c gettimeofday.c rcmd.c syslog.c \
107 # getpid.c chmod.c chown.c utime.c popen.c sleep.c usleep.c \
108 # printuserfault.c init_usergroup.c setegid.c seteuid.c \
109 # _dup.c _dup2.c stat.c _fstat.c fib.c dostat.c access.c \
110 # _allocufb.c _chkufb.c _close.c _lseek.c _open.c _read.c \
111 # _write.c fhopen.c ioctl.c iomode.c isatty.c \
112 # init_inet_daemon.c set_socket_stdio.c serveraccept.c
115 NETLIBSRC= strerror.c autoinit.c dummy.c lineread.c \
116 printfault.c stubs.c \
117 herror.c syslog.c \
118 getpid.c getppid.c chmod.c popen.c \
119 printuserfault.c \
120 init_inet_daemon.c serveraccept.c \
121 linkaddr.c linkntoa.c \
122 random.c kill.c writev.c \
123 vasprintf.c asprintf.c err.c
125 SANA2LIBSRC= sana2perror.c sana2errlist.c sana2printfault.c
127 MIAMILIBSRC= miami_autoinit.c
129 #DOCS= netlib.doc sana2lib.doc
131 LIBS= libnet.a libsana2.a libmiami.a
133 NETOBJ= strerror.o autoinit.o dummy.o lineread.o \
134 printfault.o stubs.o \
135 herror.o syslog.o \
136 getpid.o getppid.o chmod.o popen.o \
137 printuserfault.o \
138 init_inet_daemon.o serveraccept.o \
139 linkaddr.o linkntoa.o \
140 random.o kill.o writev.o \
141 vasprintf.o asprintf.o err.o
143 #NETOBJ= strerror.o autoinit.o dummy.o lineread.o \
144 # getopt.o printfault.o stubs.o perror.o herror.o \
145 # timerinit.o gettimeofday.o rcmd.o syslog.o \
146 # getpid.o chmod.o chown.o utime.o popen.o sleep.o usleep.o \
147 # printuserfault.o init_usergroup.o setegid.o seteuid.o \
148 # _dup.o _dup2.o stat.o _fstat.o fib.o dostat.o access.o \
149 # _allocufb.o _chkufb.o _close.o _lseek.o _open.o _read.o \
150 # _write.o fhopen.o ioctl.o iomode.o isatty.o \
151 # init_inet_daemon.o set_socket_stdio.o serveraccept.o
153 SANA2OBJ= sana2perror.o sana2errlist.o sana2printfault.o
155 MIAMIOBJ= miami_autoinit.o
157 .SUFFIXES: .c .o
159 # Generic rules
161 .c.o:
162 $(CC) $(CFLAGS) $(OFLAGS) $(DEFS) $(INCLUDE_DIRS) $*.c
164 normal: $(LIBS)
166 all: normal
169 # Network libraries
171 libnet.a: $(NETOBJ)
172 -$(RM) $@
173 $(AR) $(AR_FLAGS) $@ $(NETOBJ)
176 # Sana2.lib, convenience functions for Sana2 utilities
178 libsana2.a: $(SANA2OBJ)
179 -$(RM) $@
180 $(AR) $(AR_FLAGS) $@ $(SANA2OBJ)
183 # miami.lib, miami.library autoinit routine
185 libmiami.a: $(MIAMIOBJ)
186 -$(RM) $@
187 $(AR) $(AR_FLAGS) $@ $(MIAMIOBJ)
189 clean:
190 -$(RM) *.a *.o
192 install:
193 cp $(LIBS) $(SDK_INSTALL_DEST)
195 package:
196 mkdir -p $(SDK_DEST)/Docs
197 mkdir -p $(SDK_DEST)/lib
198 cp netlib.doc $(SDK_DEST)/Docs
199 cp $(LIBS) $(SDK_DEST)/lib