-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (37 loc) · 1.16 KB
/
Makefile
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
# Copyright (c) 2023 Per Hallsmark <per@hallsmark.se>
# SPDX-License-Identifier: GPL-2.0
APPS += build/nmea2000-bus-dumper
APPS += build/nmea2000-data-viewer
APPS += build/nmea2000-simple-msg
APPS += build/ydwg-socketcan-gateway
LIB += build/libnmea2000.so
LIB_SRCS += src/nmea2000.c
LIB_SRCS += src/ydwg-02.c
LIB_CFLAGS += -fPIC -Iinclude
LIB_LDFLAGS += -shared
CFLAGS += -Iinclude -g
LIBS += -lm -lcurses -ltinfo -lpthread
LIBS += -Lbuild -lnmea2000
all: $(LIB) $(APPS)
$(LIB): $(LIB_SRCS)
mkdir -p build
$(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -o $@ $^
build/nmea2000-bus-dumper: examples/nmea2000-bus-dumper.c
mkdir -p build
$(CC) $(CFLAGS) $(LIBS) -o $@ $^
build/nmea2000-data-viewer: examples/nmea2000-data-viewer.c
mkdir -p build
$(CC) $(CFLAGS) $(LIBS) -o $@ $^
build/nmea2000-simple-msg: examples/nmea2000-simple-msg.c
mkdir -p build
$(CC) $(CFLAGS) $(LIBS) -o $@ $^
build/ydwg-socketcan-gateway: examples/ydwg-socketcan-gateway.c
mkdir -p build
$(CC) $(CFLAGS) $(LIBS) -o $@ $^
clean:
$(RM) -r build
find-unknown: build/nmea2000-bus-dumper
build/nmea2000-bus-dumper > log &
sleep 30
killall $(APP)
grep unknown log | awk '{print $5}' | sort -h | uniq | wc