revert between 56095 -> 55830 in arch
[AROS.git] / workbench / network / stacks / AROSTCP / bsdsocket / mmakefile.src
blob985010b5ce5020392bc116b7c696d7c511671a09
1 #   $Id$
3 include $(SRCDIR)/config/aros.cfg
6 # Copyright (C) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
7 #                    Helsinki University of Technology, Finland.
8 #                    All rights reserved.
9 # Copyright (C) 2005 Neil Cafferkey
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License version 2 as
13 # published by the Free Software Foundation.
15 # This program is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 # MA 02111-1307, USA.
26 SYS_H= \
27         sys/synch.h sys/uio.h \
28         sys/kernel.h sys/malloc.h sys/mbuf.h sys/queue.h \
29         sys/socketvar.h sys/domain.h sys/protosw.h \
30         sys/systm.h 
32 PROTOS_H= \
33         protos/kern/amiga_api_protos.h  protos/kern/amiga_main_protos.h \
34         protos/kern/amiga_select_protos.h protos/kern/amiga_time_protos.h \
35         protos/kern/amiga_userlib_protos.h protos/kern/kern_malloc_protos.h \
36         protos/kern/kern_synch_protos.h protos/kern/subr_prf_protos.h \
37         protos/kern/uipc_domain_protos.h \
38         protos/kern/uipc_socket2_protos.h protos/kern/uipc_socket_protos.h \
39         protos/net/if_loop_protos.h protos/net/if_protos.h \
40         protos/net/radix_protos.h protos/net/raw_cb_protos.h \
41         protos/net/raw_usrreq_protos.h protos/net/rtsock_protos.h \
42         protos/netinet/in_cksum_protos.h protos/netinet/in_pcb_protos.h \
43         protos/netinet/in_proto_protos.h protos/netinet/in_protos.h \
44         protos/netinet/ip_icmp_protos.h protos/netinet/ip_input_protos.h \
45         protos/netinet/ip_output_protos.h protos/netinet/raw_ip_protos.h \
46         protos/netinet/tcp_debug_protos.h protos/netinet/tcp_input_protos.h \
47         protos/netinet/tcp_output_protos.h protos/netinet/tcp_subr_protos.h \
48         protos/netinet/tcp_timer_protos.h protos/netinet/tcp_usrreq_protos.h \
49         protos/netinet/udp_usrreq_protos.h
51 # Protocol inspecific network routines:
52 # network interfaces, input queue scheduling, 
53 # raw sockets, routing
54 NET_C= \
55         net/if net/if_loop net/pfil \
56         net/raw_cb net/raw_usrreq \
57         net/route net/rtsock net/radix \
58         net/if_sana net/netisr net/sana2config \
59         net/sana2copybuff net/sana2arp net/sana2perror
61 NET_H= \
62         net/if_types.h net/if_sana.h \
63         net/sana2request.h net/sana2arp.h net/sana2config.h \
64         net/netisr.h net/raw_cb.h
66 # netinet -- internet protocols (ip, icmp, tcp, udp, arp)
67 NETINET_C= \
68         netinet/in netinet/in_cksum netinet/in_pcb netinet/in_proto \
69         netinet/ip_icmp \
70         netinet/ip_input netinet/ip_output netinet/raw_ip \
71         netinet/tcp_debug netinet/tcp_input netinet/tcp_output \
72         netinet/tcp_subr netinet/tcp_timer netinet/tcp_usrreq \
73         netinet/udp_usrreq
75 NETINET_H= \
76         netinet/in_pcb.h netinet/in_var.h netinet/icmp_var.h  \
77         netinet/tcpip.h netinet/tcp_debug.h netinet/tcp_fsm.h \
78         netinet/tcp_seq.h netinet/tcp_timer.h netinet/tcp_var.h \
79         netinet/udp_var.h 
82 # "Kernel" sources
83 # main, timeouts, syncronization, memory management,
84 # BSD socket ("Unix interprocess communication") routines,
85 # logging and netstat rexx interface 
86 KERN_C= \
87         kern/amiga_main kern/amiga_time kern/amiga_config \
88         kern/amiga_netdb kern/amiga_gui kern/amiga_cx \
89         kern/amiga_dhcp kern/amiga_rc kern/kern_subr \
90         kern/kern_synch kern/kern_malloc kern/uipc_mbuf \
91         kern/uipc_domain kern/uipc_socket kern/uipc_socket2 \
92         kern/amiga_log kern/amiga_cstat kern/amiga_rexx \
93         kern/subr_prf kern/accesscontrol kern/config_var
95 KERN_H= \
96         kern/amiga_includes.h kern/amiga_time.h kern/amiga_config.h \
97         kern/amiga_netdb.h kern/amiga_gui.h kern/amiga_log.h \
98         kern/amiga_cx.h kern/amiga_dhcp.h kern/amiga_rc.h \
99         kern/amiga_rexx.h kern/amiga_subr.h kern/accesscontrol.h
101 # Application interface sources
102 # Amiga "struct Library" interface, API functions,
103 API_C=\
104         api/amiga_api api/amiga_libtables api/amiga_syscalls \
105         api/amiga_sendrecv api/amiga_generic api/amiga_generic2 \
106         api/amiga_libcalls api/amiga_errlists api/amiga_kernvars \
107         api/amiga_ndbent api/amiga_netstat \
108         api/getxbyy api/gethostnamadr api/allocdatabuffer \
109         api/res_comp api/res_debug api/res_init \
110         api/res_mkquery api/res_query api/res_send  \
111         api/amiga_roadshow api/miami_api api/miami_functable \
112         api/if_indextoname api/if_nametoindex api/if_nameindex \
113         api/getifaddrs
115 API_H=\
116         api/amiga_raf.h api/amiga_api.h api/amiga_libcallentry.h \
117         api/allocdatabuffer.h api/gethtbynamadr.h \
118         api/resolv.h api/sockargs.h \
119         api/apicalls.h api/miami_api.h
122 # Misc headers
124 MISC_H=\
125         conf/conf.h
128 # Misc sources
130 MISC= \
131         kern/variables.src kern/config_var.awk
133 NET_O=      $(NET_C:.c=.o)
134 NETINET_O=  $(NETINET_C:.c=.o)
135 KERN_O=     $(KERN_C:.c=.o)
136 API_O=     $(API_C:.c=.o)
137 CSRCS=  $(API_C) $(KERN_C) $(NET_C) $(NETINET_C)
138 OBJS=   $(API_O) $(KERN_O) $(NET_O) $(NETINET_O) 
139 AMISRC=      $(CSRCS) $(SYS_H) $(API_H) $(KERN_H) $(NET_H) $(NETINET_H) \
140              $(MISC_H) $(MISC) $(PROTOS_H)
141 #NETINCSRC=   $(SYS_HH) $(NET_HH) $(NETINET_HH) 
142 SRCS=        $(AMISRC) #$(NETINCSRC)
143 TARGETS= AROSTCP
144 DIRS= net netinet kern api
146 all: dirs $(TARGETS)
148 opts: $(GCCOPTIONS)
150 $(TARGETS): $(OBJS) $(SRCS)
151         $(LD) -o $@ $(OBJS) $(LIBSRC) $(LIBS)
153 dirs: $(DIRS)
155 net: $(NET_O)
156 netinet: $(NETINET_O)
157 kern: $(KERN_O)
158 api: $(API_O)
160 STACK_NAME := AROSTCP
162 USER_INCLUDES :=  -idirafter $(SRCDIR)/$(CURDIR) -idirafter $(SRCDIR)/$(CURDIR)/protos
163 NOWARN_FLAGS := $(NOWARN_UNINITIALIZED) $(NOWARN_IMPLICIT_FUNCTION_DECL) $(NOWARN_PARENTHESES)
164 # enabling -DUSE_ALIGNED_COPIES  causes crashes..
165 USER_CPPFLAGS := -DDIRECTED_BROADCAST \
166         -DAMITCP -DKERNEL -D__BSD_VISIBLE=1
167 USER_CFLAGS := $(NOWARN_FLAGS)
169 #MM- workbench-network-stacks-arostcp : workbench-network-stacks-arostcp-bsdsocket
170 %build_prog mmake=workbench-network-stacks-arostcp-bsdsocket \
171     progname=$(STACK_NAME) \
172     files="$(NET_C) $(NETINET_C) $(KERN_C) $(API_C)" \
173     targetdir=$(AROS_SYSTEM)/Network/$(STACK_NAME)/C
175 %common