a7c5aff85e7814295b8f5da3eb3c8d9077782860
[gps-watch.git] / SConscript.libcommon
1 Import('env')
2 env = env.Clone()
3
4 source_files_rs = [
5     'src/common/lib.rs', # Must be listed first (see below).
6     'src/common/register.rs',
7     'src/common/nvic.rs',
8     'src/common/clock.rs',
9     'src/common/systick.rs',
10     'src/common/port.rs',
11     'src/common/gpio.rs',
12     'src/common/i2c.rs',
13     'src/common/spi.rs',
14     'src/common/uart.rs',
15     'src/common/watchdog.rs',
16     'src/common/crc32.rs',
17     'src/common/ringbuf.rs',
18     'src/common/buffer.rs',
19     'src/common/usb_serial.rs',
20     'src/common/display.rs',
21     'src/common/screen.rs',
22     'src/common/gps.rs',
23     'src/common/fmt.rs',
24     'src/common/time.rs',
25     'src/common/storage.rs',
26     'src/common/mx25l.rs',
27     'src/common/shell.rs',
28 ]
29
30 source_files_c = [
31     'src/common/startup.c',
32     'src/common/asm_helpers.c',
33     'src/common/systick.c',
34     'src/common/ringbuf.c',
35     'src/common/flash.c',
36     'src/common/uart0.c',
37     'src/common/usb_device_ch9.c',
38     'src/common/usb_device_dci.c',
39     'src/common/usb_device_descriptor.c',
40     'src/common/usb_device_khci.c',
41     'src/common/usb_osa_bm.c',
42     'src/common/virtual_com.c',
43 ]
44
45 libcommon_rlib = env.Rustc('libcommon.rlib', source_files_rs[0])
46
47 for f in source_files_rs:
48     Depends(libcommon_rlib, f)
49
50 libcommon_a = env.Library('libcommon.a', source_files_c)
51
52 for f in source_files_c:
53     Depends(libcommon_a, f)