source: rtems-libbsd/freebsd-userspace/Makefile @ c52d922

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since c52d922 was c52d922, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 12, 2012 at 10:09:48 PM

nsdispatch.c: New file added along with required dependencies

This file uses dynamic loading and is using some magic for
statically linked modules included in it. These modules may
or may not show up magically in an RTEMS executable. This will
eventually have to be investigated and resolved.

  • Property mode set to 100644
File size: 8.6 KB
Line 
1include ../config.inc
2
3include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
4include $(RTEMS_CUSTOM)
5include $(PROJECT_ROOT)/make/leaf.cfg
6
7CFLAGS += -Iinclude
8CFLAGS += -Irtems/include
9CFLAGS += -Ilib/libc/include
10CFLAGS += -Ilib/libc/resolv
11CFLAGS += -Ilib/netgraph
12CFLAGS += -Isys
13CFLAGS += -Ilocal
14# XXX hack to find rpc
15CFLAGS += -I../services/librpc/include
16# nsparser needs this
17CFLAGS += -Ilib/libc/net
18
19CFLAGS += -I$(INSTALL_BASE)/include
20
21#Only Needed for db files
22CFLAGS += -D__DBINTERFACE_PRIVATE
23
24CFLAGS += -w
25CFLAGS += -std=gnu99
26CFLAGS += -MT $@ -MD -MP -MF $(basename $@).d
27
28C_FILES =
29C_FILES += lib/libc/inet/inet_addr.c
30C_FILES += lib/libc/inet/inet_cidr_ntop.c
31C_FILES += lib/libc/inet/inet_cidr_pton.c
32C_FILES += lib/libc/inet/inet_lnaof.c
33C_FILES += lib/libc/inet/inet_makeaddr.c
34C_FILES += lib/libc/inet/inet_net_pton.c
35C_FILES += lib/libc/inet/inet_ntop.c
36C_FILES += lib/libc/inet/inet_neta.c
37C_FILES += lib/libc/inet/inet_net_ntop.c
38C_FILES += lib/libc/inet/inet_netof.c
39C_FILES += lib/libc/inet/inet_network.c
40C_FILES += lib/libc/inet/inet_ntoa.c
41C_FILES += lib/libc/inet/inet_pton.c
42C_FILES += lib/libc/inet/nsap_addr.c
43
44C_FILES += lib/libc/net/base64.c
45C_FILES += lib/libc/net/ether_addr.c
46C_FILES += lib/libc/net/getaddrinfo.c
47C_FILES += lib/libc/net/gethostbydns.c
48C_FILES += lib/libc/net/gethostbyht.c
49C_FILES += lib/libc/net/gethostbynis.c
50C_FILES += lib/libc/net/gethostnamadr.c
51C_FILES += lib/libc/net/getifaddrs.c
52C_FILES += lib/libc/net/getifmaddrs.c
53C_FILES += lib/libc/net/getnameinfo.c
54C_FILES += lib/libc/net/getnetbydns.c
55C_FILES += lib/libc/net/getnetbyht.c
56C_FILES += lib/libc/net/getnetbynis.c
57C_FILES += lib/libc/net/getnetnamadr.c
58C_FILES += lib/libc/net/getproto.c
59C_FILES += lib/libc/net/getprotoent.c
60C_FILES += lib/libc/net/getprotoname.c
61C_FILES += lib/libc/net/getservent.c
62C_FILES += lib/libc/net/nsdispatch.c
63C_FILES += lib/libc/net/nslexer.c
64C_FILES += lib/libc/gen/err.c
65C_FILES += lib/libc/gen/gethostname.c
66C_FILES += lib/libc/nameser/ns_name.c
67C_FILES += lib/libc/nameser/ns_netint.c
68C_FILES += lib/libc/nameser/ns_parse.c
69C_FILES += lib/libc/nameser/ns_print.c
70C_FILES += lib/libc/nameser/ns_samedomain.c
71C_FILES += lib/libc/nameser/ns_ttl.c
72C_FILES += lib/libc/net/if_indextoname.c
73C_FILES += lib/libc/net/if_nameindex.c
74C_FILES += lib/libc/net/linkaddr.c
75C_FILES += lib/libc/net/map_v4v6.c
76C_FILES += lib/libc/net/name6.c
77C_FILES += lib/libc/net/rcmd.c
78C_FILES += lib/libc/net/recv.c
79C_FILES += lib/libc/net/send.c
80C_FILES += lib/libc/resolv/herror.c
81C_FILES += lib/libc/resolv/res_comp.c
82C_FILES += lib/libc/resolv/res_data.c
83C_FILES += lib/libc/resolv/res_debug.c
84C_FILES += lib/libc/resolv/res_init.c
85C_FILES += lib/libc/resolv/res_mkquery.c
86C_FILES += lib/libc/resolv/res_mkupdate.c
87C_FILES += lib/libc/resolv/res_query.c
88C_FILES += lib/libc/resolv/res_send.c
89C_FILES += lib/libc/resolv/res_state.c
90C_FILES += lib/libc/resolv/res_update.c
91C_FILES += lib/libc/string/strsep.c
92
93C_FILES += lib/libc/isc/ev_streams.c
94C_FILES += lib/libc/isc/ev_timers.c
95
96C_FILES += lib/libc/stdio/fgetln.c
97
98C_FILES += lib/libc/db/db/db.c
99C_FILES += lib/libc/db/btree/bt_close.c   
100C_FILES += lib/libc/db/btree/bt_get.c       
101C_FILES += lib/libc/db/btree/bt_put.c     
102C_FILES += lib/libc/db/btree/bt_utils.c
103C_FILES += lib/libc/db/btree/bt_conv.c   
104C_FILES += lib/libc/db/btree/bt_open.c     
105C_FILES += lib/libc/db/btree/bt_search.c
106C_FILES += lib/libc/db/btree/bt_debug.c   
107C_FILES += lib/libc/db/btree/bt_overflow.c 
108C_FILES += lib/libc/db/btree/bt_seq.c
109C_FILES += lib/libc/db/btree/bt_delete.c 
110C_FILES += lib/libc/db/btree/bt_page.c     
111C_FILES += lib/libc/db/btree/bt_split.c
112C_FILES += lib/libc/db/recno/rec_close.c   
113C_FILES += lib/libc/db/recno/rec_get.c   
114C_FILES += lib/libc/db/recno/rec_put.c     
115C_FILES += lib/libc/db/recno/rec_seq.c
116C_FILES += lib/libc/db/recno/rec_delete.c 
117C_FILES += lib/libc/db/recno/rec_open.c 
118C_FILES += lib/libc/db/recno/rec_search.c 
119C_FILES += lib/libc/db/recno/rec_utils.c
120
121
122C_FILES += lib/libc/db/mpool/mpool.c
123
124# RTEMS Specific Files
125# C_FILES += rtems/rtems-net-setup.c
126C_FILES += rtems/syslog.c
127
128# ping command sources
129C_FILES += commands/sbin/ping/ping.c
130C_FILES += commands/sbin/ping6/ping6.c
131
132# route command sources
133C_FILES += commands/sbin/route/route.c
134
135# dhclient command sources
136C_FILES += commands/sbin/dhclient/alloc.c
137C_FILES += commands/sbin/dhclient/bpf.c
138C_FILES += commands/sbin/dhclient/clparse.c
139C_FILES += commands/sbin/dhclient/conflex.c
140C_FILES += commands/sbin/dhclient/convert.c
141C_FILES += commands/sbin/dhclient/dhclient.c
142C_FILES += commands/sbin/dhclient/dispatch.c
143C_FILES += commands/sbin/dhclient/errwarn.c
144C_FILES += commands/sbin/dhclient/hash.c
145C_FILES += commands/sbin/dhclient/inet.c
146C_FILES += commands/sbin/dhclient/options.c
147C_FILES += commands/sbin/dhclient/packet.c
148C_FILES += commands/sbin/dhclient/parse.c
149C_FILES += commands/sbin/dhclient/privsep.c
150C_FILES += commands/sbin/dhclient/tables.c
151C_FILES += commands/sbin/dhclient/tree.c
152
153# ifconfig command sources
154C_FILES += commands/sbin/ifconfig/af_atalk.c
155C_FILES += commands/sbin/ifconfig/af_inet.c
156C_FILES += commands/sbin/ifconfig/af_link.c
157C_FILES += commands/sbin/ifconfig/ifbridge.c
158C_FILES += commands/sbin/ifconfig/ifclone.c
159C_FILES += commands/sbin/ifconfig/ifgif.c
160C_FILES += commands/sbin/ifconfig/ifgroup.c
161C_FILES += commands/sbin/ifconfig/iflagg.c
162C_FILES += commands/sbin/ifconfig/ifmedia.c
163C_FILES += commands/sbin/ifconfig/ifvlan.c
164C_FILES += commands/sbin/ifconfig/af_inet6.c
165C_FILES += commands/sbin/ifconfig/af_nd6.c
166C_FILES += commands/sbin/ifconfig/ifcarp.c
167C_FILES += commands/sbin/ifconfig/ifconfig.c
168C_FILES += commands/sbin/ifconfig/ifgre.c
169C_FILES += commands/sbin/ifconfig/ifieee80211.c
170C_FILES += commands/sbin/ifconfig/ifmac.c
171C_FILES += commands/sbin/ifconfig/ifpfsync.c
172
173# The following two files were left out to avoid
174# porting issues.  regdomain uses an xml parser
175# that is not part of the standard release and
176# af_ipx uses thread0 which we are trying to avoid
177# pulling in.
178#
179# C_FILES += commands/sbin/ifconfig/regdomain.c
180# C_FILES += commands/sbin/ifconfig/af_ipx.c
181
182ifeq (1,0)
183# netstat command sources
184# no need to support AppleTalk yet
185# C_FILES += commands/usr.bin/netstat/atalk.c
186C_FILES += commands/usr.bin/netstat/bpf.c
187C_FILES += commands/usr.bin/netstat/if.c
188C_FILES += commands/usr.bin/netstat/inet6.c
189C_FILES += commands/usr.bin/netstat/inet.c
190C_FILES += commands/usr.bin/netstat/ipsec.c
191# no need to support IPX yet
192# C_FILES += commands/usr.bin/netstat/ipx.c
193C_FILES += commands/usr.bin/netstat/main.c
194C_FILES += commands/usr.bin/netstat/mbuf.c
195C_FILES += commands/usr.bin/netstat/mroute6.c
196C_FILES += commands/usr.bin/netstat/mroute.c
197# Disable netgraph support - this is a long thread to pull
198# C_FILES += commands/usr.bin/netstat/netgraph.c
199C_FILES += commands/usr.bin/netstat/pfkey.c
200C_FILES += commands/usr.bin/netstat/route.c
201C_FILES += commands/usr.bin/netstat/sctp.c
202C_FILES += commands/usr.bin/netstat/unix.c
203endif
204
205C_O_FILES = $(C_FILES:%.c=%.o)
206C_D_FILES = $(C_FILES:%.c=%.d)
207
208LIB = libbsdc.a
209GEN_FILES = include/rpc/rpcb_prot.h
210GEN_FILES += commands/sbin/route/keywords.h
211GEN_FILES += lib/libc/net/nslexer.c
212GEN_FILES += lib/libc/net/nsparser.c
213
214EXTRA_CLEAN = lib/libc/net/nsparser.i
215
216all: $(LIB)
217
218$(LIB): $(GEN_FILES) $(C_O_FILES)
219        $(AR) rcu $@ $^
220
221include/rpc/rpcb_prot.h: include/rpc/rpcb_prot.x
222        rm -f include/rpc/rpcb_prot.h
223        rpcgen -h -o include/rpc/rpcb_prot.h include/rpc/rpcb_prot.x
224
225commands/sbin/route/keywords.h: commands/sbin/route/keywords
226        sed -e '/^#/d' -e '/^$$/d' commands/sbin/route//keywords > _keywords.tmp
227        LC_ALL=C tr 'a-z' 'A-Z' < _keywords.tmp | paste _keywords.tmp - | \
228            awk '{ \
229                if (NF > 1) \
230                        printf "#define\tK_%s\t%d\n\t{\"%s\", K_%s},\n", \
231                            $$2, NR, $$1, $$2 }' \
232            > commands/sbin/route/keywords.h
233        rm -f _keywords.tmp
234
235YFLAGS+=-p_nsyy
236LFLAGS+=-P_nsyy
237
238lib/libc/net/nslexer.c: lib/libc/net/nslexer.l
239        ${LEX} ${LFLAGS} -t $^ | \
240                sed -e '/YY_BUF_SIZE/s/16384/1024/' >$@
241
242lib/libc/net/nsparser.c: lib/libc/net/nsparser.y
243        yacc -d ${YFLAGS} -o lib/libc/net/nsparser.i $^
244        cat lib/libc/net/nsparser.i | \
245                sed -e '/YY_BUF_SIZE/s/16384/1024/' >$@
246install: $(LIB)
247        install -d $(INSTALL_BASE)/include
248        cd include; for i in `find . -name '*.h'` ; do \
249          install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done
250        cd rtems/include; for i in `find . -name '*.h'` ; do \
251          install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done
252        cd local; for i in `find . -name '*.h'` ; do \
253          install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done
254        cd sys; for i in `find . -name '*.h'` ; do \
255          install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done
256        install -c -m 644 $(LIB) $(INSTALL_BASE)
257
258clean:
259        rm -f $(LIB) $(C_O_FILES) $(C_D_FILES) $(GEN_FILES) $(CLEAN_FILES)
260
261-include $(C_D_FILES)
262
263doc: 
264
Note: See TracBrowser for help on using the repository browser.