1 | #! /usr/bin/python |
---|
2 | # |
---|
3 | # Copyright (c) 2009-2011 embedded brains GmbH. All rights reserved. |
---|
4 | # |
---|
5 | # embedded brains GmbH |
---|
6 | # Obere Lagerstr. 30 |
---|
7 | # 82178 Puchheim |
---|
8 | # Germany |
---|
9 | # <info@embedded-brains.de> |
---|
10 | # |
---|
11 | # Copyright (c) 2012 OAR Corporation. All rights reserved. |
---|
12 | # |
---|
13 | # Redistribution and use in source and binary forms, with or without |
---|
14 | # modification, are permitted provided that the following conditions |
---|
15 | # are met: |
---|
16 | # 1. Redistributions of source code must retain the above copyright |
---|
17 | # notice, this list of conditions and the following disclaimer. |
---|
18 | # 2. Redistributions in binary form must reproduce the above copyright |
---|
19 | # notice, this list of conditions and the following disclaimer in the |
---|
20 | # documentation and/or other materials provided with the distribution. |
---|
21 | # |
---|
22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
---|
23 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
---|
24 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
---|
25 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
---|
26 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
---|
27 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
---|
28 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
---|
29 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
---|
30 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
---|
31 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
---|
32 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
33 | |
---|
34 | # FreeBSD: http://svn.freebsd.org/base/releng/8.2/sys (revision 222485) |
---|
35 | |
---|
36 | import shutil |
---|
37 | import os |
---|
38 | import re |
---|
39 | import sys |
---|
40 | import getopt |
---|
41 | import filecmp |
---|
42 | |
---|
43 | RTEMS_DIR = "not_set" |
---|
44 | FreeBSD_DIR = "not_set" |
---|
45 | isVerbose = False |
---|
46 | isForward = True |
---|
47 | isDryRun = False |
---|
48 | isEarlyExit = False |
---|
49 | isOnlyMakefile = False |
---|
50 | tempFile = "/tmp/tmp_FBRT" |
---|
51 | filesChanged = 0 |
---|
52 | |
---|
53 | def usage(): |
---|
54 | print "freebsd-to-rtems.py [args]" |
---|
55 | print " -?|-h|--help print this and exit" |
---|
56 | print " -d|--dry-run run program but no modifications" |
---|
57 | print " -e|--early-exit evaluate arguments, print results, and exit" |
---|
58 | print " -m|--makefile just generate Makefile" |
---|
59 | print " -R|--reverse default FreeBSD -> RTEMS, reverse that" |
---|
60 | print " -r|--rtems RTEMS Libbsd directory" |
---|
61 | print " -f|--freebsd FreeBSD SVN directory" |
---|
62 | print " -v|--verbose enable verbose output mode" |
---|
63 | |
---|
64 | # Parse the arguments |
---|
65 | def parseArguments(): |
---|
66 | global RTEMS_DIR, FreeBSD_DIR |
---|
67 | global isVerbose, isForward, isEarlyExit, isOnlyMakefile |
---|
68 | try: |
---|
69 | opts, args = getopt.getopt(sys.argv[1:], "?hdemRr:f:v", |
---|
70 | ["help", |
---|
71 | "help", |
---|
72 | "dry-run" |
---|
73 | "early-exit" |
---|
74 | "makefile" |
---|
75 | "reverse" |
---|
76 | "rtems=" |
---|
77 | "freebsd=" |
---|
78 | "verbose" |
---|
79 | ] |
---|
80 | ) |
---|
81 | except getopt.GetoptError, err: |
---|
82 | # print help information and exit: |
---|
83 | print str(err) # will print something like "option -a not recognized" |
---|
84 | usage() |
---|
85 | sys.exit(2) |
---|
86 | for o, a in opts: |
---|
87 | if o == "-v": |
---|
88 | isVerbose = True |
---|
89 | elif o in ("-h", "--help", "-?"): |
---|
90 | usage() |
---|
91 | sys.exit() |
---|
92 | elif o in ("-d", "--dry-run"): |
---|
93 | isForward = False |
---|
94 | elif o in ("-e", "--early-exit"): |
---|
95 | isEarlyExit = True |
---|
96 | elif o in ("-m", "--makefile"): |
---|
97 | isOnlyMakefile = True |
---|
98 | elif o in ("-R", "--reverse"): |
---|
99 | isForward = False |
---|
100 | elif o in ("-r", "--rtems"): |
---|
101 | RTEMS_DIR = a |
---|
102 | elif o in ("-r", "--rtems"): |
---|
103 | RTEMS_DIR = a |
---|
104 | elif o in ("-f", "--freebsd"): |
---|
105 | FreeBSD_DIR = a |
---|
106 | else: |
---|
107 | assert False, "unhandled option" |
---|
108 | |
---|
109 | parseArguments() |
---|
110 | print "Verbose: " + ("no", "yes")[isVerbose] |
---|
111 | print "Dry Run: " + ("no", "yes")[isDryRun] |
---|
112 | print "Only Generate Makefile: " + ("no", "yes")[isOnlyMakefile] |
---|
113 | print "RTEMS Libbsd Directory: " + RTEMS_DIR |
---|
114 | print "FreeBSD SVN Directory: " + FreeBSD_DIR |
---|
115 | print "Direction: " + ("reverse", "forward")[isForward] |
---|
116 | |
---|
117 | # Check directory argument was set and exist |
---|
118 | def wasDirectorySet(desc, path): |
---|
119 | if path == "not_set": |
---|
120 | print desc + " Directory was not specified on command line" |
---|
121 | sys.exit(2) |
---|
122 | |
---|
123 | if os.path.isdir( path ) != True: |
---|
124 | print desc + " Directory (" + path + ") does not exist" |
---|
125 | sys.exit(2) |
---|
126 | |
---|
127 | # Were RTEMS and FreeBSD directories specified |
---|
128 | wasDirectorySet( "RTEMS", RTEMS_DIR ) |
---|
129 | wasDirectorySet( "FreeBSD", FreeBSD_DIR ) |
---|
130 | |
---|
131 | # Are we generating or reverting? |
---|
132 | if isForward == True: |
---|
133 | print "Generating into", RTEMS_DIR |
---|
134 | else: |
---|
135 | print "Reverting from", RTEMS_DIR |
---|
136 | if isOnlyMakefile == True: |
---|
137 | print "Only Makefile Mode and Reverse are contradictory" |
---|
138 | sys.exit(2) |
---|
139 | |
---|
140 | if isEarlyExit == True: |
---|
141 | print "Early exit at user request" |
---|
142 | sys.exit(0) |
---|
143 | |
---|
144 | # Prefix added to FreeBSD files as they are copied into the RTEMS |
---|
145 | # build tree. |
---|
146 | PREFIX = 'freebsd' |
---|
147 | |
---|
148 | def mapContribPath(path): |
---|
149 | m = re.match('(.*)(' + PREFIX + '/)(contrib/\\w+/)(.*)', path) |
---|
150 | if m: |
---|
151 | path = m.group(1) + m.group(3) + m.group(2) + m.group(4) |
---|
152 | return path |
---|
153 | |
---|
154 | # Move target dependent files under a machine directory |
---|
155 | def mapCPUDependentPath(path): |
---|
156 | return path.replace("include/", "include/freebsd/machine/") |
---|
157 | |
---|
158 | # compare and overwrite destination file only if different |
---|
159 | def copyIfDifferent(new, old): |
---|
160 | global filesChanged |
---|
161 | if not os.path.exists(old) or \ |
---|
162 | filecmp.cmp(new, old, shallow=False) == False: |
---|
163 | shutil.move(new, old) |
---|
164 | filesChanged += 1 |
---|
165 | # print "Move " + new + " to " + old |
---|
166 | return True |
---|
167 | return False |
---|
168 | |
---|
169 | # generate an empty file as a place holder |
---|
170 | def installEmptyFile(src): |
---|
171 | global tempFile |
---|
172 | dst = RTEMS_DIR + '/' + PREFIX + '/' + src.replace('rtems/', '') |
---|
173 | if isDryRun == True: |
---|
174 | if isVerbose == True: |
---|
175 | print "Install empty - " + dst |
---|
176 | return |
---|
177 | try: |
---|
178 | os.makedirs(os.path.dirname(dst)) |
---|
179 | except OSError: |
---|
180 | pass |
---|
181 | out = open(tempFile, 'w') |
---|
182 | out.write('/* EMPTY */\n') |
---|
183 | out.close() |
---|
184 | if copyIfDifferent(tempFile, dst) == True: |
---|
185 | if isVerbose == True: |
---|
186 | print "Install empty - " + dst |
---|
187 | |
---|
188 | # fix include paths inside a C or .h file |
---|
189 | def fixIncludes(data): |
---|
190 | data = re.sub('#([ \t]*)include <', '#\\1include <' + PREFIX + '/', data) |
---|
191 | data = re.sub('#include <' + PREFIX + '/rtems', '#include <rtems', data) |
---|
192 | data = re.sub('#include <' + PREFIX + '/bsp', '#include <bsp', data) |
---|
193 | data = re.sub('#include "([^"]*)"', '#include <' + PREFIX + '/local/\\1>', data) |
---|
194 | data = re.sub('_H_', '_HH_', data) |
---|
195 | return data |
---|
196 | |
---|
197 | # revert fixing the include paths inside a C or .h file |
---|
198 | def revertFixIncludes(data): |
---|
199 | data = re.sub('_HH_', '_H_', data) |
---|
200 | data = re.sub('#include <' + PREFIX + '/local/([^>]*)>', '#include "\\1"', data) |
---|
201 | data = re.sub('#([ \t]*)include <' + PREFIX + '/', '#\\1include <', data) |
---|
202 | return data |
---|
203 | |
---|
204 | # Copy a header file from FreeBSD to the RTEMS BSD tree |
---|
205 | def installHeaderFile(org, target): |
---|
206 | global tempFile |
---|
207 | src = FreeBSD_DIR + '/' + org |
---|
208 | dst = RTEMS_DIR + '/' + PREFIX + '/' + org |
---|
209 | dst = mapContribPath(dst) |
---|
210 | if target != "generic": |
---|
211 | dst = mapCPUDependentPath(dst) |
---|
212 | if isDryRun == True: |
---|
213 | if isVerbose == True: |
---|
214 | print "Install Header - " + src + " => " + dst |
---|
215 | return |
---|
216 | try: |
---|
217 | os.makedirs(os.path.dirname(dst)) |
---|
218 | except OSError: |
---|
219 | pass |
---|
220 | data = open(src).read() |
---|
221 | out = open(tempFile, 'w') |
---|
222 | if org.find('rtems') == -1: |
---|
223 | data = fixIncludes(data) |
---|
224 | out.write(data) |
---|
225 | out.close() |
---|
226 | if copyIfDifferent(tempFile, dst) == True: |
---|
227 | if isVerbose == True: |
---|
228 | print "Install Header - " + src + " => " + dst |
---|
229 | |
---|
230 | |
---|
231 | # Copy a source file from FreeBSD to the RTEMS BSD tree |
---|
232 | def installSourceFile(org): |
---|
233 | global tempFile |
---|
234 | src = FreeBSD_DIR + '/' + org |
---|
235 | dst = RTEMS_DIR + '/' + PREFIX + '/' + org |
---|
236 | dst = mapContribPath(dst) |
---|
237 | if isDryRun == True: |
---|
238 | if isVerbose == True: |
---|
239 | print "Install Source - " + src + " => " + dst |
---|
240 | return |
---|
241 | try: |
---|
242 | os.makedirs(os.path.dirname(dst)) |
---|
243 | except OSError: |
---|
244 | pass |
---|
245 | data = open(src).read() |
---|
246 | out = open(tempFile, 'w') |
---|
247 | if org.find('rtems') == -1: |
---|
248 | data = fixIncludes(data) |
---|
249 | out.write('#include <' + PREFIX + '/machine/rtems-bsd-config.h>\n\n') |
---|
250 | out.write(data) |
---|
251 | out.close() |
---|
252 | if copyIfDifferent(tempFile, dst) == True: |
---|
253 | if isVerbose == True: |
---|
254 | print "Install Source - " + src + " => " + dst |
---|
255 | |
---|
256 | # Revert a header file from the RTEMS BSD tree to the FreeBSD tree |
---|
257 | def revertHeaderFile(org, target): |
---|
258 | src = RTEMS_DIR + '/' + PREFIX + '/' + org.replace('rtems/', '') |
---|
259 | src = mapContribPath(src) |
---|
260 | dst = FreeBSD_DIR + '/' + org |
---|
261 | if isVerbose == True: |
---|
262 | print "Revert Header - " + src + " => " + dst |
---|
263 | if isDryRun == True: |
---|
264 | return |
---|
265 | try: |
---|
266 | os.makedirs(os.path.dirname(dst)) |
---|
267 | except OSError: |
---|
268 | pass |
---|
269 | if target != "generic": |
---|
270 | print "Do not yet know how to revert target dependent files" |
---|
271 | sys.exit(1) |
---|
272 | data = open(src).read() |
---|
273 | out = open(dst, 'w') |
---|
274 | if org.find('rtems') == -1: |
---|
275 | data = revertFixIncludes(data) |
---|
276 | out.write(data) |
---|
277 | out.close() |
---|
278 | |
---|
279 | # Revert a source file from the RTEMS BSD tree to the FreeBSD tree |
---|
280 | def revertSourceFile(org): |
---|
281 | src = RTEMS_DIR + '/' + PREFIX + '/' + org |
---|
282 | src = mapContribPath(src) |
---|
283 | dst = FreeBSD_DIR + '/' + org |
---|
284 | if isVerbose == True: |
---|
285 | print "Revert Source - " + src + " => " + dst |
---|
286 | if isDryRun == True: |
---|
287 | return |
---|
288 | try: |
---|
289 | os.makedirs(os.path.dirname(dst)) |
---|
290 | except OSError: |
---|
291 | pass |
---|
292 | data = open(src).read() |
---|
293 | out = open(dst, 'w') |
---|
294 | if org.find('rtems') == -1: |
---|
295 | data = re.sub('#include <' + PREFIX + '/machine/rtems-bsd-config.h>\n\n', '', data) |
---|
296 | data = revertFixIncludes(data) |
---|
297 | out.write(data) |
---|
298 | out.close() |
---|
299 | |
---|
300 | # Remove the output directory |
---|
301 | def deleteOutputDirectory(): |
---|
302 | if isVerbose == True: |
---|
303 | print "Delete Directory - " + RTEMS_DIR |
---|
304 | if isDryRun == True: |
---|
305 | return |
---|
306 | try: |
---|
307 | print "Deleting output directory needs to be more precise" |
---|
308 | #shutil.rmtree(RTEMS_DIR) |
---|
309 | except OSError: |
---|
310 | pass |
---|
311 | |
---|
312 | # Module Manager - Collection of Modules |
---|
313 | class ModuleManager: |
---|
314 | def __init__(self): |
---|
315 | self.modules = [] |
---|
316 | self.emptyFiles = [] |
---|
317 | |
---|
318 | def addModule(self, module): |
---|
319 | self.modules.append(module) |
---|
320 | |
---|
321 | def addEmptyFiles(self, emptyFiles): |
---|
322 | self.emptyFiles.extend(emptyFiles) |
---|
323 | |
---|
324 | def copyFiles(self): |
---|
325 | for f in self.emptyFiles: |
---|
326 | installEmptyFile(f) |
---|
327 | for m in self.modules: |
---|
328 | for f in m.headerFiles: |
---|
329 | installHeaderFile(f, m.target) |
---|
330 | for f in m.sourceFiles: |
---|
331 | installSourceFile(f) |
---|
332 | |
---|
333 | def revertFiles(self): |
---|
334 | for m in self.modules: |
---|
335 | for f in m.headerFiles: |
---|
336 | revertHeaderFile(f, m.target) |
---|
337 | for f in m.sourceFiles: |
---|
338 | revertSourceFile(f) |
---|
339 | |
---|
340 | def createMakefile(self): |
---|
341 | global tempFile |
---|
342 | if isDryRun == True: |
---|
343 | if isVerbose == True: |
---|
344 | print "Create Makefile" |
---|
345 | return |
---|
346 | data = 'include config.inc\n' \ |
---|
347 | '\n' \ |
---|
348 | 'include $(RTEMS_MAKEFILE_PATH)/Makefile.inc\n' \ |
---|
349 | 'include $(RTEMS_CUSTOM)\n' \ |
---|
350 | 'include $(PROJECT_ROOT)/make/leaf.cfg\n' \ |
---|
351 | '\n' \ |
---|
352 | 'CFLAGS += -ffreestanding \n' \ |
---|
353 | 'CFLAGS += -I . \n' \ |
---|
354 | 'CFLAGS += -I rtemsbsd \n' \ |
---|
355 | 'CFLAGS += -I freebsd/$(RTEMS_CPU)/include \n' \ |
---|
356 | 'CFLAGS += -I contrib/altq \n' \ |
---|
357 | 'CFLAGS += -I contrib/pf \n' \ |
---|
358 | 'CFLAGS += -B $(INSTALL_BASE) \n' \ |
---|
359 | 'CFLAGS += -w \n' \ |
---|
360 | 'CFLAGS += -std=gnu99\n' \ |
---|
361 | '\n' |
---|
362 | data += 'C_FILES =' |
---|
363 | for m in self.modules: |
---|
364 | if m.target == "generic": |
---|
365 | for f in m.sourceFiles: |
---|
366 | f = PREFIX + '/' + f |
---|
367 | f = mapContribPath(f) |
---|
368 | data += ' \\\n\t' + f |
---|
369 | data += '\n' |
---|
370 | data += '# RTEMS Project Owned Files\n' |
---|
371 | data += 'C_FILES +=' |
---|
372 | for f in rtems_sourceFiles: |
---|
373 | data += ' \\\n\trtemsbsd/' + f |
---|
374 | data += '\n' |
---|
375 | data += '\n' |
---|
376 | for m in self.modules: |
---|
377 | if m.target != "generic": |
---|
378 | data += "ifeq ($(RTEMS_CPU)," + m.target + ")\n" |
---|
379 | data += "C_FILES +=" |
---|
380 | for f in m.sourceFiles: |
---|
381 | f = PREFIX + '/' + f |
---|
382 | f = mapContribPath(f) |
---|
383 | data += ' \\\n\t' + f |
---|
384 | data += '\n' |
---|
385 | data += 'endif\n' |
---|
386 | |
---|
387 | |
---|
388 | data += '\n' \ |
---|
389 | 'C_O_FILES = $(C_FILES:%.c=%.o)\n' \ |
---|
390 | 'C_DEP_FILES = $(C_FILES:%.c=%.dep)\n' \ |
---|
391 | '\n' \ |
---|
392 | 'LIB = libbsd.a\n' \ |
---|
393 | '\n' \ |
---|
394 | 'all: lib_usb\n' \ |
---|
395 | '\n' \ |
---|
396 | '$(LIB): $(C_O_FILES)\n' \ |
---|
397 | '\t$(AR) rcu $@ $^\n' \ |
---|
398 | '\n' \ |
---|
399 | 'lib_usb:\n' \ |
---|
400 | '\tmake $(LIB)\n' \ |
---|
401 | '\n' \ |
---|
402 | 'install: $(LIB)\n' \ |
---|
403 | '\tinstall -d $(INSTALL_BASE)/include\n' \ |
---|
404 | '\tinstall -c -m 644 $(LIB) $(INSTALL_BASE)\n' \ |
---|
405 | '\tcd rtemsbsd; for i in `find . -name \'*.h\'` ; do \\\n' \ |
---|
406 | '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \ |
---|
407 | '\tfor i in `find contrib freebsd -name \'*.h\'` ; do \\\n' \ |
---|
408 | '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \ |
---|
409 | '\n' \ |
---|
410 | 'clean:\n' \ |
---|
411 | '\trm -f -r $(PROJECT_INCLUDE)/rtems/freebsd\n' \ |
---|
412 | '\trm -f $(LIB) $(C_O_FILES) $(C_DEP_FILES)\n' \ |
---|
413 | '\trm -f libbsd.html\n' \ |
---|
414 | '\n' \ |
---|
415 | '-include $(C_DEP_FILES)\n' \ |
---|
416 | '\n' \ |
---|
417 | 'doc: libbsd.html\n' \ |
---|
418 | '\n' \ |
---|
419 | 'libbsd.html: libbsd.txt\n' \ |
---|
420 | '\tasciidoc -o libbsd.html libbsd.txt\n' |
---|
421 | |
---|
422 | out = open(tempFile, 'w') |
---|
423 | out.write(data) |
---|
424 | out.close() |
---|
425 | makefile = RTEMS_DIR + '/Makefile' |
---|
426 | if copyIfDifferent(tempFile, makefile) == True: |
---|
427 | if isVerbose == True: |
---|
428 | print "Create Makefile" |
---|
429 | |
---|
430 | # Module - logical group of related files we can perform actions on |
---|
431 | class Module: |
---|
432 | def __init__(self, name): |
---|
433 | self.name = name |
---|
434 | self.target = "generic" |
---|
435 | self.headerFiles = [] |
---|
436 | self.sourceFiles = [] |
---|
437 | self.dependencies = [] |
---|
438 | |
---|
439 | def setTarget(self, value): |
---|
440 | self.target = value |
---|
441 | |
---|
442 | def addHeaderFiles(self, files): |
---|
443 | self.headerFiles.extend(files) |
---|
444 | for file in files: |
---|
445 | if file[-2] != '.' or file[-1] != 'h': |
---|
446 | print "*** " + file + " does not end in .h" |
---|
447 | print "*** Move it to a C source file list" |
---|
448 | sys.exit(2) |
---|
449 | |
---|
450 | def addSourceFiles(self, files): |
---|
451 | self.sourceFiles.extend(files) |
---|
452 | for file in files: |
---|
453 | if file[-2] != '.' or \ |
---|
454 | (file[-1] != 'c' and file[-1] != 'S'): |
---|
455 | print "*** " + file + " does not end in .c" |
---|
456 | print "*** Move it to a header file list" |
---|
457 | sys.exit(2) |
---|
458 | |
---|
459 | |
---|
460 | def addDependency(self, dep): |
---|
461 | self.dependencies.append(dep) |
---|
462 | |
---|
463 | # Create Module Manager and supporting Modules |
---|
464 | # - initialize each module with set of files associated |
---|
465 | mm = ModuleManager() |
---|
466 | |
---|
467 | rtems_headerFiles = [ |
---|
468 | 'rtems/machine/atomic.h', |
---|
469 | 'rtems/machine/_bus.h', |
---|
470 | 'rtems/machine/bus.h', |
---|
471 | 'rtems/machine/bus_dma.h', |
---|
472 | 'rtems/machine/rtems-bsd-config.h', |
---|
473 | 'rtems/machine/clock.h', |
---|
474 | 'rtems/machine/cpufunc.h', |
---|
475 | 'rtems/machine/endian.h', |
---|
476 | 'rtems/machine/_limits.h', |
---|
477 | 'rtems/machine/_align.h', |
---|
478 | 'rtems/machine/mutex.h', |
---|
479 | 'rtems/machine/param.h', |
---|
480 | 'rtems/machine/pcpu.h', |
---|
481 | #'rtems/machine/pmap.h', |
---|
482 | 'rtems/machine/proc.h', |
---|
483 | 'rtems/machine/resource.h', |
---|
484 | 'rtems/machine/runq.h', |
---|
485 | 'rtems/machine/signal.h', |
---|
486 | 'rtems/machine/stdarg.h', |
---|
487 | 'rtems/machine/_stdint.h', |
---|
488 | 'rtems/machine/_types.h', |
---|
489 | 'rtems/machine/ucontext.h', |
---|
490 | 'rtems/machine/rtems-bsd-symbols.h', |
---|
491 | 'rtems/machine/rtems-bsd-cache.h', |
---|
492 | 'rtems/machine/rtems-bsd-sysinit.h', |
---|
493 | 'rtems/machine/rtems-bsd-select.h', |
---|
494 | #'rtems/machine/vm.h', |
---|
495 | 'bsd.h', |
---|
496 | ] |
---|
497 | rtems_sourceFiles = [ |
---|
498 | 'dev/usb/controller/ohci_lpc3250.c', |
---|
499 | 'src/rtems-bsd-cam.c', |
---|
500 | 'src/rtems-bsd-nexus.c', |
---|
501 | 'src/rtems-bsd-autoconf.c', |
---|
502 | 'src/rtems-bsd-delay.c', |
---|
503 | 'src/rtems-bsd-mutex.c', |
---|
504 | 'src/rtems-bsd-thread.c', |
---|
505 | 'src/rtems-bsd-condvar.c', |
---|
506 | 'src/rtems-bsd-lock.c', |
---|
507 | 'src/rtems-bsd-sx.c', |
---|
508 | 'src/rtems-bsd-rmlock.c', |
---|
509 | 'src/rtems-bsd-rwlock.c', |
---|
510 | 'src/rtems-bsd-generic.c', |
---|
511 | 'src/rtems-bsd-panic.c', |
---|
512 | 'src/rtems-bsd-synch.c', |
---|
513 | 'src/rtems-bsd-signal.c', |
---|
514 | 'src/rtems-bsd-callout.c', |
---|
515 | 'src/rtems-bsd-init.c', |
---|
516 | 'src/rtems-bsd-init-with-irq.c', |
---|
517 | 'src/rtems-bsd-assert.c', |
---|
518 | 'src/rtems-bsd-prot.c', |
---|
519 | 'src/rtems-bsd-resource.c', |
---|
520 | 'src/rtems-bsd-jail.c', |
---|
521 | 'src/rtems-bsd-shell.c', |
---|
522 | 'src/rtems-bsd-syscalls.c', |
---|
523 | #'src/rtems-bsd-socket.c', |
---|
524 | #'src/rtems-bsd-mbuf.c', |
---|
525 | 'src/rtems-bsd-malloc.c', |
---|
526 | 'src/rtems-bsd-support.c', |
---|
527 | 'src/rtems-bsd-bus-dma.c', |
---|
528 | 'src/rtems-bsd-sysctl.c', |
---|
529 | 'src/rtems-bsd-sysctlbyname.c', |
---|
530 | 'src/rtems-bsd-sysctlnametomib.c', |
---|
531 | 'src/rtems-bsd-uma.c', |
---|
532 | ] |
---|
533 | # RTEMS files handled separately from modules |
---|
534 | # rtems = Module('rtems') |
---|
535 | # rtems.addHeaderFiles( rtems_headerFiles ) |
---|
536 | # rtems.addSourceFiles( rtems_sourceFiles ) |
---|
537 | |
---|
538 | local = Module('local') |
---|
539 | # RTEMS has its own local/pmap.h |
---|
540 | local.addHeaderFiles( |
---|
541 | [ |
---|
542 | 'local/bus_if.h', |
---|
543 | 'local/device_if.h', |
---|
544 | #'local/linker_if.h', |
---|
545 | 'local/opt_bus.h', |
---|
546 | 'local/opt_cam.h', |
---|
547 | 'local/opt_compat.h', |
---|
548 | 'local/opt_ddb.h', |
---|
549 | 'local/opt_hwpmc_hooks.h', |
---|
550 | 'local/opt_init_path.h', |
---|
551 | 'local/opt_ktrace.h', |
---|
552 | 'local/opt_printf.h', |
---|
553 | 'local/opt_scsi.h', |
---|
554 | 'local/opt_usb.h', |
---|
555 | 'local/opt_inet.h', |
---|
556 | 'local/opt_inet6.h', |
---|
557 | 'local/opt_altq.h', |
---|
558 | 'local/opt_atalk.h', |
---|
559 | 'local/opt_bootp.h', |
---|
560 | 'local/opt_bpf.h', |
---|
561 | 'local/opt_bus.h', |
---|
562 | 'local/opt_cam.h', |
---|
563 | 'local/opt_carp.h', |
---|
564 | 'local/opt_compat.h', |
---|
565 | 'local/opt_config.h', |
---|
566 | 'local/opt_cpu.h', |
---|
567 | 'local/opt_ddb.h', |
---|
568 | 'local/opt_device_polling.h', |
---|
569 | 'local/opt_ef.h', |
---|
570 | 'local/opt_enc.h', |
---|
571 | 'local/opt_hwpmc_hooks.h', |
---|
572 | 'local/opt_inet6.h', |
---|
573 | 'local/opt_inet.h', |
---|
574 | 'local/opt_init_path.h', |
---|
575 | 'local/opt_ipdivert.h', |
---|
576 | 'local/opt_ipdn.h', |
---|
577 | 'local/opt_ipfw.h', |
---|
578 | 'local/opt_ipsec.h', |
---|
579 | 'local/opt_ipstealth.h', |
---|
580 | 'local/opt_ipx.h', |
---|
581 | 'local/opt_kdb.h', |
---|
582 | 'local/opt_kdtrace.h', |
---|
583 | 'local/opt_ktrace.h', |
---|
584 | 'local/opt_mbuf_profiling.h', |
---|
585 | 'local/opt_mbuf_stress_test.h', |
---|
586 | 'local/opt_mpath.h', |
---|
587 | 'local/opt_mrouting.h', |
---|
588 | 'local/opt_natm.h', |
---|
589 | 'local/opt_netgraph.h', |
---|
590 | 'local/opt_param.h', |
---|
591 | 'local/opt_posix.h', |
---|
592 | 'local/opt_pf.h', |
---|
593 | 'local/opt_printf.h', |
---|
594 | 'local/opt_route.h', |
---|
595 | 'local/opt_scsi.h', |
---|
596 | 'local/opt_sctp.h', |
---|
597 | 'local/opt_tcpdebug.h', |
---|
598 | 'local/opt_tdma.h', |
---|
599 | 'local/opt_usb.h', |
---|
600 | 'local/opt_vlan.h', |
---|
601 | 'local/opt_wlan.h', |
---|
602 | 'local/opt_zero.h', |
---|
603 | 'local/usbdevs_data.h', |
---|
604 | 'local/usbdevs.h', |
---|
605 | 'local/usb_if.h', |
---|
606 | 'local/vnode_if.h', |
---|
607 | 'local/vnode_if_newproto.h', |
---|
608 | 'local/vnode_if_typedef.h', |
---|
609 | 'local/cryptodev_if.h', |
---|
610 | 'local/miibus_if.h', |
---|
611 | 'local/miidevs.h', |
---|
612 | ] |
---|
613 | ) |
---|
614 | local.addSourceFiles( |
---|
615 | [ |
---|
616 | 'local/usb_if.c', |
---|
617 | 'local/bus_if.c', |
---|
618 | #'local/linker_if.c', |
---|
619 | 'local/device_if.c', |
---|
620 | 'local/cryptodev_if.c', |
---|
621 | 'local/miibus_if.c', |
---|
622 | ] |
---|
623 | ) |
---|
624 | |
---|
625 | devUsb = Module('dev_usb') |
---|
626 | devUsb.addHeaderFiles( |
---|
627 | [ |
---|
628 | 'dev/usb/ufm_ioctl.h', |
---|
629 | 'dev/usb/usb_busdma.h', |
---|
630 | 'dev/usb/usb_bus.h', |
---|
631 | 'dev/usb/usb_cdc.h', |
---|
632 | 'dev/usb/usb_controller.h', |
---|
633 | 'dev/usb/usb_core.h', |
---|
634 | 'dev/usb/usb_debug.h', |
---|
635 | 'dev/usb/usb_dev.h', |
---|
636 | 'dev/usb/usb_device.h', |
---|
637 | 'dev/usb/usbdi.h', |
---|
638 | 'dev/usb/usbdi_util.h', |
---|
639 | 'dev/usb/usb_dynamic.h', |
---|
640 | 'dev/usb/usb_endian.h', |
---|
641 | 'dev/usb/usb_freebsd.h', |
---|
642 | 'dev/usb/usb_generic.h', |
---|
643 | 'dev/usb/usb.h', |
---|
644 | 'dev/usb/usbhid.h', |
---|
645 | 'dev/usb/usb_hub.h', |
---|
646 | 'dev/usb/usb_ioctl.h', |
---|
647 | 'dev/usb/usb_mbuf.h', |
---|
648 | 'dev/usb/usb_msctest.h', |
---|
649 | 'dev/usb/usb_process.h', |
---|
650 | 'dev/usb/usb_request.h', |
---|
651 | 'dev/usb/usb_transfer.h', |
---|
652 | 'dev/usb/usb_util.h', |
---|
653 | ] |
---|
654 | ) |
---|
655 | devUsb.addSourceFiles( |
---|
656 | [ |
---|
657 | 'dev/usb/usb_busdma.c', |
---|
658 | 'dev/usb/usb_core.c', |
---|
659 | 'dev/usb/usb_debug.c', |
---|
660 | 'dev/usb/usb_dev.c', |
---|
661 | 'dev/usb/usb_device.c', |
---|
662 | 'dev/usb/usb_dynamic.c', |
---|
663 | 'dev/usb/usb_error.c', |
---|
664 | 'dev/usb/usb_generic.c', |
---|
665 | 'dev/usb/usb_handle_request.c', |
---|
666 | 'dev/usb/usb_hid.c', |
---|
667 | 'dev/usb/usb_hub.c', |
---|
668 | 'dev/usb/usb_lookup.c', |
---|
669 | 'dev/usb/usb_mbuf.c', |
---|
670 | 'dev/usb/usb_msctest.c', |
---|
671 | 'dev/usb/usb_parse.c', |
---|
672 | 'dev/usb/usb_process.c', |
---|
673 | 'dev/usb/usb_request.c', |
---|
674 | 'dev/usb/usb_transfer.c', |
---|
675 | 'dev/usb/usb_util.c', |
---|
676 | ] |
---|
677 | ) |
---|
678 | |
---|
679 | devUsbAddOn = Module('dev_usb_add_on') |
---|
680 | devUsbAddOn.addHeaderFiles( |
---|
681 | [ |
---|
682 | 'dev/usb/usb_pci.h', |
---|
683 | 'dev/usb/usb_compat_linux.h', |
---|
684 | ] |
---|
685 | ) |
---|
686 | devUsbAddOn.addSourceFiles( |
---|
687 | [ |
---|
688 | 'dev/usb/usb_compat_linux.c', |
---|
689 | ] |
---|
690 | ) |
---|
691 | |
---|
692 | devUsbBluetooth = Module('dev_usb_bluetooth') |
---|
693 | devUsbBluetooth.addDependency(devUsb) |
---|
694 | devUsbBluetooth.addHeaderFiles( |
---|
695 | [ |
---|
696 | 'dev/usb/bluetooth/ng_ubt_var.h', |
---|
697 | ] |
---|
698 | ) |
---|
699 | devUsbBluetooth.addSourceFiles( |
---|
700 | [ |
---|
701 | 'dev/usb/bluetooth/ng_ubt.c', |
---|
702 | 'dev/usb/bluetooth/ubtbcmfw.c', |
---|
703 | ] |
---|
704 | ) |
---|
705 | |
---|
706 | devUsbController = Module('dev_usb_controller') |
---|
707 | devUsbController.addDependency(devUsb) |
---|
708 | devUsbController.addHeaderFiles( |
---|
709 | [ |
---|
710 | 'dev/usb/controller/ohci.h', |
---|
711 | 'dev/usb/controller/ohcireg.h', |
---|
712 | 'dev/usb/controller/ehci.h', |
---|
713 | 'dev/usb/controller/ehcireg.h', |
---|
714 | ] |
---|
715 | ) |
---|
716 | devUsbController.addSourceFiles( |
---|
717 | [ |
---|
718 | 'dev/usb/controller/ohci.c', |
---|
719 | 'dev/usb/controller/ehci.c', |
---|
720 | 'dev/usb/controller/usb_controller.c', |
---|
721 | ] |
---|
722 | ) |
---|
723 | |
---|
724 | devUsbControllerAddOn = Module('dev_usb_controller_add_on') |
---|
725 | devUsbControllerAddOn.addDependency(devUsb) |
---|
726 | devUsbControllerAddOn.addHeaderFiles( |
---|
727 | [ |
---|
728 | 'dev/usb/controller/at91dci.h', |
---|
729 | 'dev/usb/controller/atmegadci.h', |
---|
730 | 'dev/usb/controller/musb_otg.h', |
---|
731 | 'dev/usb/controller/uss820dci.h', |
---|
732 | ] |
---|
733 | ) |
---|
734 | devUsbControllerAddOn.addSourceFiles( |
---|
735 | [ |
---|
736 | 'dev/usb/controller/at91dci_atmelarm.c', |
---|
737 | 'dev/usb/controller/at91dci.c', |
---|
738 | 'dev/usb/controller/atmegadci_atmelarm.c', |
---|
739 | 'dev/usb/controller/atmegadci.c', |
---|
740 | 'dev/usb/controller/ehci_ixp4xx.c', |
---|
741 | 'dev/usb/controller/ehci_pci.c', |
---|
742 | 'dev/usb/controller/musb_otg.c', |
---|
743 | 'dev/usb/controller/ehci_mbus.c', |
---|
744 | 'dev/usb/controller/musb_otg_atmelarm.c', |
---|
745 | 'dev/usb/controller/ohci_atmelarm.c', |
---|
746 | 'dev/usb/controller/ohci_pci.c', |
---|
747 | 'dev/usb/controller/uhci_pci.c', |
---|
748 | 'dev/usb/controller/uss820dci_atmelarm.c', |
---|
749 | 'dev/usb/controller/uss820dci.c', |
---|
750 | ] |
---|
751 | ) |
---|
752 | |
---|
753 | devUsbInput = Module('dev_usb_input') |
---|
754 | devUsbInput.addDependency(devUsb) |
---|
755 | devUsbInput.addHeaderFiles( |
---|
756 | [ |
---|
757 | 'dev/usb/input/usb_rdesc.h', |
---|
758 | ] |
---|
759 | ) |
---|
760 | devUsbInput.addSourceFiles( |
---|
761 | [ |
---|
762 | 'dev/usb/input/uhid.c', |
---|
763 | 'dev/usb/input/ukbd.c', |
---|
764 | ] |
---|
765 | ) |
---|
766 | |
---|
767 | devUsbInputMouse = Module('dev_usb_mouse') |
---|
768 | devUsbInputMouse.addDependency(devUsb) |
---|
769 | devUsbInputMouse.addHeaderFiles( |
---|
770 | [ |
---|
771 | 'sys/tty.h', |
---|
772 | 'sys/mouse.h', |
---|
773 | 'sys/ttyqueue.h', |
---|
774 | 'sys/ttydefaults.h', |
---|
775 | 'sys/ttydisc.h', |
---|
776 | 'sys/ttydevsw.h', |
---|
777 | 'sys/ttyhook.h', |
---|
778 | ] |
---|
779 | ) |
---|
780 | devUsbInputMouse.addSourceFiles( |
---|
781 | [ |
---|
782 | 'dev/usb/input/ums.c', |
---|
783 | ] |
---|
784 | ) |
---|
785 | |
---|
786 | devUsbMisc = Module('dev_usb_misc') |
---|
787 | devUsbMisc.addDependency(devUsb) |
---|
788 | devUsbMisc.addHeaderFiles( |
---|
789 | [ |
---|
790 | 'dev/usb/misc/udbp.h', |
---|
791 | ] |
---|
792 | ) |
---|
793 | devUsbMisc.addSourceFiles( |
---|
794 | [ |
---|
795 | 'dev/usb/misc/udbp.c', |
---|
796 | 'dev/usb/misc/ufm.c', |
---|
797 | ] |
---|
798 | ) |
---|
799 | |
---|
800 | devUsbNet = Module('dev_usb_net') |
---|
801 | devUsbNet.addDependency(devUsb) |
---|
802 | devUsbNet.addHeaderFiles( |
---|
803 | [ |
---|
804 | 'dev/mii/mii.h', |
---|
805 | 'dev/mii/miivar.h', |
---|
806 | 'net/bpf.h', |
---|
807 | 'net/ethernet.h', |
---|
808 | 'net/if_arp.h', |
---|
809 | 'net/if_dl.h', |
---|
810 | 'net/if.h', |
---|
811 | 'net/if_media.h', |
---|
812 | 'net/if_types.h', |
---|
813 | 'net/if_var.h', |
---|
814 | 'net/vnet.h', |
---|
815 | 'dev/usb/net/if_cdcereg.h', |
---|
816 | 'dev/usb/net/usb_ethernet.h', |
---|
817 | ] |
---|
818 | ) |
---|
819 | devUsbNet.addSourceFiles( |
---|
820 | [ |
---|
821 | 'dev/usb/net/if_cdce.c', |
---|
822 | 'dev/usb/net/usb_ethernet.c', |
---|
823 | ] |
---|
824 | ) |
---|
825 | |
---|
826 | devUsbQuirk = Module('dev_usb_quirk') |
---|
827 | devUsbQuirk.addDependency(devUsb) |
---|
828 | devUsbQuirk.addHeaderFiles( |
---|
829 | [ |
---|
830 | 'dev/usb/quirk/usb_quirk.h', |
---|
831 | ] |
---|
832 | ) |
---|
833 | devUsbQuirk.addSourceFiles( |
---|
834 | [ |
---|
835 | 'dev/usb/quirk/usb_quirk.c', |
---|
836 | ] |
---|
837 | ) |
---|
838 | |
---|
839 | devUsbSerial = Module('dev_usb_serial') |
---|
840 | devUsbSerial.addDependency(devUsb) |
---|
841 | devUsbSerial.addHeaderFiles( |
---|
842 | [ |
---|
843 | 'dev/usb/serial/uftdi_reg.h', |
---|
844 | 'dev/usb/serial/usb_serial.h', |
---|
845 | ] |
---|
846 | ) |
---|
847 | devUsbSerial.addSourceFiles( |
---|
848 | [ |
---|
849 | 'dev/usb/serial/u3g.c', |
---|
850 | 'dev/usb/serial/uark.c', |
---|
851 | 'dev/usb/serial/ubsa.c', |
---|
852 | 'dev/usb/serial/ubser.c', |
---|
853 | 'dev/usb/serial/uchcom.c', |
---|
854 | 'dev/usb/serial/ucycom.c', |
---|
855 | 'dev/usb/serial/ufoma.c', |
---|
856 | 'dev/usb/serial/uftdi.c', |
---|
857 | 'dev/usb/serial/ugensa.c', |
---|
858 | 'dev/usb/serial/uipaq.c', |
---|
859 | 'dev/usb/serial/ulpt.c', |
---|
860 | 'dev/usb/serial/umct.c', |
---|
861 | 'dev/usb/serial/umodem.c', |
---|
862 | 'dev/usb/serial/umoscom.c', |
---|
863 | 'dev/usb/serial/uplcom.c', |
---|
864 | 'dev/usb/serial/usb_serial.c', |
---|
865 | 'dev/usb/serial/uslcom.c', |
---|
866 | 'dev/usb/serial/uvisor.c', |
---|
867 | 'dev/usb/serial/uvscom.c', |
---|
868 | ] |
---|
869 | ) |
---|
870 | |
---|
871 | devUsbStorage = Module('dev_usb_storage') |
---|
872 | devUsbStorage.addDependency(devUsb) |
---|
873 | devUsbStorage.addSourceFiles( |
---|
874 | [ |
---|
875 | 'dev/usb/storage/umass.c', |
---|
876 | ] |
---|
877 | ) |
---|
878 | |
---|
879 | devUsbStorageAddOn = Module('dev_usb_storage_add_on') |
---|
880 | devUsbStorageAddOn.addDependency(devUsb) |
---|
881 | devUsbStorageAddOn.addHeaderFiles( |
---|
882 | [ |
---|
883 | 'dev/usb/storage/rio500_usb.h', |
---|
884 | ] |
---|
885 | ) |
---|
886 | devUsbStorageAddOn.addSourceFiles( |
---|
887 | [ |
---|
888 | 'dev/usb/storage/urio.c', |
---|
889 | 'dev/usb/storage/ustorage_fs.c', |
---|
890 | ] |
---|
891 | ) |
---|
892 | |
---|
893 | devUsbTemplate = Module('dev_usb_template') |
---|
894 | devUsbTemplate.addDependency(devUsb) |
---|
895 | devUsbTemplate.addHeaderFiles( |
---|
896 | [ |
---|
897 | 'dev/usb/template/usb_template.h', |
---|
898 | ] |
---|
899 | ) |
---|
900 | devUsbTemplate.addSourceFiles( |
---|
901 | [ |
---|
902 | 'dev/usb/template/usb_template.c', |
---|
903 | 'dev/usb/template/usb_template_cdce.c', |
---|
904 | 'dev/usb/template/usb_template_msc.c', |
---|
905 | 'dev/usb/template/usb_template_mtp.c', |
---|
906 | ] |
---|
907 | ) |
---|
908 | |
---|
909 | devUsbWlan = Module('dev_usb_wlan') |
---|
910 | devUsbWlan.addDependency(devUsb) |
---|
911 | devUsbWlan.addHeaderFiles( |
---|
912 | [ |
---|
913 | 'dev/usb/wlan/if_rumfw.h', |
---|
914 | 'dev/usb/wlan/if_rumreg.h', |
---|
915 | 'dev/usb/wlan/if_rumvar.h', |
---|
916 | 'dev/usb/wlan/if_uathreg.h', |
---|
917 | 'dev/usb/wlan/if_uathvar.h', |
---|
918 | 'dev/usb/wlan/if_upgtvar.h', |
---|
919 | 'dev/usb/wlan/if_uralreg.h', |
---|
920 | 'dev/usb/wlan/if_uralvar.h', |
---|
921 | 'dev/usb/wlan/if_zydfw.h', |
---|
922 | 'dev/usb/wlan/if_zydreg.h', |
---|
923 | ] |
---|
924 | ) |
---|
925 | devUsbWlan.addSourceFiles( |
---|
926 | [ |
---|
927 | 'dev/usb/wlan/if_rum.c', |
---|
928 | 'dev/usb/wlan/if_uath.c', |
---|
929 | 'dev/usb/wlan/if_upgt.c', |
---|
930 | 'dev/usb/wlan/if_ural.c', |
---|
931 | 'dev/usb/wlan/if_zyd.c', |
---|
932 | ] |
---|
933 | ) |
---|
934 | |
---|
935 | devPci = Module('dev_pci') |
---|
936 | devPci.addHeaderFiles( |
---|
937 | [ |
---|
938 | 'dev/pci/pcireg.h', |
---|
939 | 'dev/pci/pcivar.h', |
---|
940 | ] |
---|
941 | ) |
---|
942 | |
---|
943 | devUsbBase = Module('dev_usb_base') |
---|
944 | devUsbBase.addHeaderFiles( |
---|
945 | [ |
---|
946 | 'bsm/audit.h', |
---|
947 | 'bsm/audit_kevents.h', |
---|
948 | 'sys/acl.h', |
---|
949 | 'sys/bufobj.h', |
---|
950 | 'sys/_bus_dma.h', |
---|
951 | 'sys/bus_dma.h', |
---|
952 | 'sys/bus.h', |
---|
953 | 'sys/callout.h', |
---|
954 | 'sys/cdefs.h', |
---|
955 | 'sys/condvar.h', |
---|
956 | 'sys/conf.h', |
---|
957 | #'sys/cpuset.h', |
---|
958 | 'sys/ctype.h', |
---|
959 | 'sys/endian.h', |
---|
960 | 'sys/errno.h', |
---|
961 | 'sys/event.h', |
---|
962 | 'sys/eventhandler.h', |
---|
963 | 'sys/fcntl.h', |
---|
964 | 'sys/filedesc.h', |
---|
965 | 'sys/file.h', |
---|
966 | 'sys/filio.h', |
---|
967 | 'sys/ioccom.h', |
---|
968 | 'sys/_iovec.h', |
---|
969 | 'sys/kernel.h', |
---|
970 | 'sys/kobj.h', |
---|
971 | 'sys/kthread.h', |
---|
972 | 'sys/ktr.h', |
---|
973 | 'sys/libkern.h', |
---|
974 | 'sys/linker_set.h', |
---|
975 | 'sys/_lock.h', |
---|
976 | 'sys/lock.h', |
---|
977 | 'sys/_lockmgr.h', |
---|
978 | 'sys/lockmgr.h', |
---|
979 | 'sys/lock_profile.h', |
---|
980 | 'sys/lockstat.h', |
---|
981 | 'sys/mac.h', |
---|
982 | 'sys/malloc.h', |
---|
983 | 'sys/mbuf.h', |
---|
984 | 'sys/module.h', |
---|
985 | 'sys/mount.h', |
---|
986 | 'sys/_mutex.h', |
---|
987 | 'sys/mutex.h', |
---|
988 | 'sys/_null.h', |
---|
989 | 'sys/osd.h', |
---|
990 | 'sys/param.h', |
---|
991 | 'sys/pcpu.h', |
---|
992 | 'sys/poll.h', |
---|
993 | 'sys/priority.h', |
---|
994 | 'sys/priv.h', |
---|
995 | 'sys/proc.h', |
---|
996 | 'sys/queue.h', |
---|
997 | 'sys/refcount.h', |
---|
998 | 'sys/resource.h', |
---|
999 | 'sys/resourcevar.h', |
---|
1000 | 'sys/rtprio.h', |
---|
1001 | 'sys/runq.h', |
---|
1002 | 'sys/_rwlock.h', |
---|
1003 | 'sys/rwlock.h', |
---|
1004 | 'sys/_semaphore.h', |
---|
1005 | 'sys/selinfo.h', |
---|
1006 | 'sys/sigio.h', |
---|
1007 | 'sys/signal.h', |
---|
1008 | 'sys/signalvar.h', |
---|
1009 | 'sys/_sigset.h', |
---|
1010 | #'sys/sleepqueue.h', |
---|
1011 | 'sys/socket.h', |
---|
1012 | 'sys/stddef.h', |
---|
1013 | 'sys/stdint.h', |
---|
1014 | 'sys/_sx.h', |
---|
1015 | 'sys/sx.h', |
---|
1016 | 'sys/sysctl.h', |
---|
1017 | 'sys/systm.h', |
---|
1018 | 'sys/ttycom.h', |
---|
1019 | 'sys/_types.h', |
---|
1020 | 'sys/types.h', |
---|
1021 | 'sys/ucontext.h', |
---|
1022 | 'sys/ucred.h', |
---|
1023 | 'sys/uio.h', |
---|
1024 | 'sys/unistd.h', |
---|
1025 | #'sys/vmmeter.h', |
---|
1026 | #'sys/vnode.h', |
---|
1027 | 'sys/rman.h', |
---|
1028 | 'sys/reboot.h', |
---|
1029 | 'sys/bitstring.h', |
---|
1030 | 'sys/linker.h', |
---|
1031 | 'vm/uma.h', |
---|
1032 | 'vm/uma_int.h', |
---|
1033 | 'vm/uma_dbg.h', |
---|
1034 | #'vm/vm.h', |
---|
1035 | #'vm/vm_page.h', |
---|
1036 | 'fs/devfs/devfs_int.h', |
---|
1037 | ] |
---|
1038 | ) |
---|
1039 | devUsbBase.addSourceFiles( |
---|
1040 | [ |
---|
1041 | 'kern/init_main.c', |
---|
1042 | #'kern/kern_linker.c', |
---|
1043 | #'kern/kern_mib.c', |
---|
1044 | 'kern/kern_mbuf.c', |
---|
1045 | 'kern/kern_module.c', |
---|
1046 | 'kern/kern_sysctl.c', |
---|
1047 | 'kern/subr_bus.c', |
---|
1048 | 'kern/subr_kobj.c', |
---|
1049 | #'kern/subr_sleepqueue.c', |
---|
1050 | 'kern/uipc_mbuf.c', |
---|
1051 | 'kern/uipc_mbuf2.c', |
---|
1052 | 'kern/uipc_socket.c', |
---|
1053 | #'kern/uipc_domain.c', |
---|
1054 | #'kern/uipc_syscalls.c', |
---|
1055 | #'vm/uma_core.c', |
---|
1056 | ] |
---|
1057 | ) |
---|
1058 | |
---|
1059 | cam = Module('cam') |
---|
1060 | cam.addHeaderFiles( |
---|
1061 | [ |
---|
1062 | 'sys/ata.h', |
---|
1063 | 'cam/cam.h', |
---|
1064 | 'cam/cam_ccb.h', |
---|
1065 | 'cam/cam_sim.h', |
---|
1066 | 'cam/cam_xpt_sim.h', |
---|
1067 | 'cam/scsi/scsi_all.h', |
---|
1068 | 'cam/scsi/scsi_da.h', |
---|
1069 | 'cam/ata/ata_all.h', |
---|
1070 | 'cam/cam_periph.h', |
---|
1071 | 'cam/cam_debug.h', |
---|
1072 | 'cam/cam_xpt.h', |
---|
1073 | ] |
---|
1074 | ) |
---|
1075 | cam.addSourceFiles( |
---|
1076 | [ |
---|
1077 | 'cam/cam.c', |
---|
1078 | 'cam/scsi/scsi_all.c', |
---|
1079 | ] |
---|
1080 | ) |
---|
1081 | |
---|
1082 | devNet = Module('dev_net') |
---|
1083 | devNet.addHeaderFiles( |
---|
1084 | [ |
---|
1085 | 'dev/mii/mii.h', |
---|
1086 | 'dev/mii/miivar.h', |
---|
1087 | 'dev/mii/icsphyreg.h', |
---|
1088 | 'net/bpf.h', |
---|
1089 | 'net/ethernet.h', |
---|
1090 | 'net/if_arp.h', |
---|
1091 | 'net/if_dl.h', |
---|
1092 | 'net/if.h', |
---|
1093 | 'net/if_media.h', |
---|
1094 | 'net/if_types.h', |
---|
1095 | 'net/if_var.h', |
---|
1096 | 'net/vnet.h', |
---|
1097 | ] |
---|
1098 | ) |
---|
1099 | devNet.addSourceFiles( |
---|
1100 | [ |
---|
1101 | 'dev/mii/mii.c', |
---|
1102 | 'dev/mii/mii_physubr.c', |
---|
1103 | 'dev/mii/icsphy.c', |
---|
1104 | ] |
---|
1105 | ) |
---|
1106 | |
---|
1107 | netDeps = Module('netDeps') |
---|
1108 | netDeps.addHeaderFiles( |
---|
1109 | [ |
---|
1110 | 'security/mac/mac_framework.h', |
---|
1111 | 'sys/cpu.h', |
---|
1112 | 'sys/interrupt.h', |
---|
1113 | 'sys/fnv_hash.h', |
---|
1114 | 'sys/tree.h', |
---|
1115 | 'sys/taskqueue.h', |
---|
1116 | 'sys/buf_ring.h', |
---|
1117 | 'sys/rwlock.h', |
---|
1118 | 'sys/_rmlock.h', |
---|
1119 | 'sys/sockio.h', |
---|
1120 | 'sys/sdt.h', |
---|
1121 | 'sys/_task.h', |
---|
1122 | 'sys/sbuf.h', |
---|
1123 | 'sys/smp.h', |
---|
1124 | 'sys/syslog.h', |
---|
1125 | 'sys/jail.h', |
---|
1126 | 'sys/protosw.h', |
---|
1127 | 'sys/random.h', |
---|
1128 | 'sys/rmlock.h', |
---|
1129 | 'sys/hash.h', |
---|
1130 | #'sys/select.h', |
---|
1131 | 'sys/sf_buf.h', |
---|
1132 | 'sys/socketvar.h', |
---|
1133 | 'sys/sockbuf.h', |
---|
1134 | #'sys/sysproto.h', |
---|
1135 | 'sys/sockstate.h', |
---|
1136 | 'sys/sockopt.h', |
---|
1137 | 'sys/domain.h', |
---|
1138 | 'sys/time.h', |
---|
1139 | ] |
---|
1140 | ) |
---|
1141 | |
---|
1142 | net = Module('net') |
---|
1143 | net.addHeaderFiles( |
---|
1144 | [ |
---|
1145 | 'net/bpf_buffer.h', |
---|
1146 | 'net/bpfdesc.h', |
---|
1147 | 'net/bpf.h', |
---|
1148 | 'net/bpf_jitter.h', |
---|
1149 | 'net/bpf_zerocopy.h', |
---|
1150 | 'net/bridgestp.h', |
---|
1151 | 'net/ethernet.h', |
---|
1152 | 'net/fddi.h', |
---|
1153 | 'net/firewire.h', |
---|
1154 | 'net/flowtable.h', |
---|
1155 | 'net/ieee8023ad_lacp.h', |
---|
1156 | 'net/if_arc.h', |
---|
1157 | 'net/if_arp.h', |
---|
1158 | 'net/if_atm.h', |
---|
1159 | 'net/if_bridgevar.h', |
---|
1160 | 'net/if_clone.h', |
---|
1161 | 'net/if_dl.h', |
---|
1162 | 'net/if_enc.h', |
---|
1163 | 'net/if_gif.h', |
---|
1164 | 'net/if_gre.h', |
---|
1165 | 'net/if.h', |
---|
1166 | 'net/if_lagg.h', |
---|
1167 | 'net/if_llatbl.h', |
---|
1168 | 'net/if_llc.h', |
---|
1169 | 'net/if_media.h', |
---|
1170 | 'net/if_mib.h', |
---|
1171 | 'net/if_sppp.h', |
---|
1172 | 'net/if_stf.h', |
---|
1173 | 'net/if_tap.h', |
---|
1174 | 'net/if_tapvar.h', |
---|
1175 | 'net/if_tun.h', |
---|
1176 | 'net/if_types.h', |
---|
1177 | 'net/if_var.h', |
---|
1178 | 'net/if_vlan_var.h', |
---|
1179 | 'net/iso88025.h', |
---|
1180 | 'net/netisr.h', |
---|
1181 | 'net/pfil.h', |
---|
1182 | 'net/pfkeyv2.h', |
---|
1183 | 'net/ppp_defs.h', |
---|
1184 | 'net/radix.h', |
---|
1185 | 'net/radix_mpath.h', |
---|
1186 | 'net/raw_cb.h', |
---|
1187 | 'net/route.h', |
---|
1188 | 'net/slcompress.h', |
---|
1189 | 'net/vnet.h', |
---|
1190 | 'net/zlib.h', |
---|
1191 | 'sys/timepps.h', |
---|
1192 | 'sys/timetc.h', |
---|
1193 | 'sys/timex.h', |
---|
1194 | ] |
---|
1195 | ) |
---|
1196 | net.addSourceFiles( |
---|
1197 | [ |
---|
1198 | 'kern/kern_subr.c', |
---|
1199 | 'kern/kern_tc.c', |
---|
1200 | 'net/bridgestp.c', |
---|
1201 | 'net/ieee8023ad_lacp.c', |
---|
1202 | 'net/if_atmsubr.c', |
---|
1203 | 'net/if.c', |
---|
1204 | 'net/if_clone.c', |
---|
1205 | 'net/if_dead.c', |
---|
1206 | 'net/if_disc.c', |
---|
1207 | 'net/if_edsc.c', |
---|
1208 | 'net/if_ef.c', |
---|
1209 | 'net/if_enc.c', |
---|
1210 | 'net/if_epair.c', |
---|
1211 | 'net/if_faith.c', |
---|
1212 | 'net/if_fddisubr.c', |
---|
1213 | 'net/if_fwsubr.c', |
---|
1214 | 'net/if_gif.c', |
---|
1215 | 'net/if_gre.c', |
---|
1216 | 'net/if_iso88025subr.c', |
---|
1217 | 'net/if_lagg.c', |
---|
1218 | 'net/if_llatbl.c', |
---|
1219 | 'net/if_loop.c', |
---|
1220 | 'net/if_media.c', |
---|
1221 | 'net/if_mib.c', |
---|
1222 | 'net/if_spppfr.c', |
---|
1223 | 'net/if_spppsubr.c', |
---|
1224 | 'net/if_stf.c', |
---|
1225 | 'net/if_tap.c', |
---|
1226 | 'net/if_tun.c', |
---|
1227 | 'net/if_vlan.c', |
---|
1228 | 'net/pfil.c', |
---|
1229 | 'net/radix.c', |
---|
1230 | 'net/radix_mpath.c', |
---|
1231 | 'net/raw_cb.c', |
---|
1232 | 'net/raw_usrreq.c', |
---|
1233 | 'net/route.c', |
---|
1234 | 'net/rtsock.c', |
---|
1235 | 'net/slcompress.c', |
---|
1236 | 'net/zlib.c', |
---|
1237 | 'net/bpf_buffer.c', |
---|
1238 | 'net/bpf.c', |
---|
1239 | 'net/bpf_filter.c', |
---|
1240 | 'net/bpf_jitter.c', |
---|
1241 | 'net/if_arcsubr.c', |
---|
1242 | 'net/if_bridge.c', |
---|
1243 | 'net/if_ethersubr.c', |
---|
1244 | 'net/netisr.c', |
---|
1245 | ] |
---|
1246 | ) |
---|
1247 | |
---|
1248 | netinet = Module('netinet') |
---|
1249 | netinet.addHeaderFiles( |
---|
1250 | [ |
---|
1251 | 'netinet/icmp6.h', |
---|
1252 | 'netinet/icmp_var.h', |
---|
1253 | 'netinet/if_atm.h', |
---|
1254 | 'netinet/if_ether.h', |
---|
1255 | 'netinet/igmp.h', |
---|
1256 | 'netinet/igmp_var.h', |
---|
1257 | 'netinet/in_gif.h', |
---|
1258 | 'netinet/in.h', |
---|
1259 | 'netinet/in_pcb.h', |
---|
1260 | 'netinet/in_systm.h', |
---|
1261 | 'netinet/in_var.h', |
---|
1262 | 'netinet/ip6.h', |
---|
1263 | 'netinet/ip_carp.h', |
---|
1264 | 'netinet/ip_divert.h', |
---|
1265 | 'netinet/ip_dummynet.h', |
---|
1266 | 'netinet/ip_ecn.h', |
---|
1267 | 'netinet/ip_encap.h', |
---|
1268 | 'netinet/ip_fw.h', |
---|
1269 | 'netinet/ip_gre.h', |
---|
1270 | 'netinet/ip.h', |
---|
1271 | 'netinet/ip_icmp.h', |
---|
1272 | 'netinet/ip_ipsec.h', |
---|
1273 | 'netinet/ip_mroute.h', |
---|
1274 | 'netinet/ip_options.h', |
---|
1275 | 'netinet/ip_var.h', |
---|
1276 | 'netinet/ipfw/ip_dn_private.h', |
---|
1277 | 'netinet/ipfw/ip_fw_private.h', |
---|
1278 | 'netinet/ipfw/dn_sched.h', |
---|
1279 | 'netinet/ipfw/dn_heap.h', |
---|
1280 | 'netinet/pim.h', |
---|
1281 | 'netinet/pim_var.h', |
---|
1282 | 'netinet/sctp_asconf.h', |
---|
1283 | 'netinet/sctp_auth.h', |
---|
1284 | 'netinet/sctp_bsd_addr.h', |
---|
1285 | 'netinet/sctp_cc_functions.h', |
---|
1286 | 'netinet/sctp_constants.h', |
---|
1287 | 'netinet/sctp_crc32.h', |
---|
1288 | 'netinet/sctp.h', |
---|
1289 | 'netinet/sctp_header.h', |
---|
1290 | 'netinet/sctp_indata.h', |
---|
1291 | 'netinet/sctp_input.h', |
---|
1292 | 'netinet/sctp_lock_bsd.h', |
---|
1293 | 'netinet/sctp_os_bsd.h', |
---|
1294 | 'netinet/sctp_os.h', |
---|
1295 | 'netinet/sctp_output.h', |
---|
1296 | 'netinet/sctp_pcb.h', |
---|
1297 | 'netinet/sctp_peeloff.h', |
---|
1298 | 'netinet/sctp_structs.h', |
---|
1299 | 'netinet/sctp_sysctl.h', |
---|
1300 | 'netinet/sctp_timer.h', |
---|
1301 | 'netinet/sctp_uio.h', |
---|
1302 | 'netinet/sctputil.h', |
---|
1303 | 'netinet/sctp_var.h', |
---|
1304 | 'netinet/tcp_debug.h', |
---|
1305 | 'netinet/tcp_fsm.h', |
---|
1306 | 'netinet/tcp.h', |
---|
1307 | 'netinet/tcp_hostcache.h', |
---|
1308 | 'netinet/tcpip.h', |
---|
1309 | 'netinet/tcp_lro.h', |
---|
1310 | 'netinet/tcp_offload.h', |
---|
1311 | 'netinet/tcp_seq.h', |
---|
1312 | 'netinet/tcp_syncache.h', |
---|
1313 | 'netinet/tcp_timer.h', |
---|
1314 | 'netinet/tcp_var.h', |
---|
1315 | 'netinet/toedev.h', |
---|
1316 | 'netinet/udp.h', |
---|
1317 | 'netinet/udp_var.h', |
---|
1318 | 'netinet/libalias/alias_local.h', |
---|
1319 | 'netinet/libalias/alias.h', |
---|
1320 | 'netinet/libalias/alias_mod.h', |
---|
1321 | 'netinet/libalias/alias_sctp.h', |
---|
1322 | ] |
---|
1323 | ) |
---|
1324 | # in_cksum.c is architecture dependent |
---|
1325 | netinet.addSourceFiles( |
---|
1326 | [ |
---|
1327 | 'netinet/accf_data.c', |
---|
1328 | 'netinet/accf_dns.c', |
---|
1329 | 'netinet/accf_http.c', |
---|
1330 | 'netinet/if_atm.c', |
---|
1331 | 'netinet/if_ether.c', |
---|
1332 | 'netinet/igmp.c', |
---|
1333 | 'netinet/in.c', |
---|
1334 | 'netinet/in_gif.c', |
---|
1335 | 'netinet/in_mcast.c', |
---|
1336 | 'netinet/in_pcb.c', |
---|
1337 | 'netinet/in_proto.c', |
---|
1338 | 'netinet/in_rmx.c', |
---|
1339 | 'netinet/ip_carp.c', |
---|
1340 | 'netinet/ip_divert.c', |
---|
1341 | 'netinet/ip_ecn.c', |
---|
1342 | 'netinet/ip_encap.c', |
---|
1343 | 'netinet/ip_fastfwd.c', |
---|
1344 | 'netinet/ip_gre.c', |
---|
1345 | 'netinet/ip_icmp.c', |
---|
1346 | 'netinet/ip_id.c', |
---|
1347 | 'netinet/ip_input.c', |
---|
1348 | 'netinet/ip_ipsec.c', |
---|
1349 | 'netinet/ip_mroute.c', |
---|
1350 | 'netinet/ip_options.c', |
---|
1351 | 'netinet/ip_output.c', |
---|
1352 | 'netinet/raw_ip.c', |
---|
1353 | 'netinet/sctp_asconf.c', |
---|
1354 | 'netinet/sctp_auth.c', |
---|
1355 | 'netinet/sctp_bsd_addr.c', |
---|
1356 | 'netinet/sctp_cc_functions.c', |
---|
1357 | 'netinet/sctp_crc32.c', |
---|
1358 | 'netinet/sctp_indata.c', |
---|
1359 | 'netinet/sctp_input.c', |
---|
1360 | 'netinet/sctp_output.c', |
---|
1361 | 'netinet/sctp_pcb.c', |
---|
1362 | 'netinet/sctp_peeloff.c', |
---|
1363 | 'netinet/sctp_sysctl.c', |
---|
1364 | 'netinet/sctp_timer.c', |
---|
1365 | 'netinet/sctp_usrreq.c', |
---|
1366 | 'netinet/sctputil.c', |
---|
1367 | 'netinet/tcp_debug.c', |
---|
1368 | #'netinet/tcp_hostcache.c', |
---|
1369 | 'netinet/tcp_input.c', |
---|
1370 | 'netinet/tcp_lro.c', |
---|
1371 | 'netinet/tcp_offload.c', |
---|
1372 | 'netinet/tcp_output.c', |
---|
1373 | 'netinet/tcp_reass.c', |
---|
1374 | 'netinet/tcp_sack.c', |
---|
1375 | 'netinet/tcp_subr.c', |
---|
1376 | 'netinet/tcp_syncache.c', |
---|
1377 | 'netinet/tcp_timer.c', |
---|
1378 | 'netinet/tcp_timewait.c', |
---|
1379 | 'netinet/tcp_usrreq.c', |
---|
1380 | 'netinet/udp_usrreq.c', |
---|
1381 | 'netinet/ipfw/dn_sched_fifo.c', |
---|
1382 | 'netinet/ipfw/dn_sched_rr.c', |
---|
1383 | 'netinet/ipfw/ip_fw_log.c', |
---|
1384 | 'netinet/ipfw/dn_sched_qfq.c', |
---|
1385 | 'netinet/ipfw/dn_sched_prio.c', |
---|
1386 | #'netinet/ipfw/ip_fw_dynamic.c', |
---|
1387 | 'netinet/ipfw/ip_dn_glue.c', |
---|
1388 | 'netinet/ipfw/ip_fw2.c', |
---|
1389 | 'netinet/ipfw/dn_heap.c', |
---|
1390 | 'netinet/ipfw/ip_dummynet.c', |
---|
1391 | 'netinet/ipfw/ip_fw_sockopt.c', |
---|
1392 | 'netinet/ipfw/dn_sched_wf2q.c', |
---|
1393 | 'netinet/ipfw/ip_fw_nat.c', |
---|
1394 | 'netinet/ipfw/ip_fw_pfil.c', |
---|
1395 | 'netinet/ipfw/ip_dn_io.c', |
---|
1396 | 'netinet/ipfw/ip_fw_table.c', |
---|
1397 | 'netinet/libalias/alias_dummy.c', |
---|
1398 | 'netinet/libalias/alias_pptp.c', |
---|
1399 | 'netinet/libalias/alias_smedia.c', |
---|
1400 | 'netinet/libalias/alias_mod.c', |
---|
1401 | 'netinet/libalias/alias_cuseeme.c', |
---|
1402 | 'netinet/libalias/alias_nbt.c', |
---|
1403 | 'netinet/libalias/alias_irc.c', |
---|
1404 | 'netinet/libalias/alias_util.c', |
---|
1405 | 'netinet/libalias/alias_db.c', |
---|
1406 | 'netinet/libalias/alias_ftp.c', |
---|
1407 | 'netinet/libalias/alias_proxy.c', |
---|
1408 | 'netinet/libalias/alias.c', |
---|
1409 | 'netinet/libalias/alias_skinny.c', |
---|
1410 | 'netinet/libalias/alias_sctp.c', |
---|
1411 | ] |
---|
1412 | ) |
---|
1413 | |
---|
1414 | netinet6 = Module('netinet6') |
---|
1415 | netinet6.addHeaderFiles( |
---|
1416 | [ |
---|
1417 | 'netinet6/icmp6.h', |
---|
1418 | 'netinet6/in6_gif.h', |
---|
1419 | 'netinet6/in6.h', |
---|
1420 | 'netinet6/in6_ifattach.h', |
---|
1421 | 'netinet6/in6_pcb.h', |
---|
1422 | 'netinet6/in6_var.h', |
---|
1423 | 'netinet6/ip6_ecn.h', |
---|
1424 | 'netinet6/ip6.h', |
---|
1425 | 'netinet6/ip6_ipsec.h', |
---|
1426 | 'netinet6/ip6_mroute.h', |
---|
1427 | 'netinet6/ip6protosw.h', |
---|
1428 | 'netinet6/ip6_var.h', |
---|
1429 | 'netinet6/mld6.h', |
---|
1430 | 'netinet6/mld6_var.h', |
---|
1431 | 'netinet6/nd6.h', |
---|
1432 | 'netinet6/pim6.h', |
---|
1433 | 'netinet6/pim6_var.h', |
---|
1434 | 'netinet6/raw_ip6.h', |
---|
1435 | 'netinet6/scope6_var.h', |
---|
1436 | 'netinet6/sctp6_var.h', |
---|
1437 | 'netinet6/tcp6_var.h', |
---|
1438 | 'netinet6/udp6_var.h', |
---|
1439 | ] |
---|
1440 | ) |
---|
1441 | netinet6.addSourceFiles( |
---|
1442 | [ |
---|
1443 | 'netinet6/dest6.c', |
---|
1444 | 'netinet6/frag6.c', |
---|
1445 | 'netinet6/icmp6.c', |
---|
1446 | 'netinet6/in6.c', |
---|
1447 | 'netinet6/in6_cksum.c', |
---|
1448 | 'netinet6/in6_gif.c', |
---|
1449 | 'netinet6/in6_ifattach.c', |
---|
1450 | 'netinet6/in6_mcast.c', |
---|
1451 | 'netinet6/in6_pcb.c', |
---|
1452 | 'netinet6/in6_proto.c', |
---|
1453 | 'netinet6/in6_rmx.c', |
---|
1454 | 'netinet6/in6_src.c', |
---|
1455 | 'netinet6/ip6_forward.c', |
---|
1456 | 'netinet6/ip6_id.c', |
---|
1457 | 'netinet6/ip6_input.c', |
---|
1458 | 'netinet6/ip6_ipsec.c', |
---|
1459 | 'netinet6/ip6_mroute.c', |
---|
1460 | 'netinet6/ip6_output.c', |
---|
1461 | 'netinet6/mld6.c', |
---|
1462 | 'netinet6/nd6.c', |
---|
1463 | 'netinet6/nd6_nbr.c', |
---|
1464 | 'netinet6/nd6_rtr.c', |
---|
1465 | 'netinet6/raw_ip6.c', |
---|
1466 | 'netinet6/route6.c', |
---|
1467 | 'netinet6/scope6.c', |
---|
1468 | 'netinet6/sctp6_usrreq.c', |
---|
1469 | 'netinet6/udp6_usrreq.c', |
---|
1470 | ] |
---|
1471 | ) |
---|
1472 | |
---|
1473 | netipsec = Module('netipsec') |
---|
1474 | netipsec.addHeaderFiles( |
---|
1475 | [ |
---|
1476 | 'netipsec/ah.h', |
---|
1477 | 'netipsec/ah_var.h', |
---|
1478 | 'netipsec/esp.h', |
---|
1479 | 'netipsec/esp_var.h', |
---|
1480 | 'netipsec/ipcomp.h', |
---|
1481 | 'netipsec/ipcomp_var.h', |
---|
1482 | 'netipsec/ipip_var.h', |
---|
1483 | 'netipsec/ipsec6.h', |
---|
1484 | 'netipsec/ipsec.h', |
---|
1485 | 'netipsec/keydb.h', |
---|
1486 | 'netipsec/key_debug.h', |
---|
1487 | 'netipsec/key.h', |
---|
1488 | 'netipsec/keysock.h', |
---|
1489 | 'netipsec/key_var.h', |
---|
1490 | 'netipsec/xform.h', |
---|
1491 | ] |
---|
1492 | ) |
---|
1493 | netipsec.addSourceFiles( |
---|
1494 | [ |
---|
1495 | 'netipsec/ipsec.c', |
---|
1496 | 'netipsec/ipsec_input.c', |
---|
1497 | 'netipsec/ipsec_mbuf.c', |
---|
1498 | 'netipsec/ipsec_output.c', |
---|
1499 | 'netipsec/key.c', |
---|
1500 | 'netipsec/key_debug.c', |
---|
1501 | 'netipsec/keysock.c', |
---|
1502 | 'netipsec/xform_ah.c', |
---|
1503 | 'netipsec/xform_esp.c', |
---|
1504 | 'netipsec/xform_ipcomp.c', |
---|
1505 | 'netipsec/xform_ipip.c', |
---|
1506 | 'netipsec/xform_tcp.c', |
---|
1507 | ] |
---|
1508 | ) |
---|
1509 | |
---|
1510 | net80211 = Module('net80211') |
---|
1511 | net80211.addHeaderFiles( |
---|
1512 | [ |
---|
1513 | 'net80211/ieee80211_action.h', |
---|
1514 | 'net80211/ieee80211_adhoc.h', |
---|
1515 | 'net80211/ieee80211_ageq.h', |
---|
1516 | 'net80211/ieee80211_amrr.h', |
---|
1517 | 'net80211/ieee80211_crypto.h', |
---|
1518 | 'net80211/ieee80211_dfs.h', |
---|
1519 | 'net80211/ieee80211_freebsd.h', |
---|
1520 | 'net80211/_ieee80211.h', |
---|
1521 | 'net80211/ieee80211.h', |
---|
1522 | 'net80211/ieee80211_hostap.h', |
---|
1523 | 'net80211/ieee80211_ht.h', |
---|
1524 | 'net80211/ieee80211_input.h', |
---|
1525 | 'net80211/ieee80211_ioctl.h', |
---|
1526 | 'net80211/ieee80211_mesh.h', |
---|
1527 | 'net80211/ieee80211_monitor.h', |
---|
1528 | 'net80211/ieee80211_node.h', |
---|
1529 | 'net80211/ieee80211_phy.h', |
---|
1530 | 'net80211/ieee80211_power.h', |
---|
1531 | 'net80211/ieee80211_proto.h', |
---|
1532 | 'net80211/ieee80211_radiotap.h', |
---|
1533 | 'net80211/ieee80211_ratectl.h', |
---|
1534 | 'net80211/ieee80211_regdomain.h', |
---|
1535 | 'net80211/ieee80211_rssadapt.h', |
---|
1536 | 'net80211/ieee80211_scan.h', |
---|
1537 | 'net80211/ieee80211_sta.h', |
---|
1538 | 'net80211/ieee80211_superg.h', |
---|
1539 | 'net80211/ieee80211_tdma.h', |
---|
1540 | 'net80211/ieee80211_var.h', |
---|
1541 | 'net80211/ieee80211_wds.h', |
---|
1542 | ] |
---|
1543 | ) |
---|
1544 | netipsec.addSourceFiles( |
---|
1545 | [ |
---|
1546 | 'net80211/ieee80211_acl.c', |
---|
1547 | 'net80211/ieee80211_action.c', |
---|
1548 | 'net80211/ieee80211_adhoc.c', |
---|
1549 | 'net80211/ieee80211_ageq.c', |
---|
1550 | 'net80211/ieee80211_amrr.c', |
---|
1551 | 'net80211/ieee80211.c', |
---|
1552 | 'net80211/ieee80211_crypto.c', |
---|
1553 | 'net80211/ieee80211_crypto_ccmp.c', |
---|
1554 | 'net80211/ieee80211_crypto_none.c', |
---|
1555 | 'net80211/ieee80211_crypto_tkip.c', |
---|
1556 | 'net80211/ieee80211_crypto_wep.c', |
---|
1557 | 'net80211/ieee80211_ddb.c', |
---|
1558 | 'net80211/ieee80211_dfs.c', |
---|
1559 | 'net80211/ieee80211_freebsd.c', |
---|
1560 | 'net80211/ieee80211_hostap.c', |
---|
1561 | 'net80211/ieee80211_ht.c', |
---|
1562 | 'net80211/ieee80211_hwmp.c', |
---|
1563 | 'net80211/ieee80211_input.c', |
---|
1564 | 'net80211/ieee80211_ioctl.c', |
---|
1565 | 'net80211/ieee80211_mesh.c', |
---|
1566 | 'net80211/ieee80211_monitor.c', |
---|
1567 | 'net80211/ieee80211_node.c', |
---|
1568 | 'net80211/ieee80211_output.c', |
---|
1569 | 'net80211/ieee80211_phy.c', |
---|
1570 | 'net80211/ieee80211_power.c', |
---|
1571 | 'net80211/ieee80211_proto.c', |
---|
1572 | 'net80211/ieee80211_radiotap.c', |
---|
1573 | 'net80211/ieee80211_ratectl.c', |
---|
1574 | 'net80211/ieee80211_ratectl_none.c', |
---|
1575 | 'net80211/ieee80211_regdomain.c', |
---|
1576 | 'net80211/ieee80211_rssadapt.c', |
---|
1577 | 'net80211/ieee80211_scan.c', |
---|
1578 | 'net80211/ieee80211_scan_sta.c', |
---|
1579 | 'net80211/ieee80211_sta.c', |
---|
1580 | 'net80211/ieee80211_superg.c', |
---|
1581 | 'net80211/ieee80211_tdma.c', |
---|
1582 | 'net80211/ieee80211_wds.c', |
---|
1583 | 'net80211/ieee80211_xauth.c', |
---|
1584 | ] |
---|
1585 | ) |
---|
1586 | |
---|
1587 | opencrypto = Module('opencrypto') |
---|
1588 | opencrypto.addHeaderFiles( |
---|
1589 | [ |
---|
1590 | 'sys/md5.h', |
---|
1591 | 'opencrypto/deflate.h', |
---|
1592 | 'opencrypto/xform.h', |
---|
1593 | 'opencrypto/cryptosoft.h', |
---|
1594 | 'opencrypto/rmd160.h', |
---|
1595 | 'opencrypto/cryptodev.h', |
---|
1596 | 'opencrypto/castsb.h', |
---|
1597 | 'opencrypto/skipjack.h', |
---|
1598 | 'opencrypto/cast.h', |
---|
1599 | ] |
---|
1600 | ) |
---|
1601 | opencrypto.addSourceFiles( |
---|
1602 | [ |
---|
1603 | 'opencrypto/crypto.c', |
---|
1604 | 'opencrypto/deflate.c', |
---|
1605 | 'opencrypto/cryptosoft.c', |
---|
1606 | 'opencrypto/criov.c', |
---|
1607 | 'opencrypto/rmd160.c', |
---|
1608 | 'opencrypto/xform.c', |
---|
1609 | 'opencrypto/skipjack.c', |
---|
1610 | 'opencrypto/cast.c', |
---|
1611 | 'opencrypto/cryptodev.c', |
---|
1612 | ] |
---|
1613 | ) |
---|
1614 | |
---|
1615 | crypto = Module('crypto') |
---|
1616 | crypto.addHeaderFiles( |
---|
1617 | [ |
---|
1618 | #'crypto/aesni/aesni.h', |
---|
1619 | 'crypto/sha1.h', |
---|
1620 | 'crypto/sha2/sha2.h', |
---|
1621 | 'crypto/rijndael/rijndael.h', |
---|
1622 | 'crypto/rijndael/rijndael_local.h', |
---|
1623 | 'crypto/rijndael/rijndael-api-fst.h', |
---|
1624 | 'crypto/des/des.h', |
---|
1625 | 'crypto/des/spr.h', |
---|
1626 | 'crypto/des/podd.h', |
---|
1627 | 'crypto/des/sk.h', |
---|
1628 | 'crypto/des/des_locl.h', |
---|
1629 | 'crypto/blowfish/bf_pi.h', |
---|
1630 | 'crypto/blowfish/bf_locl.h', |
---|
1631 | 'crypto/blowfish/blowfish.h', |
---|
1632 | 'crypto/rc4/rc4.h', |
---|
1633 | #'crypto/via/padlock.h', |
---|
1634 | 'crypto/camellia/camellia.h', |
---|
1635 | ] |
---|
1636 | ) |
---|
1637 | crypto.addSourceFiles( |
---|
1638 | [ |
---|
1639 | #'crypto/aesni/aesni.c', |
---|
1640 | #'crypto/aesni/aesni_wrap.c', |
---|
1641 | 'crypto/sha1.c', |
---|
1642 | 'crypto/sha2/sha2.c', |
---|
1643 | 'crypto/rijndael/rijndael-alg-fst.c', |
---|
1644 | 'crypto/rijndael/rijndael-api.c', |
---|
1645 | 'crypto/rijndael/rijndael-api-fst.c', |
---|
1646 | 'crypto/des/des_setkey.c', |
---|
1647 | 'crypto/des/des_enc.c', |
---|
1648 | 'crypto/des/des_ecb.c', |
---|
1649 | 'crypto/blowfish/bf_enc.c', |
---|
1650 | 'crypto/blowfish/bf_skey.c', |
---|
1651 | 'crypto/blowfish/bf_ecb.c', |
---|
1652 | 'crypto/rc4/rc4.c', |
---|
1653 | #'crypto/via/padlock.c', |
---|
1654 | #'crypto/via/padlock_cipher.c', |
---|
1655 | #'crypto/via/padlock_hash.c', |
---|
1656 | 'crypto/camellia/camellia-api.c', |
---|
1657 | 'crypto/camellia/camellia.c', |
---|
1658 | ] |
---|
1659 | ) |
---|
1660 | |
---|
1661 | altq = Module('altq') |
---|
1662 | altq.addHeaderFiles( |
---|
1663 | [ |
---|
1664 | 'contrib/altq/altq/altq_rmclass.h', |
---|
1665 | 'contrib/altq/altq/altq_cbq.h', |
---|
1666 | 'contrib/altq/altq/altq_var.h', |
---|
1667 | 'contrib/altq/altq/altqconf.h', |
---|
1668 | 'contrib/altq/altq/altq.h', |
---|
1669 | 'contrib/altq/altq/altq_hfsc.h', |
---|
1670 | 'contrib/altq/altq/altq_red.h', |
---|
1671 | 'contrib/altq/altq/altq_classq.h', |
---|
1672 | 'contrib/altq/altq/altq_priq.h', |
---|
1673 | 'contrib/altq/altq/altq_rmclass_debug.h', |
---|
1674 | 'contrib/altq/altq/altq_cdnr.h', |
---|
1675 | 'contrib/altq/altq/altq_rio.h', |
---|
1676 | 'contrib/altq/altq/if_altq.h', |
---|
1677 | ] |
---|
1678 | ) |
---|
1679 | altq.addSourceFiles( |
---|
1680 | [ |
---|
1681 | 'contrib/altq/altq/altq_rmclass.c', |
---|
1682 | 'contrib/altq/altq/altq_rio.c', |
---|
1683 | 'contrib/altq/altq/altq_subr.c', |
---|
1684 | 'contrib/altq/altq/altq_cdnr.c', |
---|
1685 | 'contrib/altq/altq/altq_priq.c', |
---|
1686 | 'contrib/altq/altq/altq_cbq.c', |
---|
1687 | 'contrib/altq/altq/altq_hfsc.c', |
---|
1688 | 'contrib/altq/altq/altq_red.c', |
---|
1689 | ] |
---|
1690 | ) |
---|
1691 | |
---|
1692 | # contrib/pf Module |
---|
1693 | pf = Module('pf') |
---|
1694 | pf.addHeaderFiles( |
---|
1695 | [ |
---|
1696 | 'contrib/pf/net/pf_mtag.h', |
---|
1697 | 'contrib/pf/net/if_pfsync.h', |
---|
1698 | 'contrib/pf/net/pfvar.h', |
---|
1699 | 'contrib/pf/net/if_pflog.h', |
---|
1700 | ] |
---|
1701 | ) |
---|
1702 | pf.addSourceFiles( |
---|
1703 | [ |
---|
1704 | 'contrib/pf/netinet/in4_cksum.c', |
---|
1705 | 'contrib/pf/net/pf.c', |
---|
1706 | 'contrib/pf/net/if_pflog.c', |
---|
1707 | 'contrib/pf/net/pf_subr.c', |
---|
1708 | 'contrib/pf/net/pf_ioctl.c', |
---|
1709 | 'contrib/pf/net/pf_table.c', |
---|
1710 | 'contrib/pf/net/pf_if.c', |
---|
1711 | 'contrib/pf/net/pf_osfp.c', |
---|
1712 | 'contrib/pf/net/pf_norm.c', |
---|
1713 | 'contrib/pf/net/pf_ruleset.c', |
---|
1714 | 'contrib/pf/net/if_pfsync.c', |
---|
1715 | ] |
---|
1716 | ) |
---|
1717 | |
---|
1718 | # ARM Architecture Specific Files Module |
---|
1719 | armDependent = Module('armDependent') |
---|
1720 | armDependent.setTarget("arm") |
---|
1721 | armDependent.addHeaderFiles( |
---|
1722 | [ |
---|
1723 | 'arm/include/in_cksum.h', |
---|
1724 | ] |
---|
1725 | ) |
---|
1726 | armDependent.addSourceFiles( |
---|
1727 | [ |
---|
1728 | 'arm/arm/in_cksum.c', |
---|
1729 | 'arm/arm/in_cksum_arm.S', |
---|
1730 | ] |
---|
1731 | ) |
---|
1732 | |
---|
1733 | # i386 Architecture Specific Files Module |
---|
1734 | i386Dependent = Module('i386Dependent') |
---|
1735 | i386Dependent.setTarget("i386") |
---|
1736 | i386Dependent.addHeaderFiles( |
---|
1737 | [ |
---|
1738 | 'i386/include/in_cksum.h', |
---|
1739 | ] |
---|
1740 | ) |
---|
1741 | i386Dependent.addSourceFiles( |
---|
1742 | [ |
---|
1743 | 'i386/i386/in_cksum.c', |
---|
1744 | ] |
---|
1745 | ) |
---|
1746 | |
---|
1747 | # MIPS Architecture Specific Files Module |
---|
1748 | mipsDependent = Module('mipsDependent') |
---|
1749 | mipsDependent.setTarget("mips") |
---|
1750 | mipsDependent.addHeaderFiles( |
---|
1751 | [ |
---|
1752 | 'mips/include/in_cksum.h', |
---|
1753 | ] |
---|
1754 | ) |
---|
1755 | mipsDependent.addSourceFiles( |
---|
1756 | [ |
---|
1757 | 'mips/mips/in_cksum.c', |
---|
1758 | ] |
---|
1759 | ) |
---|
1760 | |
---|
1761 | # PowerPC Architecture Specific Files Module |
---|
1762 | powerpcDependent = Module('powerpcDependent') |
---|
1763 | powerpcDependent.setTarget("powerpc") |
---|
1764 | powerpcDependent.addHeaderFiles( |
---|
1765 | [ |
---|
1766 | 'powerpc/include/in_cksum.h', |
---|
1767 | ] |
---|
1768 | ) |
---|
1769 | powerpcDependent.addSourceFiles( |
---|
1770 | [ |
---|
1771 | 'powerpc/powerpc/in_cksum.c', |
---|
1772 | ] |
---|
1773 | ) |
---|
1774 | |
---|
1775 | # SPARC64 Architecture Specific Files Module |
---|
1776 | sparc64Dependent = Module('cpu_dependent') |
---|
1777 | sparc64Dependent.setTarget("sparc64") |
---|
1778 | sparc64Dependent.addHeaderFiles( |
---|
1779 | [ |
---|
1780 | 'sparc64/include/in_cksum.h', |
---|
1781 | ] |
---|
1782 | ) |
---|
1783 | sparc64Dependent.addSourceFiles( |
---|
1784 | [ |
---|
1785 | 'sparc64/sparc64/in_cksum.c', |
---|
1786 | ] |
---|
1787 | ) |
---|
1788 | |
---|
1789 | # Add Empty Files |
---|
1790 | mm.addEmptyFiles( |
---|
1791 | [ |
---|
1792 | 'cam/cam_queue.h', |
---|
1793 | 'ddb/db_sym.h', |
---|
1794 | 'ddb/ddb.h', |
---|
1795 | 'machine/cpu.h', |
---|
1796 | 'machine/elf.h', |
---|
1797 | 'machine/sf_buf.h', |
---|
1798 | #'machine/vmparam.h', |
---|
1799 | 'local/opt_ntp.h', |
---|
1800 | 'security/audit/audit.h', |
---|
1801 | 'sys/bio.h', |
---|
1802 | 'sys/copyright.h', |
---|
1803 | 'sys/cpuset.h', |
---|
1804 | 'sys/exec.h', |
---|
1805 | 'sys/fail.h', |
---|
1806 | 'sys/limits.h', |
---|
1807 | 'sys/namei.h', |
---|
1808 | 'sys/_pthreadtypes.h', |
---|
1809 | #'sys/resourcevar.h', |
---|
1810 | 'sys/sched.h', |
---|
1811 | 'sys/select.h', |
---|
1812 | 'sys/syscallsubr.h', |
---|
1813 | 'sys/sysent.h', |
---|
1814 | 'sys/syslimits.h', |
---|
1815 | 'sys/sysproto.h', |
---|
1816 | 'sys/stat.h', |
---|
1817 | #'sys/time.h', |
---|
1818 | 'time.h', |
---|
1819 | 'sys/timespec.h', |
---|
1820 | 'sys/_timeval.h', |
---|
1821 | #'sys/vmmeter.h', |
---|
1822 | #'sys/vnode.h', |
---|
1823 | #'vm/pmap.h', |
---|
1824 | #'vm/uma_int.h', |
---|
1825 | #'vm/uma_dbg.h', |
---|
1826 | #'vm/vm_extern.h', |
---|
1827 | #'vm/vm_map.h', |
---|
1828 | #'vm/vm_object.h', |
---|
1829 | #'vm/vm_page.h', |
---|
1830 | #'vm/vm_pageout.h', |
---|
1831 | #'vm/vm_param.h', |
---|
1832 | #'vm/vm_kern.h', |
---|
1833 | 'dev/pci/pcireg.h', |
---|
1834 | 'dev/pci/pcivar.h', |
---|
1835 | 'geom/geom_disk.h', |
---|
1836 | #'sys/kdb.h', |
---|
1837 | #'libkern/jenkins.h', |
---|
1838 | #'machine/pcb.h', |
---|
1839 | #'net80211/ieee80211_freebsd.h', |
---|
1840 | 'netgraph/ng_ipfw.h', |
---|
1841 | #'sys/sf_buf.h', |
---|
1842 | ] |
---|
1843 | ) |
---|
1844 | |
---|
1845 | # Register all the Module instances with the Module Manager |
---|
1846 | mm.addModule(netDeps) |
---|
1847 | mm.addModule(net) |
---|
1848 | mm.addModule(netinet) |
---|
1849 | mm.addModule(netinet6) |
---|
1850 | mm.addModule(netipsec) |
---|
1851 | mm.addModule(net80211) |
---|
1852 | mm.addModule(opencrypto) |
---|
1853 | mm.addModule(crypto) |
---|
1854 | mm.addModule(altq) |
---|
1855 | mm.addModule(pf) |
---|
1856 | mm.addModule(devNet) |
---|
1857 | |
---|
1858 | mm.addModule(local) |
---|
1859 | mm.addModule(devUsbBase) |
---|
1860 | mm.addModule(devUsb) |
---|
1861 | mm.addModule(devUsbQuirk) |
---|
1862 | mm.addModule(devUsbController) |
---|
1863 | |
---|
1864 | mm.addModule(cam) |
---|
1865 | mm.addModule(devUsbStorage) |
---|
1866 | #mm.addModule(devUsbNet) |
---|
1867 | |
---|
1868 | # Now add CPU Architecture Dependent Modules |
---|
1869 | mm.addModule(armDependent) |
---|
1870 | mm.addModule(i386Dependent) |
---|
1871 | mm.addModule(mipsDependent) |
---|
1872 | mm.addModule(powerpcDependent) |
---|
1873 | mm.addModule(sparc64Dependent) |
---|
1874 | |
---|
1875 | # Perform the actual file manipulation |
---|
1876 | if isForward == True: |
---|
1877 | if isOnlyMakefile == False: |
---|
1878 | mm.copyFiles() |
---|
1879 | mm.createMakefile() |
---|
1880 | else: |
---|
1881 | mm.revertFiles() |
---|
1882 | |
---|
1883 | if filesChanged == 1: |
---|
1884 | print str(filesChanged) + " file was changed." |
---|
1885 | else: |
---|
1886 | print str(filesChanged) + " files were changed." |
---|