-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (36 loc) · 802 Bytes
/
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
51
DEBUG := 1
FLAGS = -Wall -mtune=native -march=native
SRCS = monitor.c
TARGET = monitor
ifeq ($(DEBUG),1)
FLAGS += -O -g -DDEBUG
else
FLAGS += -O2
endif
all: $(TARGET) po/$(TARGET).pot pio
$(TARGET): $(SRCS)
gcc $(FLAGS) $(SRCS) -o $(TARGET)
pio:
pio run
upload:
pio run --target upload
test:
pio test
run:
./$(TARGET)
doc:
doxygen
clean:
rm -f *.d *.o $(TARGET)
pio run --target clean
install: $(TARGET)
cp $(TARGET) /usr/bin/$(TARGET)
chmod go+rx /usr/bin/$(TARGET)
translation:
xgettext --keyword=_ --language=C --add-comments -o po/$(TARGET).pot $(TARGET).c
po/de/$(TERGET).mo: po/de/$(TARGET).po
msgfmt --output-file=$@ $<
po/de/$(TARGET).po: po/$(TARGET).pot
msgmerge --update $@ $<
po/$(TARGET).pot: $(TARGET).c
xgettext -k_ -j -lC -c -o po/$(TARGET).pot $(TARGET).c