-
Notifications
You must be signed in to change notification settings - Fork 0
/
features.lisp
59 lines (49 loc) · 1.85 KB
/
features.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
;;;-*- Mode: Lisp; Package: ulisp-build -*-
(in-package :ulisp-build)
;; TODO: Take this flag away once things have been refactored.
(defvar *include-lowlevel* nil
"Whether to include certain very low-level features.")
(defparameter *base-sources*
'("src/specials.c" "src/accessors.c" "src/control-flow.c" "src/core.c" "src/cxr.c" "src/list.c"
"src/num-test.c" "src/bitwise.c" "src/string.c" "src/printer.c" "src/system.c" "src/char.c"
"src/arduino.cc")
"Source files to be included in all variants.")
(defparameter *float-sources*
'("src/float/arith.c"
"src/float/compare.c"
"src/float/ops.c"
"src/float/in-place.c")
"Source files to be included in floating-point variants.")
(defparameter *int-sources*
'("src/int/arith.c"
"src/int/compare.c"
"src/int/ops.c"
"src/int/in-place.c")
"Source files to be included in integer-only variants.")
(defparameter *array-sources*
'("src/arrays.c")
"Source files to be included in array-supporting variants.")
(defparameter *asm-sources*
'("src/assembler.c")
"Source files to be included in assembler-supporting variants.")
(defparameter *gfx-sources*
'("src/gfx.cc")
"Source files to be included for the graphics extension.")
(defparameter *wifi-sources*
'("src/wifi.cc")
"Source files to be included for the WiFi extension.")
(defun get-sources (platform)
(let ((features (get-features platform)))
(append *base-sources*
(if (member :float features)
*float-sources*
*int-sources*)
(if (member :array features)
*array-sources*)
(if (member :code features)
*asm-sources*)
(if (member :ethernet features)
*wifi-sources*)
(if (member :gfx features)
*gfx-sources*)
(if *include-lowlevel* '("src/low-level.c")))))