-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (27 loc) · 923 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
CC=gcc
CFLAGS=-Wall -pedantic-errors -fconstant-cfstrings
LDFLAGS=
DEBUG=no
ifeq ($(DEBUG),yes)
CFLAGS += -g
endif
serialrenamerd:
$(CC) $(CFLAGS) $(LDFLAGS) -framework IOKit -framework CoreFoundation -framework Foundation serialrenamerd.m -o $@
install: serialrenamerd
@echo "Installing serialrenamer daemon for macos..."
@cp fr.insa-rennes.clubrobot.serialrenamerd.plist /Library/LaunchDaemons/
@cp serialrenamerd /usr/local/bin/
@chmod 555 /usr/local/bin/serialrenamerd
@launchctl load /Library/LaunchDaemons/fr.insa-rennes.clubrobot.serialrenamerd.plist
@echo "Done !"
remove:
@echo "Uninstalling daemon..."
@launchctl unload /Library/LaunchDaemons/fr.insa-rennes.clubrobot.serialrenamerd.plist
@rm /Library/LaunchDaemons/fr.insa-rennes.clubrobot.serialrenamerd.plist
@rm /usr/local/bin/serialrenamerd
@rm -r /tmp/arduino
@echo "Done !"
clean:
@rm -f *.o *~
@rm -f serialrenamerd
@echo "Cleaned !"